mirror of
http://git.coreshop.cn/jianweie/coreshoppro.git
synced 2025-12-06 18:03:27 +08:00
【调整】移除后台设置是否会员绑定手机号码的设置。
【新增】新增商城小程序前端商家管理员功能,商家管理员可以通过商家中心查看所有信息。 【调整】商家中心按门店进行过滤,提货单,服务券,订单等,本门店只能处理本门店业务及查看相应数据。 【调整】后台商城配置移除【会员设置】tab,增加【商家设置】tab,将商家相关设置归集到一起。
This commit is contained in:
@@ -23,6 +23,7 @@ using CoreCms.Net.Model.ViewModels.Basics;
|
||||
using CoreCms.Net.Model.ViewModels.UI;
|
||||
using CoreCms.Net.Utility.Extensions;
|
||||
using CoreCms.Net.Utility.Helper;
|
||||
using Microsoft.IdentityModel.Tokens;
|
||||
using SqlSugar;
|
||||
|
||||
|
||||
@@ -49,7 +50,7 @@ namespace CoreCms.Net.Services
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 判断是不是店员
|
||||
/// 判断是否是商家,店员,开启商家中心
|
||||
/// </summary>
|
||||
/// <param name="userId"></param>
|
||||
/// <returns></returns>
|
||||
@@ -58,21 +59,32 @@ namespace CoreCms.Net.Services
|
||||
var jm = new WebApiCallBack();
|
||||
|
||||
var allConfigs = await _settingServices.GetConfigDictionaries();
|
||||
var shopManagerMobile = CommonHelper.GetConfigDictionary(allConfigs, SystemSettingConstVars.ShopManagerMobile);
|
||||
|
||||
var storeSwitch = CommonHelper.GetConfigDictionary(allConfigs, SystemSettingConstVars.StoreSwitch).ObjectToInt(2);
|
||||
if (storeSwitch == 1)
|
||||
var user = await _userServices.QueryByClauseAsync(p => p.id == userId);
|
||||
if (user == null)
|
||||
{
|
||||
var bl = await base.ExistsAsync(p => p.userId == userId);
|
||||
jm.status = true;
|
||||
jm.data = bl;
|
||||
jm.msg = bl ? "是店员" : "不是店员";
|
||||
jm.status = false;
|
||||
jm.msg = "用户获取失败";
|
||||
jm.data = new
|
||||
{
|
||||
storeId = 0,
|
||||
isShopManager = false,
|
||||
isClerk = false,
|
||||
};
|
||||
return jm;
|
||||
}
|
||||
else
|
||||
|
||||
var store = await _dal.QueryByClauseAsync(p => p.userId == userId);
|
||||
jm.status = true;
|
||||
jm.data = new
|
||||
{
|
||||
jm.status = true;
|
||||
jm.data = false;
|
||||
jm.msg = "未开启到店自提";
|
||||
}
|
||||
storeId = store?.storeId ?? 0,
|
||||
isShopManager = !string.IsNullOrEmpty(shopManagerMobile) && shopManagerMobile.Contains(user.mobile),
|
||||
isClerk = store != null || (!string.IsNullOrEmpty(shopManagerMobile) && shopManagerMobile.Contains(user.mobile)),
|
||||
};
|
||||
jm.otherData = store != null ||
|
||||
(!string.IsNullOrEmpty(shopManagerMobile) && shopManagerMobile.Contains(user.mobile));
|
||||
|
||||
return jm;
|
||||
}
|
||||
|
||||
@@ -83,11 +83,12 @@ namespace CoreCms.Net.Services
|
||||
/// 根据用户序列获取单个门店数据
|
||||
/// </summary>
|
||||
/// <param name="userId">用户序列</param>
|
||||
/// <param name="storeId">门店序列</param>
|
||||
/// <param name="blUseNoLock">是否使用WITH(NOLOCK)</param>
|
||||
/// <returns></returns>
|
||||
public async Task<CoreCmsStore> GetStoreByUserId(int userId, bool blUseNoLock = false)
|
||||
public async Task<CoreCmsStore> GetStoreByUserId(int userId, int storeId, bool blUseNoLock = false)
|
||||
{
|
||||
return await _dal.GetStoreByUserId(userId, blUseNoLock);
|
||||
return await _dal.GetStoreByUserId(userId, storeId, blUseNoLock);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user