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

提交代码

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