Commit d7ee7a30 authored by 黄奎's avatar 黄奎

页面修改

parent 9d5e0257
...@@ -200,7 +200,6 @@ namespace Mall.Module.Miai ...@@ -200,7 +200,6 @@ namespace Mall.Module.Miai
userIds = string.Join(",", list.Select(x => x.UserId).Distinct()); userIds = string.Join(",", list.Select(x => x.UserId).Distinct());
} }
var blist = member_UserRepository.GetMiAiList(new Model.Extend.User.RB_Member_MiaiUser_Extend { TenantId = demodel.TenantId, UserIds = userIds }); var blist = member_UserRepository.GetMiAiList(new Model.Extend.User.RB_Member_MiaiUser_Extend { TenantId = demodel.TenantId, UserIds = userIds });
// var blist = miai_BaseInfoRepository.GetFirstBaseInfoList(new RB_MiAi_BaseInfo_Extend() { TenantId = demodel.TenantId, UserIds = userIds });
foreach (var item in list) foreach (var item in list)
{ {
var bmodel = blist.Where(x => x.Id == (demodel.VsisitorType == 1 ? item.CreateBy : item.UserId)).FirstOrDefault(); var bmodel = blist.Where(x => x.Id == (demodel.VsisitorType == 1 ? item.CreateBy : item.UserId)).FirstOrDefault();
...@@ -701,7 +700,7 @@ namespace Mall.Module.Miai ...@@ -701,7 +700,7 @@ namespace Mall.Module.Miai
/// </summary> /// </summary>
/// <param name="dmodel"></param> /// <param name="dmodel"></param>
/// <returns></returns> /// <returns></returns>
public List<RB_Miai_Activity_Extend> GetMiaiActivityList(RB_Miai_Activity_Extend dmodel, bool IsAll = false) public List<RB_Miai_Activity_Extend> GetMiaiActivityList(RB_Miai_Activity_Extend dmodel)
{ {
var list = miai_ActivityRepository.GetList(dmodel, IsAll: false); var list = miai_ActivityRepository.GetList(dmodel, IsAll: false);
return list; return list;
......
...@@ -1343,7 +1343,7 @@ namespace Mall.Module.Product ...@@ -1343,7 +1343,7 @@ namespace Mall.Module.Product
var goodsModel = goodsRepository.GetEntity(goodsId); var goodsModel = goodsRepository.GetEntity(goodsId);
//商品信息 //商品信息
var info = new object(); object info;
var goodsPoster = miniProgram_GoodPosterRepository.GetEntityExtRepository(new RB_MiniProgram_GoodPoster_Extend() var goodsPoster = miniProgram_GoodPosterRepository.GetEntityExtRepository(new RB_MiniProgram_GoodPoster_Extend()
{ {
MallBaseId = mallBaseId, MallBaseId = mallBaseId,
......
...@@ -116,12 +116,12 @@ namespace Mall.Module.User ...@@ -116,12 +116,12 @@ namespace Mall.Module.User
/// <returns></returns> /// <returns></returns>
public bool SetDefaultGroupModule(int GroupId,int MallBaseId) public bool SetDefaultGroupModule(int GroupId,int MallBaseId)
{ {
bool flag = member_GroupRepository.UpdateIsDefaultRepository(MallBaseId); member_GroupRepository.UpdateIsDefaultRepository(MallBaseId);
Dictionary<string, object> fileds = new Dictionary<string, object>() Dictionary<string, object> fileds = new Dictionary<string, object>()
{ {
{nameof(RB_Member_Group_Extend.IsDefault),1 } {nameof(RB_Member_Group_Extend.IsDefault),1 }
}; };
flag = member_GroupRepository.Update(fileds, new WhereHelper(nameof(RB_Member_Group_Extend.GroupId), GroupId)); bool flag = member_GroupRepository.Update(fileds, new WhereHelper(nameof(RB_Member_Group_Extend.GroupId), GroupId));
return flag; return flag;
} }
......
...@@ -62,7 +62,11 @@ namespace Mall.Repository.Miai ...@@ -62,7 +62,11 @@ namespace Mall.Repository.Miai
public List<RB_MiAi_BaseInfo_Extend> GetBaseInfoPageList(int pageIndex, int pageSize, out long rowsCount, RB_MiAi_BaseInfo_Extend where) public List<RB_MiAi_BaseInfo_Extend> GetBaseInfoPageList(int pageIndex, int pageSize, out long rowsCount, RB_MiAi_BaseInfo_Extend where)
{ {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
sb.Append($@"SELECT a.*,b.`Name`,b.Photo from RB_MiAi_BaseInfo as a LEFT JOIN rb_member_user as b on a.UserId=b.Id where Status=0 and b.Blacklist!=1"); sb.Append($@"
SELECT a.*,b.`Name`,b.Photo
FROM RB_MiAi_BaseInfo as a LEFT JOIN rb_member_user as b on a.UserId=b.Id
WHERE Status=0 and b.Blacklist!=1
");
if (where != null) if (where != null)
{ {
if (where.TenantId > 0) if (where.TenantId > 0)
...@@ -95,100 +99,6 @@ namespace Mall.Repository.Miai ...@@ -95,100 +99,6 @@ namespace Mall.Repository.Miai
} }
/// <summary>
/// 分页列表
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="rowsCount"></param>
/// <param name="where"></param>
/// <returns></returns>
public List<RB_MiAi_BaseInfo_Extend> GetFirstBaseInfoPageList(int pageIndex, int pageSize, out long rowsCount, RB_MiAi_BaseInfo_Extend where)
{
StringBuilder sb = new StringBuilder();
sb.Append($@"
SELECT a.*,b.`Name`,b.Photo,(YEAR (curdate())- YEAR (a.Birthday )- 1+ (DATE_FORMAT(a.Birthday, '%m%d' )<=(DATE_FORMAT( curdate(), '%m%d' )))) Age
FROM RB_MiAi_BaseInfo as a LEFT JOIN rb_member_user as b on a.UserId=b.Id
WHERE a.Status=0 AND b.Blacklist!=1 ");
//HK 2021-10-28 新增
sb.Append(" AND b.IsShow=1 ");
List<int> groupIdList = new List<int>();
if (!string.IsNullOrEmpty(where.UserGroupIds))
{
groupIdList = member_GroupRepository.GetLookGroupIdsRepository(new Model.Extend.User.RB_Member_Group_Extend()
{
TenantId = where.TenantId ?? 0,
MallBaseId = where.MallBaseId ?? 0,
Q_GroupIds = where.UserGroupIds,
});
}
if (where != null)
{
if (groupIdList != null && groupIdList.Count > 0)
{
string tempStr = "";
for (var i = 0; i < groupIdList.Count; i++)
{
if (i > 0)
{
tempStr += " OR ";
}
tempStr += string.Join(" FIND_IN_SET('{0}',b.BelongGroupIds) ", groupIdList[i]);
}
if (!string.IsNullOrEmpty(tempStr))
{
sb.AppendFormat(" and ({0})", tempStr);
}
}
if (where.TenantId > 0)
{
sb.AppendFormat(" and a.TenantId={0}", where.TenantId);
}
if (where.MallBaseId > 0)
{
sb.AppendFormat(" and a.MallBaseId={0}", where.MallBaseId);
}
if (where.Id > 0)
{
sb.AppendFormat(" and a.Id={0}", where.Id);
}
if (where.UserId > 0)
{
sb.AppendFormat(" and a.UserId !={0}", where.UserId);
}
if (where.Sex > 0)
{
sb.AppendFormat(" and a.Sex !={0}", where.Sex);
}
if (!string.IsNullOrWhiteSpace(where.UserIds))
{
sb.AppendFormat(" and a.UserId in({0})", where.UserIds);
}
if (where.Sort == 1)
{
// sb.AppendFormat(" order by ");
}
else if (where.Sort == 2)
{
sb.AppendFormat($@" ORDER BY (((a.FollowNum* {where.FollowRate})+(a.BrowseNum*{where.BrowseRate}))) desc");
}
else if (where.Sort == 3)
{
sb.AppendFormat(" ORDER BY b.CreateDate desc ");
}
}
return GetPage<RB_MiAi_BaseInfo_Extend>(pageIndex, pageSize, out rowsCount, sb.ToString()).ToList();
}
/// <summary> /// <summary>
/// 分页列表 /// 分页列表
/// </summary> /// </summary>
...@@ -289,6 +199,52 @@ LEFT JOIN rb_member_user as b on c.UserId=b.Id where c.Status=0 and b.Blacklist ...@@ -289,6 +199,52 @@ LEFT JOIN rb_member_user as b on c.UserId=b.Id where c.Status=0 and b.Blacklist
return GetPage<RB_MiAi_BaseInfo_Extend>(pageIndex, pageSize, out rowsCount, sb.ToString()).ToList(); return GetPage<RB_MiAi_BaseInfo_Extend>(pageIndex, pageSize, out rowsCount, sb.ToString()).ToList();
} }
/// <summary>
/// 获取每日随机基础信息
/// </summary>
/// <param name="where"></param>
/// <param name="Top"></param>
/// <returns></returns>
public List<RB_MiAi_BaseInfo_Extend> GetDailyRandomList(RB_MiaiMember_Extend where, int Top)
{
StringBuilder sb = new StringBuilder();
sb.Append($@" SELECT * FROM rb_miai_baseinfo as a where a.`Status`=0 ");
if (where != null)
{
if (where.TenantId > 0)
{
sb.AppendFormat(" and a.TenantId={0}", where.TenantId);
}
if (where.MallBaseId > 0)
{
sb.AppendFormat(" and a.MallBaseId={0}", where.MallBaseId);
}
if (where.Id > 0)
{
sb.AppendFormat(" and a.Id={0}", where.Id);
}
if (where.UserId > 0)
{
sb.AppendFormat(" and a.UserId!={0}", where.UserId);
}
if (where.Sex > 0)
{
sb.AppendFormat(" and a.Sex ={0}", where.Sex);
}
if (!string.IsNullOrWhiteSpace(where.UserIds))
{
sb.AppendFormat(" and a.UserId in({0})", where.UserIds);
}
}
sb.AppendFormat($@" ORDER BY RAND() LIMIT {Top}");
return Get<RB_MiAi_BaseInfo_Extend>(sb.ToString()).ToList();
}
/// <summary> /// <summary>
/// 分页列表 /// 分页列表
/// </summary> /// </summary>
...@@ -309,11 +265,11 @@ WHERE a.Status=0 and b.Blacklist!=1 "); ...@@ -309,11 +265,11 @@ WHERE a.Status=0 and b.Blacklist!=1 ");
List<int> groupIdList = new List<int>(); List<int> groupIdList = new List<int>();
if (!string.IsNullOrEmpty(where.UserGroupIds)) if (!string.IsNullOrEmpty(where.UserGroupIds))
{ {
groupIdList= member_GroupRepository.GetLookGroupIdsRepository(new Model.Extend.User.RB_Member_Group_Extend() groupIdList = member_GroupRepository.GetLookGroupIdsRepository(new Model.Extend.User.RB_Member_Group_Extend()
{ {
TenantId = where.TenantId ?? 0, TenantId = where.TenantId ?? 0,
MallBaseId = where.MallBaseId ?? 0, MallBaseId = where.MallBaseId ?? 0,
Q_GroupIds=where.UserGroupIds, Q_GroupIds = where.UserGroupIds,
}); });
} }
if (where != null) if (where != null)
...@@ -376,6 +332,95 @@ WHERE a.Status=0 and b.Blacklist!=1 "); ...@@ -376,6 +332,95 @@ WHERE a.Status=0 and b.Blacklist!=1 ");
return Get<RB_MiAi_BaseInfo_Extend>(sb.ToString()).ToList(); return Get<RB_MiAi_BaseInfo_Extend>(sb.ToString()).ToList();
} }
/// <summary>
/// 分页列表
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="rowsCount"></param>
/// <param name="where"></param>
/// <returns></returns>
public List<RB_MiAi_BaseInfo_Extend> GetFirstBaseInfoPageList(int pageIndex, int pageSize, out long rowsCount, RB_MiAi_BaseInfo_Extend where)
{
StringBuilder sb = new StringBuilder();
sb.Append($@"
SELECT a.*,b.`Name`,b.Photo,(YEAR (curdate())- YEAR (a.Birthday )- 1+ (DATE_FORMAT(a.Birthday, '%m%d' )<=(DATE_FORMAT( curdate(), '%m%d' )))) Age
FROM RB_MiAi_BaseInfo as a LEFT JOIN rb_member_user as b on a.UserId=b.Id
WHERE a.Status=0 AND b.Blacklist!=1 ");
//HK 2021-10-28 新增
sb.Append(" AND b.IsShow=1 ");
List<int> groupIdList = new List<int>();
if (!string.IsNullOrEmpty(where.UserGroupIds))
{
groupIdList = member_GroupRepository.GetLookGroupIdsRepository(new Model.Extend.User.RB_Member_Group_Extend()
{
TenantId = where.TenantId ?? 0,
MallBaseId = where.MallBaseId ?? 0,
Q_GroupIds = where.UserGroupIds,
});
}
if (where != null)
{
if (groupIdList != null && groupIdList.Count > 0)
{
string tempStr = "";
for (var i = 0; i < groupIdList.Count; i++)
{
if (i > 0)
{
tempStr += " OR ";
}
tempStr += string.Join(" FIND_IN_SET('{0}',b.BelongGroupIds) ", groupIdList[i]);
}
if (!string.IsNullOrEmpty(tempStr))
{
sb.AppendFormat(" and ({0})", tempStr);
}
}
if (where.TenantId > 0)
{
sb.AppendFormat(" and a.TenantId={0}", where.TenantId);
}
if (where.MallBaseId > 0)
{
sb.AppendFormat(" and a.MallBaseId={0}", where.MallBaseId);
}
if (where.Id > 0)
{
sb.AppendFormat(" and a.Id={0}", where.Id);
}
if (where.UserId > 0)
{
sb.AppendFormat(" and a.UserId !={0}", where.UserId);
}
if (where.Sex > 0)
{
sb.AppendFormat(" and a.Sex !={0}", where.Sex);
}
if (!string.IsNullOrWhiteSpace(where.UserIds))
{
sb.AppendFormat(" and a.UserId in({0})", where.UserIds);
}
if (where.Sort == 1)
{
// sb.AppendFormat(" order by ");
}
else if (where.Sort == 2)
{
sb.AppendFormat($@" ORDER BY (((a.FollowNum* {where.FollowRate})+(a.BrowseNum*{where.BrowseRate}))) desc");
}
else if (where.Sort == 3)
{
sb.AppendFormat(" ORDER BY b.CreateDate desc ");
}
}
return GetPage<RB_MiAi_BaseInfo_Extend>(pageIndex, pageSize, out rowsCount, sb.ToString()).ToList();
}
/// <summary> /// <summary>
/// 首页插件匹配分页列表 /// 首页插件匹配分页列表
/// </summary> /// </summary>
...@@ -388,14 +433,45 @@ WHERE a.Status=0 and b.Blacklist!=1 "); ...@@ -388,14 +433,45 @@ WHERE a.Status=0 and b.Blacklist!=1 ");
{ {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
sb.Append($@" sb.Append($@"
SELECT * from ( SELECT *
SELECT a. *,b.`Name`,b.Photo ,(YEAR (curdate())- YEAR ( a.Birthday )- 1+ (DATE_FORMAT( a.Birthday, '%m%d' )<=(DATE_FORMAT( curdate(), '%m%d' )))) Age FROM
FROM `RB_MiAi_BaseInfo` AS a LEFT JOIN rb_member_user as b on a.UserId=b.Id (
WHERE a.Status=0 and b.Blacklist!=1 SELECT a.*,b.`Name`,b.Photo,b.BelongGroupIds,b.IsShow,(YEAR (curdate())- YEAR ( a.Birthday )- 1+ (DATE_FORMAT( a.Birthday, '%m%d' )<=(DATE_FORMAT( curdate(), '%m%d' )))) Age
) as a FROM `RB_MiAi_BaseInfo` AS a LEFT JOIN rb_member_user as b on a.UserId=b.Id
where 1=1"); WHERE a.Status=0 and b.Blacklist!=1
) as a
WHERE 1=1");
//HK 2021-10-28 新增
sb.Append(" and a.IsShow=1 ");
List<int> groupIdList = new List<int>();
if (!string.IsNullOrEmpty(where.UserGroupIds))
{
groupIdList = member_GroupRepository.GetLookGroupIdsRepository(new Model.Extend.User.RB_Member_Group_Extend()
{
TenantId = where.TenantId ?? 0,
MallBaseId = where.MallBaseId ?? 0,
Q_GroupIds = where.UserGroupIds,
});
}
if (where != null) if (where != null)
{ {
if (groupIdList != null && groupIdList.Count > 0)
{
string tempStr = "";
for (var i = 0; i < groupIdList.Count; i++)
{
if (i > 0)
{
tempStr += " OR ";
}
tempStr += string.Join(" FIND_IN_SET('{0}',a.BelongGroupIds) ", groupIdList[i]);
}
if (!string.IsNullOrEmpty(tempStr))
{
sb.AppendFormat(" and ({0})", tempStr);
}
}
if (where.TenantId > 0) if (where.TenantId > 0)
{ {
sb.AppendFormat(" and a.TenantId={0}", where.TenantId); sb.AppendFormat(" and a.TenantId={0}", where.TenantId);
...@@ -476,49 +552,7 @@ where 1=1"); ...@@ -476,49 +552,7 @@ where 1=1");
} }
sb.AppendFormat($@" ORDER BY a.id LIMIT {Top}"); sb.AppendFormat($@" ORDER BY a.id LIMIT {Top}");
return Get<RB_MiAi_BaseInfo_Extend>(sb.ToString()).ToList();
}
/// <summary>
/// 获取每日随机基础信息
/// </summary>
/// <param name="where"></param>
/// <param name="Top"></param>
/// <returns></returns>
public List<RB_MiAi_BaseInfo_Extend> GetDailyRandomList(RB_MiaiMember_Extend where, int Top)
{
StringBuilder sb = new StringBuilder();
sb.Append($@" SELECT * FROM rb_miai_baseinfo as a where a.`Status`=0 ");
if (where != null)
{
if (where.TenantId > 0)
{
sb.AppendFormat(" and a.TenantId={0}", where.TenantId);
}
if (where.MallBaseId > 0)
{
sb.AppendFormat(" and a.MallBaseId={0}", where.MallBaseId);
}
if (where.Id > 0)
{
sb.AppendFormat(" and a.Id={0}", where.Id);
}
if (where.UserId > 0)
{
sb.AppendFormat(" and a.UserId!={0}", where.UserId);
}
if (where.Sex > 0)
{
sb.AppendFormat(" and a.Sex ={0}", where.Sex);
}
if (!string.IsNullOrWhiteSpace(where.UserIds))
{
sb.AppendFormat(" and a.UserId in({0})", where.UserIds);
}
}
sb.AppendFormat($@" ORDER BY RAND() LIMIT {Top}");
return Get<RB_MiAi_BaseInfo_Extend>(sb.ToString()).ToList(); return Get<RB_MiAi_BaseInfo_Extend>(sb.ToString()).ToList();
} }
......
...@@ -768,7 +768,7 @@ WHERE u.TenantId={tenantId} and u.MallBaseId={mallBaseId} and u.SuperiorId ={uid ...@@ -768,7 +768,7 @@ WHERE u.TenantId={tenantId} and u.MallBaseId={mallBaseId} and u.SuperiorId ={uid
/// <returns></returns> /// <returns></returns>
public List<RB_Member_User_Extend> AutoReleaseTheOffline(int tenantId, int mallBaseId) public List<RB_Member_User_Extend> AutoReleaseTheOffline(int tenantId, int mallBaseId)
{ {
string sql = $@"SELECT * FROM rb_member_user WHERE DownlineCondition=4 and IsDistributor = 0 and SuperiorId >0 AND DATE_ADD(CreateDate,INTERVAL 7 DAY) < '{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}'"; string sql = $@"SELECT * FROM rb_member_user WHERE DownlineCondition=4 and IsDistributor = 0 and SuperiorId >0 AND DATE_ADD(CreateDate,INTERVAL 7 DAY) < '{Common.ConvertHelper.FormatTime(DateTime.Now)}'";
return Get<RB_Member_User_Extend>(sql).ToList(); return Get<RB_Member_User_Extend>(sql).ToList();
} }
......
...@@ -1757,7 +1757,7 @@ namespace Mall.WebApi.Controllers ...@@ -1757,7 +1757,7 @@ namespace Mall.WebApi.Controllers
MallBaseId = MallBaseId, MallBaseId = MallBaseId,
ActivityIds = Ids, ActivityIds = Ids,
OrderBy = 1 OrderBy = 1
}, IsAll: false); });
//判断用户是否点赞 //判断用户是否点赞
List<RB_MiAi_DianZan_Extend> dianZanList = new List<RB_MiAi_DianZan_Extend>(); List<RB_MiAi_DianZan_Extend> dianZanList = new List<RB_MiAi_DianZan_Extend>();
...@@ -1809,7 +1809,7 @@ namespace Mall.WebApi.Controllers ...@@ -1809,7 +1809,7 @@ namespace Mall.WebApi.Controllers
MallBaseId = MallBaseId, MallBaseId = MallBaseId,
ActivityIds = Ids, ActivityIds = Ids,
OrderBy = 1 OrderBy = 1
}, IsAll: false); });
//判断用户是否点赞 //判断用户是否点赞
List<RB_MiAi_DianZan_Extend> dianZanList = new List<RB_MiAi_DianZan_Extend>(); List<RB_MiAi_DianZan_Extend> dianZanList = new List<RB_MiAi_DianZan_Extend>();
if (UserId > 0) if (UserId > 0)
...@@ -3285,8 +3285,7 @@ namespace Mall.WebApi.Controllers ...@@ -3285,8 +3285,7 @@ namespace Mall.WebApi.Controllers
} }
} }
} }
//商城风格
var mallStyle = new object();
ResultMallShopStyle resultMallShopStyle = new ResultMallShopStyle(); ResultMallShopStyle resultMallShopStyle = new ResultMallShopStyle();
switch (miniProgram.MallShopStyle) switch (miniProgram.MallShopStyle)
...@@ -3325,7 +3324,8 @@ namespace Mall.WebApi.Controllers ...@@ -3325,7 +3324,8 @@ namespace Mall.WebApi.Controllers
resultMallShopStyle = new ResultMallShopStyle() { main = "#00d6a6", secondary = "#ffc86d", IsEducation = 1 }; resultMallShopStyle = new ResultMallShopStyle() { main = "#00d6a6", secondary = "#ffc86d", IsEducation = 1 };
break; break;
} }
mallStyle = new //商城风格
var mallStyle = new
{ {
resultMallShopStyle?.main, resultMallShopStyle?.main,
resultMallShopStyle?.secondary, resultMallShopStyle?.secondary,
......
...@@ -22,10 +22,16 @@ namespace Mall.WebApi.Controllers.MallBase ...@@ -22,10 +22,16 @@ namespace Mall.WebApi.Controllers.MallBase
[EnableCors("AllowCors")] [EnableCors("AllowCors")]
public class MallBaseController : BaseController public class MallBaseController : BaseController
{ {
/// <summary>
/// 商城基础配置处理类对象
/// </summary>
private readonly MallBaseModule mallBaseModule = new MallBaseModule();
/// <summary>
/// 小程序处理类对象
/// </summary>
private readonly MiniProgramModule miniProgramModule = new MiniProgramModule();
private MallBaseModule mallBaseModule = new MallBaseModule();
private TenantModule TenantModule = new TenantModule();
private MiniProgramModule miniProgramModule = new MiniProgramModule();
#region 基础设置 #region 基础设置
[HttpPost] [HttpPost]
public ApiResult AddOrUpdateMallBase() public ApiResult AddOrUpdateMallBase()
...@@ -64,9 +70,11 @@ namespace Mall.WebApi.Controllers.MallBase ...@@ -64,9 +70,11 @@ namespace Mall.WebApi.Controllers.MallBase
public ApiResult GetMallBaseInfo() public ApiResult GetMallBaseInfo()
{ {
var parms = RequestParm; var parms = RequestParm;
var query = new RB_MallBase_Extend(); var query = new RB_MallBase_Extend
query.TenantId = UserInfo.TenantId; {
query.MallBaseId = parms.MallBaseId; TenantId = UserInfo.TenantId,
MallBaseId = parms.MallBaseId
};
var model = mallBaseModule.GetListRepository(query).FirstOrDefault(); var model = mallBaseModule.GetListRepository(query).FirstOrDefault();
//获取小程序的商城名称 //获取小程序的商城名称
var miniProgramModel = miniProgramModule.GetMiniProgramModule(new Model.Extend.User.RB_MiniProgram_Extend { TenantId = query.TenantId, MallBaseId = query.MallBaseId }); var miniProgramModel = miniProgramModule.GetMiniProgramModule(new Model.Extend.User.RB_MiniProgram_Extend { TenantId = query.TenantId, MallBaseId = query.MallBaseId });
...@@ -96,8 +104,10 @@ namespace Mall.WebApi.Controllers.MallBase ...@@ -96,8 +104,10 @@ namespace Mall.WebApi.Controllers.MallBase
var oldLogisticsModel = mallBaseModule.GetLogisticsList(query).FirstOrDefault(); var oldLogisticsModel = mallBaseModule.GetLogisticsList(query).FirstOrDefault();
if (oldLogisticsModel == null) if (oldLogisticsModel == null)
{ {
oldLogisticsModel = new RB_Logistics(); oldLogisticsModel = new RB_Logistics
oldLogisticsModel.LogisticsType = Common.Enum.MallBase.LogisticsTypeEnum.ExpressBird; {
LogisticsType = Common.Enum.MallBase.LogisticsTypeEnum.ExpressBird
};
} }
return ApiResult.Success("", oldLogisticsModel); return ApiResult.Success("", oldLogisticsModel);
} }
...@@ -109,9 +119,7 @@ namespace Mall.WebApi.Controllers.MallBase ...@@ -109,9 +119,7 @@ namespace Mall.WebApi.Controllers.MallBase
[HttpPost] [HttpPost]
public ApiResult AddOrUpdateLogistics() public ApiResult AddOrUpdateLogistics()
{ {
var parms = RequestParm;
var query = JsonConvert.DeserializeObject<RB_Logistics>(RequestParm.msg.ToString()); var query = JsonConvert.DeserializeObject<RB_Logistics>(RequestParm.msg.ToString());
if (query == null) if (query == null)
{ {
return ApiResult.Failed("请传入物流基础信息"); return ApiResult.Failed("请传入物流基础信息");
...@@ -132,8 +140,6 @@ namespace Mall.WebApi.Controllers.MallBase ...@@ -132,8 +140,6 @@ namespace Mall.WebApi.Controllers.MallBase
} }
} }
/// <summary> /// <summary>
/// 获取用户下载枚举列表 /// 获取用户下载枚举列表
/// </summary> /// </summary>
...@@ -420,10 +426,12 @@ namespace Mall.WebApi.Controllers.MallBase ...@@ -420,10 +426,12 @@ namespace Mall.WebApi.Controllers.MallBase
public ApiResult GetMinPriceInfo() public ApiResult GetMinPriceInfo()
{ {
var parms = RequestParm; var parms = RequestParm;
var query = new RB_Logistics_Rules_Extend(); var query = new RB_Logistics_Rules_Extend
query.TenantId = UserInfo.TenantId; {
query.MallBaseId = parms.MallBaseId; TenantId = UserInfo.TenantId,
query.RulesType = Common.Enum.MallBase.RulesTypeEnum.OpenMinPrice; MallBaseId = parms.MallBaseId,
RulesType = Common.Enum.MallBase.RulesTypeEnum.OpenMinPrice
};
var model = mallBaseModule.GetLogisticsRulesModel(query); var model = mallBaseModule.GetLogisticsRulesModel(query);
return ApiResult.Success("获取成功", model); return ApiResult.Success("获取成功", model);
} }
...@@ -636,10 +644,12 @@ namespace Mall.WebApi.Controllers.MallBase ...@@ -636,10 +644,12 @@ namespace Mall.WebApi.Controllers.MallBase
public ApiResult GetAreaBuyInfo() public ApiResult GetAreaBuyInfo()
{ {
var parms = RequestParm; var parms = RequestParm;
var query = new RB_Logistics_Rules_Extend(); var query = new RB_Logistics_Rules_Extend
query.TenantId = UserInfo.TenantId; {
query.MallBaseId = parms.MallBaseId; TenantId = UserInfo.TenantId,
query.RulesType = Common.Enum.MallBase.RulesTypeEnum.AreaBuy; MallBaseId = parms.MallBaseId,
RulesType = Common.Enum.MallBase.RulesTypeEnum.AreaBuy
};
var model = mallBaseModule.GetPinkageModel(query); var model = mallBaseModule.GetPinkageModel(query);
return ApiResult.Success("获取成功", model); return ApiResult.Success("获取成功", model);
} }
...@@ -872,11 +882,12 @@ namespace Mall.WebApi.Controllers.MallBase ...@@ -872,11 +882,12 @@ namespace Mall.WebApi.Controllers.MallBase
public ApiResult GetFileStoreList() public ApiResult GetFileStoreList()
{ {
var parms = RequestParm; var parms = RequestParm;
var query = new RB_File_Store(); var query = new RB_File_Store
query.TenantId = UserInfo.TenantId; {
query.MallBaseId = parms.MallBaseId; TenantId = UserInfo.TenantId,
MallBaseId = parms.MallBaseId
};
var list = mallBaseModule.GetFileStoreList(query); var list = mallBaseModule.GetFileStoreList(query);
return ApiResult.Success("获取成功", list); return ApiResult.Success("获取成功", list);
} }
...@@ -929,9 +940,11 @@ namespace Mall.WebApi.Controllers.MallBase ...@@ -929,9 +940,11 @@ namespace Mall.WebApi.Controllers.MallBase
public ApiResult GetFileStoreDetail() public ApiResult GetFileStoreDetail()
{ {
var parms = RequestParm; var parms = RequestParm;
var query = new RB_File_Store(); var query = new RB_File_Store
query.TenantId = UserInfo.TenantId; {
query.MallBaseId = parms.MallBaseId; TenantId = UserInfo.TenantId,
MallBaseId = parms.MallBaseId
};
var model = mallBaseModule.GetFileStoreList(query).FirstOrDefault(); var model = mallBaseModule.GetFileStoreList(query).FirstOrDefault();
if (model == null) if (model == null)
{ {
...@@ -940,8 +953,6 @@ namespace Mall.WebApi.Controllers.MallBase ...@@ -940,8 +953,6 @@ namespace Mall.WebApi.Controllers.MallBase
return ApiResult.Success("获取成功", model); return ApiResult.Success("获取成功", model);
} }
/// <summary> /// <summary>
/// 获取触发事件枚举 /// 获取触发事件枚举
/// </summary> /// </summary>
...@@ -964,9 +975,11 @@ namespace Mall.WebApi.Controllers.MallBase ...@@ -964,9 +975,11 @@ namespace Mall.WebApi.Controllers.MallBase
public ApiResult GetDefaultFileStore() public ApiResult GetDefaultFileStore()
{ {
var parms = RequestParm; var parms = RequestParm;
var query = new RB_File_Store(); var query = new RB_File_Store
query.TenantId = UserInfo.TenantId; {
query.MallBaseId = parms.MallBaseId; TenantId = UserInfo.TenantId,
MallBaseId = parms.MallBaseId
};
var model = mallBaseModule.GetFileStoreList(query).Where(x=>x.IsDefault==1).FirstOrDefault(); var model = mallBaseModule.GetFileStoreList(query).Where(x=>x.IsDefault==1).FirstOrDefault();
if (model == null) if (model == null)
{ {
...@@ -1114,7 +1127,6 @@ namespace Mall.WebApi.Controllers.MallBase ...@@ -1114,7 +1127,6 @@ namespace Mall.WebApi.Controllers.MallBase
/// <returns></returns> /// <returns></returns>
public ApiResult AddOrUpdateIsFreeShipping() public ApiResult AddOrUpdateIsFreeShipping()
{ {
var parms = RequestParm;
JObject parmsJob = JObject.Parse(RequestParm.msg.ToString()); JObject parmsJob = JObject.Parse(RequestParm.msg.ToString());
int Id = parmsJob.GetInt("Id", 0); int Id = parmsJob.GetInt("Id", 0);
int IsFreeShipping = parmsJob.GetInt("IsFreeShipping", 0); int IsFreeShipping = parmsJob.GetInt("IsFreeShipping", 0);
...@@ -1134,14 +1146,12 @@ namespace Mall.WebApi.Controllers.MallBase ...@@ -1134,14 +1146,12 @@ namespace Mall.WebApi.Controllers.MallBase
} }
/// <summary> /// <summary>
/// 保存是否启用 /// 保存是否启用
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
public ApiResult AddOrUpdateIsEnable() public ApiResult AddOrUpdateIsEnable()
{ {
var parms = RequestParm;
JObject parmsJob = JObject.Parse(RequestParm.msg.ToString()); JObject parmsJob = JObject.Parse(RequestParm.msg.ToString());
int Id = parmsJob.GetInt("Id", 0); int Id = parmsJob.GetInt("Id", 0);
int IsFreeShipping = parmsJob.GetInt("IsEnable", 0); int IsFreeShipping = parmsJob.GetInt("IsEnable", 0);
...@@ -1216,9 +1226,11 @@ namespace Mall.WebApi.Controllers.MallBase ...@@ -1216,9 +1226,11 @@ namespace Mall.WebApi.Controllers.MallBase
public ApiResult GetMicroShopBasicsInfo() public ApiResult GetMicroShopBasicsInfo()
{ {
var parms = RequestParm; var parms = RequestParm;
var query = new RB_MicroShop_Basics(); var query = new RB_MicroShop_Basics
query.TenantId = UserInfo.TenantId; {
query.MallBaseId = parms.MallBaseId; TenantId = UserInfo.TenantId,
MallBaseId = parms.MallBaseId
};
//获取小程序的商城名称 //获取小程序的商城名称
var microShopBasics = mallBaseModule.GetMicroShopBasicsList(new RB_MicroShop_Basics { TenantId = query.TenantId, MallBaseId = query.MallBaseId }).FirstOrDefault(); var microShopBasics = mallBaseModule.GetMicroShopBasicsList(new RB_MicroShop_Basics { TenantId = query.TenantId, MallBaseId = query.MallBaseId }).FirstOrDefault();
if (microShopBasics == null) if (microShopBasics == null)
...@@ -1238,11 +1250,12 @@ namespace Mall.WebApi.Controllers.MallBase ...@@ -1238,11 +1250,12 @@ namespace Mall.WebApi.Controllers.MallBase
public ApiResult GetExpressConfigList() public ApiResult GetExpressConfigList()
{ {
var parms = RequestParm; var parms = RequestParm;
var query = new RB_Express_Config(); var query = new RB_Express_Config
query.TenantId = parms.TenantId; {
query.MallBaseId = parms.MallBaseId; TenantId = parms.TenantId,
MallBaseId = parms.MallBaseId
};
var list = mallBaseModule.GetExpressConfigList(query); var list = mallBaseModule.GetExpressConfigList(query);
return ApiResult.Success("获取成功", list.Select(x => new return ApiResult.Success("获取成功", list.Select(x => new
{ {
x.Id, x.Id,
...@@ -1308,11 +1321,12 @@ namespace Mall.WebApi.Controllers.MallBase ...@@ -1308,11 +1321,12 @@ namespace Mall.WebApi.Controllers.MallBase
public ApiResult GetVideoStoreList() public ApiResult GetVideoStoreList()
{ {
var parms = RequestParm; var parms = RequestParm;
var query = new RB_Video_Store(); var query = new RB_Video_Store
query.TenantId = UserInfo.TenantId; {
query.MallBaseId = parms.MallBaseId; TenantId = UserInfo.TenantId,
MallBaseId = parms.MallBaseId
};
var list = mallBaseModule.GetVideoStoreList(query); var list = mallBaseModule.GetVideoStoreList(query);
return ApiResult.Success("获取成功", list); return ApiResult.Success("获取成功", list);
} }
...@@ -1365,9 +1379,11 @@ namespace Mall.WebApi.Controllers.MallBase ...@@ -1365,9 +1379,11 @@ namespace Mall.WebApi.Controllers.MallBase
public ApiResult GetVideoStoreDetail() public ApiResult GetVideoStoreDetail()
{ {
var parms = RequestParm; var parms = RequestParm;
var query = new RB_Video_Store(); var query = new RB_Video_Store
query.TenantId = UserInfo.TenantId; {
query.MallBaseId = parms.MallBaseId; TenantId = UserInfo.TenantId,
MallBaseId = parms.MallBaseId
};
var model = mallBaseModule.GetVideoStoreList(query).FirstOrDefault(); var model = mallBaseModule.GetVideoStoreList(query).FirstOrDefault();
if (model == null) if (model == null)
{ {
...@@ -1376,9 +1392,6 @@ namespace Mall.WebApi.Controllers.MallBase ...@@ -1376,9 +1392,6 @@ namespace Mall.WebApi.Controllers.MallBase
return ApiResult.Success("获取成功", model); return ApiResult.Success("获取成功", model);
} }
/// <summary> /// <summary>
/// 获取默认上传信息的详情 /// 获取默认上传信息的详情
/// </summary> /// </summary>
...@@ -1386,9 +1399,11 @@ namespace Mall.WebApi.Controllers.MallBase ...@@ -1386,9 +1399,11 @@ namespace Mall.WebApi.Controllers.MallBase
public ApiResult GetDefaultVideoStore() public ApiResult GetDefaultVideoStore()
{ {
var parms = RequestParm; var parms = RequestParm;
var query = new RB_Video_Store(); var query = new RB_Video_Store
query.TenantId = UserInfo.TenantId; {
query.MallBaseId = parms.MallBaseId; TenantId = UserInfo.TenantId,
MallBaseId = parms.MallBaseId
};
var model = mallBaseModule.GetVideoStoreList(query).Where(x => x.IsDefault == 1).FirstOrDefault(); var model = mallBaseModule.GetVideoStoreList(query).Where(x => x.IsDefault == 1).FirstOrDefault();
if (model == null) if (model == null)
{ {
......
...@@ -1410,7 +1410,7 @@ namespace Mall.WebApi.Controllers.MallBase ...@@ -1410,7 +1410,7 @@ namespace Mall.WebApi.Controllers.MallBase
IsFollow = isFollow, IsFollow = isFollow,
SexStr = (oldBaseInfo != null && oldBaseInfo.Id > 0) ? (oldBaseInfo.Sex == 1 ? "男" : "女") : "", SexStr = (oldBaseInfo != null && oldBaseInfo.Id > 0) ? (oldBaseInfo.Sex == 1 ? "男" : "女") : "",
Birthday = oldBaseInfo.Birthday ?? "", Birthday = oldBaseInfo.Birthday ?? "",
BirthdayYear = BirthdayYear, BirthdayYear,
Sex = oldBaseInfo?.Sex ?? 0, Sex = oldBaseInfo?.Sex ?? 0,
oldBaseInfo?.Height, oldBaseInfo?.Height,
oldBaseInfo?.Weight, oldBaseInfo?.Weight,
......
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