Commit dd6db51b authored by 吴春's avatar 吴春

提交微店设置

parent 73f54d9a
...@@ -248,6 +248,8 @@ namespace Mall.Model.Entity.User ...@@ -248,6 +248,8 @@ namespace Mall.Model.Entity.User
// set; // set;
//} //}
public int Status { get; set; }
/// <summary> /// <summary>
/// 商户号 /// 商户号
/// </summary> /// </summary>
......
using Mall.Model.Entity.User;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Mall.Repository.User
{
public class RB_SmallShops_CustomRepository:BaseRepository<RB_SmallShops_Custom>
{
/// <summary>
/// 表名称
/// </summary>
public string TableName { get { return nameof(RB_SmallShops_Custom); } }
/// <summary>
/// 物料规则列表
/// </summary>
/// <param name="pageIndex">页码</param>
/// <param name="pageSize">每页显示条数</param>
/// <param name="rowCount">总条数</param>
/// <param name="query">查询条件</param>
/// <returns></returns>
public List<RB_SmallShops_Custom> GetPageListRepository(int pageIndex, int pageSize, out long rowCount, RB_SmallShops_Custom query)
{
StringBuilder builder = new StringBuilder();
builder.Append($" SELECT * FROM {TableName} WHERE {nameof(RB_SmallShops_Custom.Status)}=0");
if (query != null)
{
// where += $@" and {nameof(RB_Customer_InfoCreate.CustomerId)}={dmodel.CustomerId}";
if (query.TenantId > 0)
{
builder.Append($" AND {nameof(RB_SmallShops_Custom.TenantId)}={query.TenantId}");
}
if (query.TenantId > 0)
{
builder.Append($" AND {nameof(RB_SmallShops_Custom.MallBaseId)}={query.MallBaseId}");
}
}
return GetPage<RB_SmallShops_Custom>(pageIndex, pageSize, out rowCount, builder.ToString()).ToList();
}
/// <summary>
/// 物流规则列表
/// </summary>
/// <param name="pageIndex">页码</param>
/// <param name="pageSize">每页显示条数</param>
/// <param name="rowCount">总条数</param>
/// <param name="query">查询条件</param>
/// <returns></returns>
public List<RB_SmallShops_Custom> GetLogisticsRulesList(RB_SmallShops_Custom query)
{
StringBuilder builder = new StringBuilder();
builder.Append($" SELECT * FROM {TableName} WHERE {nameof(RB_SmallShops_Custom.Status)}=0 ");
if (query != null)
{
if (query.Id > 0)
{
builder.Append($" AND {nameof(RB_SmallShops_Custom.Id)}={query.Id}");
}
if (query.TenantId > 0)
{
builder.Append($" AND {nameof(RB_SmallShops_Custom.TenantId)}={query.TenantId}");
}
if (query.MallBaseId > 0)
{
builder.Append($" AND {nameof(RB_SmallShops_Custom.MallBaseId)}={query.MallBaseId}");
}
}
return Get<RB_SmallShops_Custom>(builder.ToString()).ToList();
}
}
}
...@@ -224,7 +224,7 @@ namespace Mall.WebApi.Controllers.User ...@@ -224,7 +224,7 @@ namespace Mall.WebApi.Controllers.User
#endregion #endregion
var mmodel = programModule.GetMiniProgramModule(new RB_MiniProgram_Extend() { MallBaseId = umodel.MallBaseId }); var mmodel = programModule.GetMiniProgramModule(new RB_MiniProgram_Extend() { MallBaseId = umodel.MallBaseId });
//2020-08-12 Add By:W //2020-08-12 Add By:W
var smallShopsInfoModle = userModule.GetSmallShopsInfoList(new RB_SmallShops_Info_Extend { TenantId = umodel.TenantId, MallBaseId = umodel.MallBaseId, UserId = umodel.Id }).OrderByDescending(x => x.CreateDate).FirstOrDefault(); // var smallShopsInfoModle = userModule.GetSmallShopsInfoList(new RB_SmallShops_Info_Extend { TenantId = umodel.TenantId, MallBaseId = umodel.MallBaseId, UserId = umodel.Id }).OrderByDescending(x => x.CreateDate).FirstOrDefault();
AppletUserInfo appletUserInfo = new AppletUserInfo() AppletUserInfo appletUserInfo = new AppletUserInfo()
{ {
...@@ -240,7 +240,7 @@ namespace Mall.WebApi.Controllers.User ...@@ -240,7 +240,7 @@ namespace Mall.WebApi.Controllers.User
SecretKey = umodel.SecretKey, SecretKey = umodel.SecretKey,
SuperiorId = umodel.SuperiorId ?? 0, SuperiorId = umodel.SuperiorId ?? 0,
Token = token, Token = token,
SmallShopId = (smallShopsInfoModle != null && smallShopsInfoModle.AuditStatus == DistributorAuditStatusEnum.Audited) ? smallShopsInfoModle.Id : 0 SmallShopId =0 //(smallShopsInfoModle != null && smallShopsInfoModle.AuditStatus == DistributorAuditStatusEnum.Audited) ? smallShopsInfoModle.Id : 0
}; };
UserReidsCache.AppletUserInfoSet(UserModuleCacheKeyConfig.Applet_Login_Info + umodel.Id, appletUserInfo, Config.JwtExpirTime); UserReidsCache.AppletUserInfoSet(UserModuleCacheKeyConfig.Applet_Login_Info + umodel.Id, appletUserInfo, Config.JwtExpirTime);
return ApiResult.CouponSuccess(ResultCode.Fail, "", "", appletUserInfo); return ApiResult.CouponSuccess(ResultCode.Fail, "", "", appletUserInfo);
......
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