Commit 997f7c52 by 陶光胜

观云台小程序

parent 7800fcf0
...@@ -100,7 +100,8 @@ public class BaseSalesController { ...@@ -100,7 +100,8 @@ public class BaseSalesController {
ServiceResponse<Page<BaseSalesDTO>> totalResponse = this.baseSalesApiService.pageBaseSales(dto); ServiceResponse<Page<BaseSalesDTO>> totalResponse = this.baseSalesApiService.pageBaseSales(dto);
log.info("totalResponse:{}", JSON.toJSONString(totalResponse)); log.info("totalResponse:{}", JSON.toJSONString(totalResponse));
this.goDownComponent.parseTotal(totalResponse, vo); this.goDownComponent.parseTotal(totalResponse, vo);
if(qo.getChannel() != null && qo.getChannel() == 1 && qo.getLevel() == levelVo.getLevel()){ Integer wgs = storeSearchUtils.isWgs(qo.getUserId(), qo.getEnterpriseId(), qo.getSearchJSON());
if(qo.getChannel() != null && qo.getChannel() == 1 && qo.getLevel() == levelVo.getLevel() && wgs == 1){
dto.setCountType(3); //无归属 dto.setCountType(3); //无归属
dto.setChannel(null); dto.setChannel(null);
dto.getStoreInfoIdList().clear(); dto.getStoreInfoIdList().clear();
......
...@@ -5,7 +5,9 @@ import com.alibaba.fastjson.JSONObject; ...@@ -5,7 +5,9 @@ import com.alibaba.fastjson.JSONObject;
import com.gic.api.base.commons.Page; import com.gic.api.base.commons.Page;
import com.gic.api.base.commons.ServiceResponse; import com.gic.api.base.commons.ServiceResponse;
import com.gic.cloud.dto.AttentionStoreDTO; import com.gic.cloud.dto.AttentionStoreDTO;
import com.gic.cloud.dto.DataAuthDTO;
import com.gic.cloud.dto.TempStoreConditionDTO; import com.gic.cloud.dto.TempStoreConditionDTO;
import com.gic.cloud.service.DataAuthApiService;
import com.gic.cloud.service.StoreAttentionApiService; import com.gic.cloud.service.StoreAttentionApiService;
import com.gic.cloud.service.TempStoreConditionApiService; import com.gic.cloud.service.TempStoreConditionApiService;
import com.gic.cloud.web.auth.DataAuthUtils; import com.gic.cloud.web.auth.DataAuthUtils;
...@@ -51,6 +53,25 @@ public class StoreSearchUtils { ...@@ -51,6 +53,25 @@ public class StoreSearchUtils {
private StoreApiService storeApiService; private StoreApiService storeApiService;
@Autowired @Autowired
private StoreGroupApiService storeGroupApiService; private StoreGroupApiService storeGroupApiService;
@Autowired
private DataAuthApiService dataAuthApiService;
public Integer isWgs(Integer userId, Integer enterpriseId, String searchJson){
JSONObject json = JSON.parseObject(searchJson);
ServiceResponse<DataAuthDTO> response = this.dataAuthApiService.ggetDataAuthByUserId(enterpriseId, userId);
DataAuthDTO dataAuthDTO = response.getResult() == null ? new DataAuthDTO() : response.getResult();
StoreSearchQo storeSearchQo = json.getObject(StoreChannelEnum.OFFLINE.getChannel().toString(), StoreSearchQo.class);
if(storeSearchQo != null){
return storeSearchQo.getHasWgs() & dataAuthDTO.getNoOwnerStore();
}
return 0;
}
public static void main(String[] args){
System.out.println(1&1);
System.out.println(1&0);
System.out.println(0&0);
}
public List<Integer> storeSearch(Integer userId, Integer enterpriseId, String searchJson){ public List<Integer> storeSearch(Integer userId, Integer enterpriseId, String searchJson){
String key = "1:" + enterpriseId + ":" + userId +":" + (StringUtils.isNotBlank(searchJson) ? searchJson.hashCode() : "searchJSON".hashCode()); String key = "1:" + enterpriseId + ":" + userId +":" + (StringUtils.isNotBlank(searchJson) ? searchJson.hashCode() : "searchJSON".hashCode());
......
...@@ -11,6 +11,7 @@ public class StoreSearchQo { ...@@ -11,6 +11,7 @@ public class StoreSearchQo {
private Integer tmpStore = 0; private Integer tmpStore = 0;
private String storeGroupIds; //和线上共享使用,当为线上门店时,该值对应店铺 private String storeGroupIds; //和线上共享使用,当为线上门店时,该值对应店铺
private String storeIds; //和线上共享使用,当为线上门店时,该值对应店铺下门店id private String storeIds; //和线上共享使用,当为线上门店时,该值对应店铺下门店id
private Integer hasWgs = 0; //是否有无归属
public Integer getAll() { public Integer getAll() {
return all; return all;
...@@ -91,4 +92,12 @@ public class StoreSearchQo { ...@@ -91,4 +92,12 @@ public class StoreSearchQo {
public void setStoreIds(String storeIds) { public void setStoreIds(String storeIds) {
this.storeIds = storeIds; this.storeIds = storeIds;
} }
public Integer getHasWgs() {
return hasWgs;
}
public void setHasWgs(Integer hasWgs) {
this.hasWgs = hasWgs;
}
} }
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