Commit 2ebb16f4 authored by 吴春's avatar 吴春

提交代码

parent 88aa08a7
......@@ -48,7 +48,7 @@ namespace Mall.Common
set;
}
/// <summary>
/// 姓名/企业名称
/// </summary>
......@@ -137,6 +137,11 @@ namespace Mall.Common
/// </summary>
public int EmpId { get; set; }
/// <summary>
/// 修改他人商品角色权限
/// </summary>
public int IsOtherUpdateGoods { get; set; }
public string erptoken { get; set; }
/// <summary>
......
......@@ -611,5 +611,37 @@ namespace Mall.Model.Entity.Product
/// 商品Logo
/// </summary>
public string goodsLogo { get; set; }
/// <summary>
/// 分销平台,0-否,1-是
/// </summary>
public int RetailStore { get; set; }
/// <summary>
/// 源数据商品id
/// </summary>
public int SourceGoodsId { get; set; }
/// <summary>
/// 源数据商户号
/// </summary>
public int SourceTenantId
{
get;
set;
}
/// <summary>
/// 源数据小程序id
/// </summary>
public int SourceMallBaseId
{
get;
set;
}
/// <summary>
/// 创建人
/// </summary>
public int CreateBy { get; set; }
}
}
......@@ -44,5 +44,10 @@ namespace Mall.Model.Extend.User
/// 当前登录员工编号
/// </summary>
public int EmpId { get; set; }
/// <summary>
/// 权限
/// </summary>
public string RoleAuth { get; set; }
}
}
......@@ -3432,6 +3432,10 @@ namespace Mall.Module.Product
else
{
string simage = goods_SpecificationValueRepository.GetSpecificationImage(item.GoodsId ?? 0, item.SpecificationSort);
if (!string.IsNullOrEmpty(simage))
{
item.CoverImage = simage;//规格图片赋值
}
}
#endregion
......
This diff is collapsed.
......@@ -50,6 +50,10 @@ namespace Mall.Repository.Product
{
where += $@" and g.{nameof(RB_Goods_Extend.MallBaseId)}={dmodel.MallBaseId}";
}
if (dmodel.RetailStore > -1)
{
where += $@" and g.{nameof(RB_Goods_Extend.RetailStore)}={dmodel.RetailStore}";
}
if (!string.IsNullOrEmpty(dmodel.StoresIds))
{
where += $@" and FIND_IN_SET('{dmodel.StoresIds}',g.{nameof(RB_Goods_Extend.StoresIds)})";
......@@ -99,7 +103,8 @@ namespace Mall.Repository.Product
{
where += $@" and g.{nameof(RB_Goods_Extend.SupplierId)}={dmodel.SupplierId}";
}
if (dmodel.MinProfitRate > 0) {
if (dmodel.MinProfitRate > 0)
{
where += $@" and g.{nameof(RB_Goods_Extend.MinProfitRate)} <{dmodel.MinProfitRate}";
}
if (dmodel.GoodsPageType.HasValue)
......
......@@ -59,12 +59,12 @@ namespace Mall.Repository.User
StringBuilder builder1 = new StringBuilder();
builder1.AppendFormat(@"
SELECT A.TenantId,A.Account AS Account,A.Name,A.MobilePhone,A.WeChatNum,A.IsEffective,A.AccountValidate,A.CreateMiniPrograme
,A.AccountStatus,A.`Password` AS Password,0 AS EmpId,0 AS MallBaseId
,A.AccountStatus,A.`Password` AS Password,0 AS EmpId,0 AS MallBaseId,'-1' as RoleAuth
FROM RB_Tenant AS A
WHERE 1=1 AND A.Account='{0}'
UNION ALL
SELECT A.TenantId,B.EmpAccount AS Account,A.Name,A.MobilePhone,A.WeChatNum,A.IsEffective,A.AccountValidate,A.CreateMiniPrograme
,B.`Status` AS AccountStatus,B.EmpPwd AS Password,B.EmpId,B.MallBaseId
,B.`Status` AS AccountStatus,B.EmpPwd AS Password,B.EmpId,B.MallBaseId,b.RoleAuth
FROM RB_Tenant AS A INNER JOIN rb_employee AS B ON A.TenantId=B.TenantId
WHERE 1=1 AND B.EmpAccount='{0}'
", query.Account.Trim());
......
......@@ -49,7 +49,7 @@ namespace Mall.WebApi.Controllers.User
/// </summary>
private readonly Module.User.MenuModule menuModule = new Module.User.MenuModule();
/// <summary>
/// 小程序图标处理类对象
......@@ -123,6 +123,14 @@ namespace Mall.WebApi.Controllers.User
return ApiResult.Failed("密码错误");
}
}
int RoleAuth = 0;
if (model.TenantId == 1 && !string.IsNullOrEmpty(model.RoleAuth))
{
if (model.RoleAuth.Split(",").Any(x => x == "-1"))
{
RoleAuth = 1;
}
}
#region add by:W 2020-07-06 erp授权信息
var erpUserInfo = new Mall.Model.Entity.Property.RB_Employee();
string erptoken = "";
......@@ -182,6 +190,7 @@ namespace Mall.WebApi.Controllers.User
IJwtEncoder encoder = new JwtEncoder(algorithm, serializer, urlEncoder);
string secret = Config.JwtSecretKey;
string token = encoder.Encode(payload, secret);
#endregion
UserInfo obj = new UserInfo
{
......@@ -197,13 +206,14 @@ namespace Mall.WebApi.Controllers.User
Token = token,
SecretKey = "",
MallBaseId = 0,
IsOtherUpdateGoods = RoleAuth,
EmpId = model.EmpId,
erptoken = erptoken,
ERPEmpId = (erpUserInfo?.EmployeeId ?? 0),
ERPBranchId = (erpUserInfo?.RB_Branch_id ?? -1),
ERPGroupId = (erpUserInfo?.RB_Group_id ?? 0),
IsOpenSchool = 0,
IsKorea=0,
IsKorea = 0,
};
UserReidsCache.UserInfoSet(UserModuleCacheKeyConfig.Mall_Login_Info + model.TenantId, obj, Config.JwtExpirTime);
return ApiResult.Success("", obj);
......@@ -455,7 +465,7 @@ namespace Mall.WebApi.Controllers.User
var flag = programModule.SetMiniProgramActivityStyleModule(extModel);
return flag ? ApiResult.Success() : ApiResult.Failed();
}
/// <summary>
/// 修改微信小程序分销订阅配置信息
......@@ -1327,7 +1337,7 @@ namespace Mall.WebApi.Controllers.User
public ApiResult GetMenuList()
{
List<object> resultList = new List<object>();
var menuList = menuModule.GetMenuListModule(new RB_Menu_Extend() { TenantId=RequestParm.TenantId });
var menuList = menuModule.GetMenuListModule(new RB_Menu_Extend() { TenantId = RequestParm.TenantId });
var list = new List<RB_Menu_Extend>();
if (RequestParm.EmpId > 0)
{
......@@ -1791,7 +1801,7 @@ namespace Mall.WebApi.Controllers.User
{
var extModel = new RB_PlugIn_Extend()
{
TenantId= RequestParm.TenantId
TenantId = RequestParm.TenantId
};
var list = plugInModule.GetPlugInListModule(extModel);
var distinctList = list.GroupBy(qitem => new { qitem.PlugType, qitem.GroupName }).Select(qitem => new { qitem.Key.PlugType, qitem.Key.GroupName });
......@@ -2184,7 +2194,7 @@ namespace Mall.WebApi.Controllers.User
extModel.TenantId = RequestParm.TenantId;
extModel.CreateDate = DateTime.Now;
var flag = programModule.SetLiveConfigModule(extModel);
return flag? ApiResult.Success(data: extModel):ApiResult.Failed();
return flag ? ApiResult.Success(data: extModel) : ApiResult.Failed();
}
#endregion
}
......
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