mirror of
http://git.coreshop.cn/jianweie/coreshoppro.git
synced 2025-12-06 22:43:25 +08:00
【调整】移除后台设置是否会员绑定手机号码的设置。
【新增】新增商城小程序前端商家管理员功能,商家管理员可以通过商家中心查看所有信息。 【调整】商家中心按门店进行过滤,提货单,服务券,订单等,本门店只能处理本门店业务及查看相应数据。 【调整】后台商城配置移除【会员设置】tab,增加【商家设置】tab,将商家相关设置归集到一起。
This commit is contained in:
@@ -52,6 +52,8 @@ namespace CoreCms.Net.Web.WebApi.Controllers
|
||||
private readonly ICoreCmsOrderDistributionModelServices _orderDistributionModelServices;
|
||||
private readonly ICoreCmsBillPaymentsServices _billPaymentsServices;
|
||||
private readonly IRedisOperationRepository _redisOperationRepository;
|
||||
private readonly ICoreCmsUserServices _userServices;
|
||||
private readonly ICoreCmsClerkServices _clerkServices;
|
||||
|
||||
|
||||
|
||||
@@ -64,7 +66,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
|
||||
, ICoreCmsSettingServices settingServices
|
||||
, ICoreCmsAreaServices areaServices
|
||||
, ICoreCmsBillReshipServices reshipServices, ICoreCmsShipServices shipServices
|
||||
, ICoreCmsBillDeliveryServices billDeliveryServices, ICoreCmsLogisticsServices logisticsServices, ICoreCmsGoodsServices goodsServices, ICoreCmsStoreServices storeServices, ICoreCmsOrderDistributionModelServices orderDistributionModelServices, IRedisOperationRepository redisOperationRepository, ICoreCmsBillPaymentsServices billPaymentsServices)
|
||||
, ICoreCmsBillDeliveryServices billDeliveryServices, ICoreCmsLogisticsServices logisticsServices, ICoreCmsGoodsServices goodsServices, ICoreCmsStoreServices storeServices, ICoreCmsOrderDistributionModelServices orderDistributionModelServices, IRedisOperationRepository redisOperationRepository, ICoreCmsBillPaymentsServices billPaymentsServices, ICoreCmsUserServices userServices, ICoreCmsClerkServices clerkServices)
|
||||
{
|
||||
_user = user;
|
||||
_orderServices = orderServices;
|
||||
@@ -80,6 +82,8 @@ namespace CoreCms.Net.Web.WebApi.Controllers
|
||||
_orderDistributionModelServices = orderDistributionModelServices;
|
||||
_redisOperationRepository = redisOperationRepository;
|
||||
_billPaymentsServices = billPaymentsServices;
|
||||
_userServices = userServices;
|
||||
_clerkServices = clerkServices;
|
||||
}
|
||||
|
||||
|
||||
@@ -256,11 +260,23 @@ namespace CoreCms.Net.Web.WebApi.Controllers
|
||||
var userId = _user.ID;
|
||||
if ((string)entity.data == "merchant")
|
||||
{
|
||||
var store = await _storeServices.GetStoreByUserId(_user.ID);
|
||||
if (store == null)
|
||||
var allConfigs = await _settingServices.GetConfigDictionaries();
|
||||
var shopManagerMobile = CommonHelper.GetConfigDictionary(allConfigs, SystemSettingConstVars.ShopManagerMobile);
|
||||
var user = await _userServices.QueryByClauseAsync(p => p.id == userId);
|
||||
|
||||
if (user == null)
|
||||
{
|
||||
jm.status = false;
|
||||
jm.msg = "你不是店员";
|
||||
jm.msg = "用户获取失败";
|
||||
return jm;
|
||||
}
|
||||
var isShopManager = !string.IsNullOrEmpty(shopManagerMobile) && shopManagerMobile.Contains(user.mobile);
|
||||
|
||||
var store = await _clerkServices.QueryByClauseAsync(p => p.userId == userId);
|
||||
if (store == null && isShopManager == false)
|
||||
{
|
||||
jm.status = false;
|
||||
jm.msg = "你不是店员或管理员";
|
||||
return jm;
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user