Commit 04684870 authored by liudong1993's avatar liudong1993
parents aaafd0d6 ca37b02d
...@@ -83,5 +83,10 @@ namespace Mall.Model.Entity.User ...@@ -83,5 +83,10 @@ namespace Mall.Model.Entity.User
get; get;
set; set;
} }
/// <summary>
/// 创建时间
/// </summary>
public DateTime CreateDate { get; set; }
} }
} }
...@@ -76,5 +76,15 @@ namespace Mall.Model.Entity.User ...@@ -76,5 +76,15 @@ namespace Mall.Model.Entity.User
get; get;
set; set;
} }
/// <summary>
/// 创建时间
/// </summary>
public DateTime CreateDate { get; set; }
/// <summary>
/// 创建人
/// </summary>
public int CreateBy { get; set; }
} }
} }
using Mall.Common.AOP;
using Mall.Common.Enum.User;
using System;
using System.Collections.Generic;
using System.Text;
namespace Mall.Model.Entity.User
{
/// <summary>
/// 专题表实体
/// </summary>
[Serializable]
[DB(ConnectionName = "DefaultConnection")]
public class RB_Topic
{
/// <summary>
/// 专题Id
/// </summary>
public int Id
{
get;
set;
}
/// <summary>
/// 标题
/// </summary>
public string Title
{
get;
set;
}
/// <summary>
/// 专题列表布局方式
/// </summary>
public int? FlexType
{
get;
set;
}
/// <summary>
/// 封面图
/// </summary>
public string CoverImg
{
get;
set;
}
/// <summary>
/// 摘要
/// </summary>
public string Abstract
{
get;
set;
}
/// <summary>
/// 自定义分享标题
/// </summary>
public string CustomTitle
{
get;
set;
}
/// <summary>
/// 自定义分享图片
/// </summary>
public string CustomImg
{
get;
set;
}
/// <summary>
/// 是否精选(1-是)
/// </summary>
public int? IsChoice
{
get;
set;
}
/// <summary>
/// 分类编号
/// </summary>
public int? TopicTypeId
{
get;
set;
}
/// <summary>
/// 阅读数量
/// </summary>
public int? ReadNum
{
get;
set;
}
/// <summary>
/// 排序
/// </summary>
public int? SortNum
{
get;
set;
}
/// <summary>
/// 商户号Id
/// </summary>
public int? TenantId
{
get;
set;
}
/// <summary>
/// 小程序Id
/// </summary>
public int? MallBaseId
{
get;
set;
}
/// <summary>
/// 创建时间
/// </summary>
public DateTime? CreateDate
{
get;
set;
}
/// <summary>
/// 删除状态
/// </summary>
public int? Status
{
get;
set;
}
/// <summary>
/// 模板数据[JSON]格式
/// </summary>
public string TemplateData { get; set; }
}
}
...@@ -302,6 +302,98 @@ namespace Mall.Model.Extend.MarketingCenter ...@@ -302,6 +302,98 @@ namespace Mall.Model.Extend.MarketingCenter
public string btnTextColor { get; set; } public string btnTextColor { get; set; }
} }
/// <summary>
/// 专题插件
/// </summary>
public class topicItem
{
/// <summary>
/// 样式
/// </summary>
public string normal { get; set; }
public int count { get; set; }
public string logo_1 { get; set; }
public string logo_2 { get; set; }
public string icon { get; set; }
/// <summary>
/// 是否显示分类
/// </summary>
public bool cat_show { get; set; }
/// <summary>
/// 专题列表
/// </summary>
public List<topicDetailsItem> topic_list { get; set; }
/// <summary>
/// 专题分类列表
/// </summary>
public List<topicTypeItem> list { get; set; }
}
/// <summary>
/// 专题分类
/// </summary>
public class topicTypeItem
{
/// <summary>
/// 分类Id
/// </summary>
public int cat_id { get; set; }
/// <summary>
/// 分类名称
/// </summary>
public int cat_name { get; set; }
/// <summary>
/// 分类名称
/// </summary>
public int name { get; set; }
public int custom { get; set; }
public int number { get; set; }
public List<object> children { get; set; }
}
/// <summary>
/// 专题列表详情
/// </summary>
public class topicDetailsItem
{
/// <summary>
/// 专题标题
/// </summary>
public string title { get; set; }
/// <summary>
/// 专题封面图
/// </summary>
public string cover_pic { get; set; }
/// <summary>
/// 专题阅读数量
/// </summary>
public int read_count { get; set; }
/// <summary>
///
/// </summary>
public int layout { get; set; }
/// <summary>
///
/// </summary>
public int id { get; set; }
}
/// <summary> /// <summary>
/// 标题组件 /// 标题组件
/// </summary> /// </summary>
......
...@@ -13,6 +13,16 @@ namespace Mall.Model.Entity.User ...@@ -13,6 +13,16 @@ namespace Mall.Model.Entity.User
[DB(ConnectionName = "DefaultConnection")] [DB(ConnectionName = "DefaultConnection")]
public class RB_Employee_Extend : Model.Entity.User.RB_Employee public class RB_Employee_Extend : Model.Entity.User.RB_Employee
{ {
/// <summary>
/// 创建时间字符串
/// </summary>
public string CreateDateStr
{
get {
string str = "";
str = Convert.ToDateTime(this.CreateDate).ToString("yyyy-MM-dd HH:mm:ss");
return str;
}
}
} }
} }
\ No newline at end of file
...@@ -13,5 +13,22 @@ namespace Mall.Model.Entity.User ...@@ -13,5 +13,22 @@ namespace Mall.Model.Entity.User
[DB(ConnectionName = "DefaultConnection")] [DB(ConnectionName = "DefaultConnection")]
public class RB_Role_Extend : Model.Entity.User.RB_Role public class RB_Role_Extend : Model.Entity.User.RB_Role
{ {
/// <summary>
/// 创建时间字符串
/// </summary>
public string CreateDateStr
{
get
{
string str = "";
str = Convert.ToDateTime(this.CreateDate).ToString("yyyy-MM-dd HH:mm:ss");
return str;
}
}
/// <summary>
/// 创建人
/// </summary>
public string CreateByName { get; set; }
} }
} }
\ No newline at end of file
using Mall.Common.AOP;
using Mall.Common.Enum.User;
using Mall.Model.Extend.MarketingCenter;
using System;
using System.Collections.Generic;
using System.Text;
namespace Mall.Model.Entity.User
{
/// <summary>
/// 专题表扩展实体
/// </summary>
[Serializable]
[DB(ConnectionName = "DefaultConnection")]
public class RB_Topic_Extend : Model.Entity.User.RB_Topic
{
/// <summary>
/// 专题名称
/// </summary>
public string TopicName { get; set; }
/// <summary>
/// 专题列表布局方式
/// </summary>
public string FlexTypeStr
{
get
{
string str = "";
if (this.FlexType > 0)
{
switch (Convert.ToInt32(this.FlexType))
{
case 1: str = "小图模式"; break;
case 2: str = "大图模式"; break;
case 3: str = "多图模式"; break;
}
}
return str;
}
}
/// <summary>
/// 是否精选字符串
/// </summary>
public string IsChoiceStr
{
get
{
string str = "";
if (this.IsChoice >= 0)
{
switch (Convert.ToInt32(this.IsChoice))
{
case 0: str = "否"; break;
case 1: str = "是"; break;
}
}
return str;
}
}
/// <summary>
/// 前端组件
/// </summary>
public List<ComponentItem> ComponentDataList { get; set; }
}
}
...@@ -101,6 +101,9 @@ namespace Mall.Module.MarketingCenter ...@@ -101,6 +101,9 @@ namespace Mall.Module.MarketingCenter
case "nav": item.data = JsonHelper.DeserializeObject<navItem>(item.data.ToString()); break; case "nav": item.data = JsonHelper.DeserializeObject<navItem>(item.data.ToString()); break;
case "banner": item.data = JsonHelper.DeserializeObject<bannerItem>(item.data.ToString()); break; case "banner": item.data = JsonHelper.DeserializeObject<bannerItem>(item.data.ToString()); break;
case "notice": item.data = JsonHelper.DeserializeObject<noticeItem>(item.data.ToString()); break; case "notice": item.data = JsonHelper.DeserializeObject<noticeItem>(item.data.ToString()); break;
//专题
case "topic": item.data = JsonHelper.DeserializeObject<topicItem>(item.data.ToString()); break;
case "link": item.data = JsonHelper.DeserializeObject<linkItem>(item.data.ToString()); break; case "link": item.data = JsonHelper.DeserializeObject<linkItem>(item.data.ToString()); break;
case "rubik": item.data = JsonHelper.DeserializeObject<rubikItem>(item.data.ToString()); break; case "rubik": item.data = JsonHelper.DeserializeObject<rubikItem>(item.data.ToString()); break;
case "video": item.data = JsonHelper.DeserializeObject<videoItem>(item.data.ToString()); break; case "video": item.data = JsonHelper.DeserializeObject<videoItem>(item.data.ToString()); break;
......
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Text; using System.Text;
using Mall.Common.Plugin;
using Mall.Model.Entity.User; using Mall.Model.Entity.User;
using Mall.Model.Extend.MarketingCenter;
using Mall.Model.Extend.User; using Mall.Model.Extend.User;
using Mall.Repository; using Mall.Repository;
using Mall.Repository.User; using Mall.Repository.User;
...@@ -33,6 +35,11 @@ namespace Mall.Module.User ...@@ -33,6 +35,11 @@ namespace Mall.Module.User
/// </summary> /// </summary>
private RB_ArticleRepository articleRepository = new RB_ArticleRepository(); private RB_ArticleRepository articleRepository = new RB_ArticleRepository();
/// <summary>
/// 专题仓储层对象
/// </summary>
private RB_TopicRepository topicRepository = new RB_TopicRepository();
#region 专题分类 #region 专题分类
/// <summary> /// <summary>
...@@ -129,6 +136,109 @@ namespace Mall.Module.User ...@@ -129,6 +136,109 @@ namespace Mall.Module.User
} }
#endregion #endregion
#region 专题
/// <summary>
/// 专题分页列表
/// </summary>
/// <param name="pageIndex">页码</param>
/// <param name="pageSize">每页显示条数</param>
/// <param name="rowCount">总条数</param>
/// <param name="query">查询条件</param>
/// <returns></returns>
public List<RB_Topic_Extend> GetTopicPageListModule(int pageIndex, int pageSize, out long rowCount, RB_Topic_Extend query)
{
return topicRepository.GetTopicPageListRepository(pageIndex, pageSize, out rowCount, query);
}
/// <summary>
/// 获取专题列表
/// </summary>
/// <param name="query"></param>
/// <returns></returns>
public List<RB_Topic_Extend> GetTopicListModule(RB_Topic_Extend query)
{
return topicRepository.GetTopicListRepository(query);
}
/// <summary>
/// 新增修改专题
/// </summary>
/// <param name="extModel"></param>
/// <returns></returns>
public bool SetTopicModule(RB_Topic_Extend extModel)
{
bool flag = false;
if (extModel.Id > 0)
{
Dictionary<string, object> fileds = new Dictionary<string, object>()
{
{ nameof(RB_Topic_Extend.Title),extModel.Title.Trim()},
{ nameof(RB_Topic_Extend.FlexType),extModel.FlexType},
{ nameof(RB_Topic_Extend.CoverImg),extModel.CoverImg},
{ nameof(RB_Topic_Extend.Abstract),extModel.Abstract},
{ nameof(RB_Topic_Extend.CustomTitle),extModel.CustomTitle},
{ nameof(RB_Topic_Extend.CustomImg),extModel.CustomImg},
{ nameof(RB_Topic_Extend.IsChoice),extModel.IsChoice},
{ nameof(RB_Topic_Extend.TopicTypeId),extModel.TopicTypeId},
{ nameof(RB_Topic_Extend.ReadNum),extModel.ReadNum},
{ nameof(RB_Topic_Extend.SortNum),extModel.SortNum},
};
flag = topicRepository.Update(fileds, new WhereHelper(nameof(RB_Topic_Extend.Id), extModel.Id));
}
else
{
var newId = topicRepository.Insert(extModel);
extModel.Id = newId;
flag = newId > 0;
}
return flag;
}
/// <summary>
/// 获取专题实体
/// </summary>
/// <param name="Id"></param>
/// <returns></returns>
public RB_Topic_Extend GetTopicModule(object Id)
{
var extModel= topicRepository.GetEntity<RB_Topic_Extend>(Id);
if (extModel.TemplateData != null && !string.IsNullOrEmpty(extModel.TemplateData))
{
extModel.ComponentDataList = JsonHelper.DeserializeObject<List<ComponentItem>>(extModel.TemplateData);
if (extModel.ComponentDataList != null && extModel.ComponentDataList.Count > 0)
{
foreach (var item in extModel.ComponentDataList)
{
switch (item.Id)
{
case "rubik": item.data = JsonHelper.DeserializeObject<rubikItem>(item.data.ToString()); break;
case "video": item.data = JsonHelper.DeserializeObject<videoItem>(item.data.ToString()); break;
case "image-text": item.data = JsonHelper.DeserializeObject<imagetextItem>(item.data.ToString()); break;
}
}
}
}
return extModel;
}
/// <summary>
/// 删除专题
/// </summary>
/// <param name="extModel"></param>
/// <returns></returns>
public bool RemoveTopicModule(object Id)
{
bool flag = false;
Dictionary<string, object> fileds = new Dictionary<string, object>()
{
{ nameof(RB_Topic_Extend.Status),1},
};
flag = topicRepository.Update(fileds, new WhereHelper(nameof(RB_Topic_Extend.Id), Id));
return flag;
}
#endregion
#region 门店 #region 门店
/// <summary> /// <summary>
......
...@@ -146,7 +146,6 @@ namespace Mall.Module.User ...@@ -146,7 +146,6 @@ namespace Mall.Module.User
Dictionary<string, object> fileds = new Dictionary<string, object>() Dictionary<string, object> fileds = new Dictionary<string, object>()
{ {
{ nameof(RB_Employee_Extend.EmpAccount),extModel.EmpAccount.Trim()}, { nameof(RB_Employee_Extend.EmpAccount),extModel.EmpAccount.Trim()},
{ nameof(RB_Employee_Extend.EmpPwd),extModel.EmpPwd},
{ nameof(RB_Employee_Extend.EmpName),extModel.EmpName}, { nameof(RB_Employee_Extend.EmpName),extModel.EmpName},
{ nameof(RB_Employee_Extend.RoleAuth),extModel.RoleAuth}, { nameof(RB_Employee_Extend.RoleAuth),extModel.RoleAuth},
}; };
...@@ -161,6 +160,22 @@ namespace Mall.Module.User ...@@ -161,6 +160,22 @@ namespace Mall.Module.User
return flag; return flag;
} }
/// <summary>
/// 修改员工密码
/// </summary>
/// <param name="extModel"></param>
/// <returns></returns>
public bool SetEmployeePwdModule(RB_Employee_Extend extModel)
{
bool flag = false;
Dictionary<string, object> fileds = new Dictionary<string, object>()
{
{ nameof(RB_Employee_Extend.EmpPwd),extModel.EmpPwd},
};
flag = employeeRepository.Update(fileds, new WhereHelper(nameof(RB_Employee_Extend.EmpId), extModel.EmpId));
return flag;
}
/// <summary> /// <summary>
/// 获取员工实体 /// 获取员工实体
/// </summary> /// </summary>
...@@ -198,7 +213,13 @@ namespace Mall.Module.User ...@@ -198,7 +213,13 @@ namespace Mall.Module.User
/// <returns></returns> /// <returns></returns>
public RB_Emp_Config_Extend GetEmpConfigListModule(RB_Emp_Config_Extend query) public RB_Emp_Config_Extend GetEmpConfigListModule(RB_Emp_Config_Extend query)
{ {
return emp_ConfigRepository.GetEmpConfigListRepository(query)?.FirstOrDefault(); RB_Emp_Config_Extend extModel = new RB_Emp_Config_Extend();
var list = emp_ConfigRepository.GetEmpConfigListRepository(query);
if (list != null)
{
extModel = list.FirstOrDefault();
}
return extModel;
} }
/// <summary> /// <summary>
...@@ -209,6 +230,11 @@ namespace Mall.Module.User ...@@ -209,6 +230,11 @@ namespace Mall.Module.User
public bool SetEmpConfigModule(RB_Emp_Config_Extend extModel) public bool SetEmpConfigModule(RB_Emp_Config_Extend extModel)
{ {
bool flag = false; bool flag = false;
var defaultModel = GetEmpConfigListModule(new RB_Emp_Config_Extend() { MallBaseId = extModel.MallBaseId, TenantId = extModel.TenantId });
if (defaultModel != null && defaultModel.ConfigId>0)
{
extModel.ConfigId = defaultModel.ConfigId;
}
if (extModel.ConfigId > 0) if (extModel.ConfigId > 0)
{ {
Dictionary<string, object> fileds = new Dictionary<string, object>() Dictionary<string, object> fileds = new Dictionary<string, object>()
......
...@@ -20,7 +20,7 @@ namespace Mall.Repository.User ...@@ -20,7 +20,7 @@ namespace Mall.Repository.User
public List<RB_Emp_Config_Extend> GetEmpConfigListRepository(RB_Emp_Config_Extend query) public List<RB_Emp_Config_Extend> GetEmpConfigListRepository(RB_Emp_Config_Extend query)
{ {
StringBuilder builder = new StringBuilder(); StringBuilder builder = new StringBuilder();
builder.AppendFormat(@" SELECT * FROM RB_Emp_Config WHERE 1=1 AND Status=0 "); builder.AppendFormat(@" SELECT * FROM RB_Emp_Config WHERE 1=1 ");
if (query.TenantId > 0) if (query.TenantId > 0)
{ {
builder.AppendFormat(" AND {0}={1} ", nameof(RB_Emp_Config_Extend.TenantId), query.TenantId); builder.AppendFormat(" AND {0}={1} ", nameof(RB_Emp_Config_Extend.TenantId), query.TenantId);
......
using System;
using System.Collections.Generic;
using System.Text;
using Mall.Model.Entity.User;
using Mall.Model.Extend.User;
using System.Linq;
namespace Mall.Repository.User
{
/// <summary>
/// 专题表仓储层
/// </summary>
public class RB_TopicRepository : RepositoryBase<RB_Topic>
{
/// <summary>
/// 专题分页列表
/// </summary>
/// <param name="pageIndex">页码</param>
/// <param name="pageSize">每页显示条数</param>
/// <param name="rowCount">总条数</param>
/// <param name="query">查询条件</param>
/// <returns></returns>
public List<RB_Topic_Extend> GetTopicPageListRepository(int pageIndex, int pageSize, out long rowCount, RB_Topic_Extend query)
{
StringBuilder builder = new StringBuilder();
builder.AppendFormat(@"
SELECT A.*,B.TopicName FROM RB_Topic AS A LEFT JOIN rb_topic_type AS B ON A.TopicTypeId=B.Id
WHERE 1=1 AND A.Status=0
");
if (query.TenantId > 0)
{
builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Topic_Extend.TenantId), query.TenantId);
}
if (query.MallBaseId > 0)
{
builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Topic_Extend.MallBaseId), query.MallBaseId);
}
if (query.Id > 0)
{
builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Topic_Extend.Id), query.Id);
}
if (query.Title != null && !string.IsNullOrEmpty(query.Title.Trim()))
{
builder.AppendFormat(" AND A.{0} LIKE '%{1}%' ", nameof(RB_Topic_Extend.Title), query.Title.Trim());
}
if (query.TopicTypeId > 0)
{
builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Topic_Extend.TopicTypeId), query.TopicTypeId);
}
builder.Append(" ORDER BY A.SortNum ");
return GetPage<RB_Topic_Extend>(pageIndex, pageSize, out rowCount, builder.ToString()).ToList();
}
/// <summary>
/// 获取专题列表
/// </summary>
/// <param name="query"></param>
/// <returns></returns>
public List<RB_Topic_Extend> GetTopicListRepository(RB_Topic_Extend query)
{
StringBuilder builder = new StringBuilder();
builder.AppendFormat(@" SELECT * FROM RB_Topic WHERE 1=1 AND Status=0 ");
if (query.TenantId > 0)
{
builder.AppendFormat(" AND {0}={1} ", nameof(RB_Topic_Extend.TenantId), query.TenantId);
}
if (query.MallBaseId > 0)
{
builder.AppendFormat(" AND {0}={1} ", nameof(RB_Topic_Extend.MallBaseId), query.MallBaseId);
}
if (query.Id > 0)
{
builder.AppendFormat(" AND {0}={1} ", nameof(RB_Topic_Extend.Id), query.Id);
}
if (query.Title != null && !string.IsNullOrEmpty(query.Title.Trim()))
{
builder.AppendFormat(" AND {0} LIKE '%{1}%' ", nameof(RB_Topic_Extend.Title), query.Title.Trim());
}
builder.Append(" ORDER BY SortNum ");
return Get<RB_Topic_Extend>(builder.ToString()).ToList();
}
}
}
...@@ -25,7 +25,7 @@ namespace Mall.WebApi.Controllers.MarketingCenter ...@@ -25,7 +25,7 @@ namespace Mall.WebApi.Controllers.MarketingCenter
/// <summary> /// <summary>
/// 设置购物车数量 /// 获取用户未使用的优惠券
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
[HttpPost] [HttpPost]
......
...@@ -42,6 +42,16 @@ namespace Mall.WebApi.Controllers.User ...@@ -42,6 +42,16 @@ namespace Mall.WebApi.Controllers.User
query.MallBaseId = RequestParm.MallBaseId; query.MallBaseId = RequestParm.MallBaseId;
query.TenantId = RequestParm.TenantId; query.TenantId = RequestParm.TenantId;
var list = module.GetRolePageListModule(pageModel.pageIndex, pageModel.pageSize, out long rowsCount, query); var list = module.GetRolePageListModule(pageModel.pageIndex, pageModel.pageSize, out long rowsCount, query);
if (list != null && list.Count > 0)
{
foreach (var item in list)
{
if (item.CreateBy > 0)
{
item.CreateByName = UserReidsCache.GetUserLoginInfo(item.CreateBy)?.Account ?? "";
}
}
}
pageModel.count = Convert.ToInt32(rowsCount); pageModel.count = Convert.ToInt32(rowsCount);
pageModel.pageData = list; pageModel.pageData = list;
return ApiResult.Success(data: pageModel); return ApiResult.Success(data: pageModel);
...@@ -70,6 +80,9 @@ namespace Mall.WebApi.Controllers.User ...@@ -70,6 +80,9 @@ namespace Mall.WebApi.Controllers.User
extModel.Status = 0; extModel.Status = 0;
extModel.MallBaseId = RequestParm.MallBaseId; extModel.MallBaseId = RequestParm.MallBaseId;
extModel.TenantId = RequestParm.TenantId; extModel.TenantId = RequestParm.TenantId;
Int32.TryParse(RequestParm.uid, out int Uid);
extModel.CreateBy = Uid;
extModel.CreateDate = DateTime.Now;
var flag = module.SetRoleModule(extModel); var flag = module.SetRoleModule(extModel);
return flag ? ApiResult.Success() : ApiResult.Failed(); return flag ? ApiResult.Success() : ApiResult.Failed();
} }
...@@ -140,10 +153,24 @@ namespace Mall.WebApi.Controllers.User ...@@ -140,10 +153,24 @@ namespace Mall.WebApi.Controllers.User
extModel.Status = 0; extModel.Status = 0;
extModel.MallBaseId = RequestParm.MallBaseId; extModel.MallBaseId = RequestParm.MallBaseId;
extModel.TenantId = RequestParm.TenantId; extModel.TenantId = RequestParm.TenantId;
extModel.CreateDate = DateTime.Now;
extModel.EmpPwd = Common.DES.Encrypt(extModel.EmpPwd, Common.Config.WebApiKey, Common.Config.WebApiIV);
var flag = module.SetEmployeeModule(extModel); var flag = module.SetEmployeeModule(extModel);
return flag ? ApiResult.Success() : ApiResult.Failed(); return flag ? ApiResult.Success() : ApiResult.Failed();
} }
/// <summary>
/// 修改密码
/// </summary>
/// <returns></returns>
public ApiResult SetEmployeePwd()
{
var extModel = JsonConvert.DeserializeObject<RB_Employee_Extend>(RequestParm.msg.ToString());
extModel.EmpPwd = Common.DES.Encrypt(extModel.EmpPwd, Common.Config.WebApiKey, Common.Config.WebApiIV);
var flag = module.SetEmployeePwdModule(extModel);
return flag ? ApiResult.Success() : ApiResult.Failed();
}
/// <summary> /// <summary>
/// 获取员工实体 /// 获取员工实体
/// </summary> /// </summary>
...@@ -169,7 +196,7 @@ namespace Mall.WebApi.Controllers.User ...@@ -169,7 +196,7 @@ namespace Mall.WebApi.Controllers.User
} }
#endregion #endregion
#region 员工管理 #region 员工配置管理
/// <summary> /// <summary>
......
...@@ -115,6 +115,81 @@ namespace Mall.WebApi.Controllers.User ...@@ -115,6 +115,81 @@ namespace Mall.WebApi.Controllers.User
#endregion #endregion
#region 专题
/// <summary>
/// 专题分页列表
/// </summary>
/// <returns></returns>
public ApiResult GetTopicPageList()
{
ResultPageModel pageModel = JsonConvert.DeserializeObject<ResultPageModel>(RequestParm.msg.ToString());
var query = JsonConvert.DeserializeObject<RB_Topic_Extend>(RequestParm.msg.ToString());
query.MallBaseId = RequestParm.MallBaseId;
query.TenantId = RequestParm.TenantId;
var list = contentModule.GetTopicPageListModule(pageModel.pageIndex, pageModel.pageSize, out long rowsCount, query);
pageModel.count = Convert.ToInt32(rowsCount);
pageModel.pageData = list;
return ApiResult.Success(data: pageModel);
}
/// <summary>
/// 获取专题列表
/// </summary>
/// <returns></returns>
public ApiResult GetTopicList()
{
var query = JsonConvert.DeserializeObject<RB_Topic_Extend>(RequestParm.msg.ToString());
query.MallBaseId = RequestParm.MallBaseId;
query.TenantId = RequestParm.TenantId;
var list = contentModule.GetTopicListModule(query);
return ApiResult.Success(data: list);
}
/// <summary>
/// 新增修改专题
/// </summary>
/// <returns></returns>
public ApiResult SetTopic()
{
var extModel = JsonConvert.DeserializeObject<RB_Topic_Extend>(RequestParm.msg.ToString());
extModel.Status = 0;
extModel.MallBaseId = RequestParm.MallBaseId;
extModel.TenantId = RequestParm.TenantId;
extModel.CreateDate = DateTime.Now;
if (extModel.ComponentDataList != null && extModel.ComponentDataList.Count > 0)
{
extModel.TemplateData = JsonConvert.SerializeObject(extModel.ComponentDataList);
}
var flag = contentModule.SetTopicModule(extModel);
return flag ? ApiResult.Success() : ApiResult.Failed();
}
/// <summary>
/// 获取专题实体
/// </summary>
/// <returns></returns>
public ApiResult GetTopic()
{
JObject parms = JObject.Parse(RequestParm.msg.ToString());
var Id = parms.GetInt("Id", 0);
var extModel = contentModule.GetTopicModule(Id);
return ApiResult.Success(data: extModel);
}
/// <summary>
/// 删除专题
/// </summary>
/// <returns></returns>
public ApiResult RemoveTopic()
{
JObject parms = JObject.Parse(RequestParm.msg.ToString());
var Id = parms.GetInt("Id", 0);
var flag = contentModule.RemoveTopicModule(Id);
return flag ? ApiResult.Success() : ApiResult.Failed();
}
#endregion
#region 门店 #region 门店
/// <summary> /// <summary>
......
...@@ -10,5 +10,6 @@ ...@@ -10,5 +10,6 @@
<WebStackScaffolding_LayoutPageFile /> <WebStackScaffolding_LayoutPageFile />
<WebStackScaffolding_IsAsyncSelected>False</WebStackScaffolding_IsAsyncSelected> <WebStackScaffolding_IsAsyncSelected>False</WebStackScaffolding_IsAsyncSelected>
<NameOfLastUsedPublishProfile>mall.oytour.com</NameOfLastUsedPublishProfile> <NameOfLastUsedPublishProfile>mall.oytour.com</NameOfLastUsedPublishProfile>
<ShowAllFiles>false</ShowAllFiles>
</PropertyGroup> </PropertyGroup>
</Project> </Project>
\ 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