Commit 91cd8d16 authored by 黄奎's avatar 黄奎

新增插件配置

parent 0eaf6554
using System;
using VT.FW.DB;
namespace Mall.Model.Entity.BaseSetUp
{
/// <summary>
/// 营销中心插件配置实体
/// </summary>
[Serializable]
[DB(ConnectionName = "DefaultConnection")]
public class RB_Marketing_Config
{
/// <summary>
/// 商城营销中心插件配置主键
/// </summary>
public int PConfigId { get; set; }
/// <summary>
/// 商户编号
/// </summary>
public int TenantId { get; set; }
/// <summary>
/// 插件编号
/// </summary>
public int PlugId { get; set; }
}
}
\ No newline at end of file
using Mall.Model.Entity.BaseSetUp;
using System;
using VT.FW.DB;
namespace Mall.Model.Extend.BaseSetUp
{
/// <summary>
/// 营销中心插件配置扩展实体类
/// </summary>
[Serializable]
[DB(ConnectionName = "DefaultConnection")]
public class RB_Marketing_Config_Extend : RB_Marketing_Config
{
}
}
\ No newline at end of file
......@@ -17,6 +17,11 @@ namespace Mall.Module.BaseSetUp
/// </summary>
private readonly RB_Marketing_PlugRepository marketing_PlugRepository = new RB_Marketing_PlugRepository();
/// <summary>
/// 营销中心插件配置仓储层对象
/// </summary>
private readonly RB_Marketing_ConfigRepository marketing_ConfigRepository = new RB_Marketing_ConfigRepository();
/// <summary>
/// 获取营销中心插件配置分页列表
/// </summary>
......@@ -95,5 +100,15 @@ namespace Mall.Module.BaseSetUp
bool flag = marketing_PlugRepository.Update(fileds, new WhereHelper(nameof(RB_Marketing_Plug_Extend.PId), PId));
return flag;
}
/// <summary>
/// 获取营销中心插件配置列表
/// </summary>
/// <param name="query"></param>
/// <returns></returns>
public List<RB_Marketing_Config_Extend> GetMarketingConfigListModule(RB_Marketing_Config_Extend query)
{
return marketing_ConfigRepository.GetMarketingConfigListRepository(query);
}
}
}
\ No newline at end of file
using Mall.Model.Entity.BaseSetUp;
using Mall.Model.Extend.BaseSetUp;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Mall.Repository.BaseSetUp
{
/// <summary>
/// 营销中心插件配置仓储层
/// </summary>
public class RB_Marketing_ConfigRepository : BaseRepository<RB_Marketing_Config>
{
/// <summary>
/// 获取营销中心插件配置列表
/// </summary>
/// <param name="query"></param>
/// <returns></returns>
public List<RB_Marketing_Config_Extend> GetMarketingConfigListRepository(RB_Marketing_Config_Extend query)
{
StringBuilder builder = new StringBuilder();
builder.Append(@" SELECT * FROM RB_Marketing_Config WHERE 1=1 ");
if (query != null)
{
if (query.TenantId > 0)
{
builder.AppendFormat(" AND {0}={1} ", nameof(RB_Marketing_Config_Extend.TenantId), query.TenantId);
}
return Get<RB_Marketing_Config_Extend>(builder.ToString()).ToList();
}
else
{
return new List<RB_Marketing_Config_Extend>();
}
}
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment