Commit 899b104d by 徐高华

log

parent 415e9a55
......@@ -801,24 +801,24 @@ public class StaffApiServiceImpl implements StaffApiService {
Object cache = RedisUtil.getCache(cacheKey);
if (cache != null) {
List<String> storeList = (List<String>) cache;
logger.info("从缓存中获取通道={},数量:{}", cacheKey, storeList.size());
logger.info("从缓存中获取key={},store数量:{}", cacheKey, storeList.size());
return storeList;
}
ClerkDTO clerkDTO = clerkService.getClerkByClerkId(clerkId);
if (clerkDTO == null) {
logger.info("导购不存在:clerkId:{}", clerkId);
logger.info("导购不存在:clerkId:{},无门店", clerkId);
return Collections.emptyList();
}
String enterpriseId = clerkDTO.getEnterpriseId();
List<String> enterpriseIdStoreIds = storeRangeService.listStoreIdByWxEnterpriseId(wxEnterpriseId, enterpriseId);
if (CollectionUtils.isEmpty(enterpriseIdStoreIds)) {
logger.info("好办门店空,eid={}", enterpriseId);
logger.info("无好办门店,eid={}", enterpriseId);
return Collections.emptyList();
}
logger.info("好办门店id数量:{}", enterpriseIdStoreIds.size());
logger.info("好办门店数量={}", enterpriseIdStoreIds.size());
List<String> gicStoreIds = getStoreIdList(clerkDTO);
if (CollectionUtils.isEmpty(gicStoreIds)) {
logger.info("gic门店为空");
logger.info("gic门店为空");
return Collections.emptyList();
}
if (gicStoreIds.contains("-1")) {
......@@ -838,10 +838,10 @@ public class StaffApiServiceImpl implements StaffApiService {
RedisUtil.setCache(cacheKey, enterpriseIdStoreIds, 10L, TimeUnit.MINUTES);
return enterpriseIdStoreIds;
}
logger.info("gic门店数量{}", gicStoreIds.size());
logger.info("gic门店数量={}", gicStoreIds.size());
//取交集
List<String> storeList = RolesListUtils.mergeList(enterpriseIdStoreIds, gicStoreIds);
logger.info("该导购权限:clerkId:{},门店数量:{}", clerkId, storeList.size());
logger.info("clerkId={},门店交集数量={}", clerkId, storeList.size());
RedisUtil.setCache(cacheKey, storeList, 10L, TimeUnit.MINUTES);
return storeList;
}
......@@ -912,7 +912,6 @@ public class StaffApiServiceImpl implements StaffApiService {
Integer superAdmin = clerkDTO.getSuperAdmin();
if (superAdmin != null && superAdmin == 1) {
logger.info("gic超管,clerkId:{}", clerkId);
//gic超管
return Collections.singletonList("-1");
}
String enterpriseId = clerkDTO.getEnterpriseId();
......@@ -920,23 +919,22 @@ public class StaffApiServiceImpl implements StaffApiService {
if (enterpriseSetting.getEnableAccessControl() != null && enterpriseSetting.getEnableAccessControl() == 1) {
String storeWidgetId = this.powerService.getStoreWidgetId(new Date(), clerkId);
if (StringUtils.isBlank(storeWidgetId)) {
logger.info("导购权限不存在");
logger.info("导购无门店权限,门店组件id is null");
return Collections.emptyList();
}
StoreWidgetDTO storeWidgetDTO = this.storeWidgetService.getStoreWidgetBykey(storeWidgetId);
if (storeWidgetDTO == null) {
logger.info("导购权限不存在");
logger.info("导购门店权限查不到,storeWidgetId={}",storeWidgetId);
return Collections.emptyList();
}
Integer selectType = storeWidgetDTO.getSelectType();
if (selectType != null && selectType == 0) {
//gic超管
logger.info("gic超管,clerkId:{}", clerkId);
logger.info("gic超管所有门店,clerkId:{}", clerkId);
return Collections.singletonList("-1");
}
return getStoreWidgetIdStoreIds(storeWidgetId, enterpriseId);
} else {
//未开启分权
logger.info("无开启权限 ,所有门店,clerkId={}", clerkId);
return Collections.singletonList("-1");
}
}
......
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