Commit fa1ebe2c by 陶光胜

门店控件查询

parent c3451283
......@@ -118,9 +118,8 @@ public class StoreSearchUtils {
StoreAuth storeAuth = this.dataAuthUtils.getStoreAuth(userId, enterpriseId);
log.info("storeAuth:{}", JSON.toJSONString(storeAuth));
if(!storeAuth.isHasAuth()){
ArrayList<Integer> list = new ArrayList<>();
list.add(0);
return list;
resultList.add(0);
return resultList;
}
if(StringUtils.isNotBlank(searchJson)){
JSONObject json = JSON.parseObject(searchJson);
......@@ -129,9 +128,10 @@ public class StoreSearchUtils {
if(storeSearchQo.getAll() == 1){
storeSearchDTO.setStoreInfoIds(StringUtils.join(storeAuth.getStoreInfoIdList().toArray(), " "));
}else {
if(StringUtils.isNotBlank(storeSearchQo.getStoreIds())){
if (StringUtils.isNotBlank(storeSearchQo.getStoreIds())) {
storeSearchDTO.setStoreInfoIds(storeSearchQo.getStoreIds().replaceAll(",", " "));
}
}
storeSearchDTO.setEnterpriseId(enterpriseId);
storeSearchDTO.setStoreGroupIds(StringUtils.isBlank(storeSearchQo.getStoreGroupIds()) ? null : storeSearchQo.getStoreGroupIds().replaceAll(",", " "));
storeSearchDTO.setRegionIds(StringUtils.isBlank(storeSearchQo.getRegion()) ? null : storeSearchQo.getRegion().replaceAll(",", " "));
......@@ -189,7 +189,6 @@ public class StoreSearchUtils {
resultList = storeInfoIdList;
}
}
}
} else {
RedisUtil.setCache(key, 1, 10L, TimeUnit.MINUTES);
return storeAuth.getStoreInfoIdList();
......@@ -207,7 +206,7 @@ public class StoreSearchUtils {
List<String> list = new ArrayList<>();
int flag = dealSearchJson(searchJson);
if(flag == 1){
list.add("0");
list.add("noauth");
return list;
}
OnLineAuth onlineStoreAuth = this.dataAuthUtils.getOnlineStore(userId, enterpriseId);
......@@ -217,7 +216,7 @@ public class StoreSearchUtils {
this.getOnlineStoreIds(searchJson, onlineStoreAuth, list, StoreChannelEnum.WMMALL.getChannel(), userId, enterpriseId);
this.getOnlineStoreIds(searchJson, onlineStoreAuth, list, StoreChannelEnum.TIANMAO.getChannel(), userId, enterpriseId);
}else {
list.add("0");
list.add("noauth");
}
return list;
}
......
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