Commit fa1ebe2c by 陶光胜

门店控件查询

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