Commit e647984e by 陶光胜

Merge branch 'developer' into 'master'

线上权限调整

See merge request !51
parents 7bfae65d 89f08291
......@@ -82,6 +82,13 @@ public class StoreSearchUtils {
return list;
}
List<Integer> resultList = new ArrayList<>();
TempStoreConditionDTO tempStoreConditionDTO = this.tempStoreConditionApiService.getTempStoreCondition(enterpriseId).getResult();
List<Integer> tempStoreIdList = new ArrayList<>();
if(tempStoreConditionDTO != null) {
Integer tempStoreId = tempStoreConditionDTO.getStoreWidgetId();
tempStoreIdList = this.storeWidgetApiService.listStoreInfoIdByStoreWidgetId(enterpriseId, tempStoreId).getResult();
}
final List<Integer> tempStoreIdListf = tempStoreIdList;
if(StringUtils.isNotBlank(searchJson)){
JSONObject json = JSON.parseObject(searchJson);
StoreSearchQo storeSearchQo = json.getObject(StoreChannelEnum.OFFLINE.getChannel().toString(), StoreSearchQo.class);
......@@ -104,10 +111,7 @@ public class StoreSearchUtils {
storeSearchDTO.setStoreInfoIds(storeSearchDTO.getStoreInfoIds()+","+ storeInfoIds);
}
if(storeSearchQo.getTmpStore() == 0){
TempStoreConditionDTO result = this.tempStoreConditionApiService.getTempStoreCondition(enterpriseId).getResult();
if(result != null){
Integer tempStoreId = result.getStoreWidgetId();
List<Integer> tempStoreIdList = this.storeWidgetApiService.listStoreInfoIdByStoreWidgetId(enterpriseId, tempStoreId).getResult();
if(CollectionUtils.isNotEmpty(tempStoreIdList)){
storeSearchDTO.setStoreIdsOfNot(StringUtils.join(tempStoreIdList, ","));
}
}
......@@ -129,7 +133,17 @@ public class StoreSearchUtils {
}
}
}else {
resultList = storeAuth.getStoreInfoIdList();
if(CollectionUtils.isNotEmpty(storeAuth.getStoreInfoIdList())){
resultList = storeAuth.getStoreInfoIdList().stream().filter(s -> {
if(CollectionUtils.isNotEmpty(tempStoreIdListf)){
if(tempStoreIdListf.contains(s)){
return true;
}else {
return false;
}
}else return true;
}).collect(Collectors.toList());
}
}
if(CollectionUtils.isNotEmpty(resultList)){
RedisUtil.setCache(key, 1, 10l, TimeUnit.MINUTES);
......
......@@ -66,6 +66,7 @@ public class StoreWidgetController {
StoreWidgetIndexVo vo = new StoreWidgetIndexVo();
StoreAuth storeAuth = dataAuthUtils.getStoreAuth(userId, enterpriseId);
OnLineAuth onlineStoreAuth = dataAuthUtils.getOnlineStore(userId, enterpriseId);
log.info("storeWidgetIndex:{},{}", JSON.toJSONString(storeAuth), JSON.toJSONString(onlineStoreAuth));
List<IndexItemVo> items = new ArrayList<>();
if(storeAuth.isHasAuth() && onlineStoreAuth.isHasAuth()){ //线上线下多渠道
IndexItemVo offLine = new IndexItemVo();
......
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