Commit 3e671b63 by guojuxing

Merge remote-tracking branch 'origin/developer' into developer

parents 5f1434e2 8cc2702c
...@@ -104,22 +104,28 @@ public class StoreSearchUtils { ...@@ -104,22 +104,28 @@ public class StoreSearchUtils {
}else { }else {
StoreSearchDTO storeSearchDTO = new StoreSearchDTO(); StoreSearchDTO storeSearchDTO = new StoreSearchDTO();
storeSearchDTO.setEnterpriseId(enterpriseId); storeSearchDTO.setEnterpriseId(enterpriseId);
storeSearchDTO.setStoreInfoIds(storeSearchQo.getStoreIds()); storeSearchDTO.setStoreInfoIds(StringUtils.isBlank(storeSearchQo.getStoreIds()) ? null : storeSearchQo.getStoreIds().replaceAll(",", " "));
storeSearchDTO.setStoreGroupIds(storeSearchQo.getStoreGroupIds()); storeSearchDTO.setStoreGroupIds(StringUtils.isBlank(storeSearchQo.getStoreGroupIds()) ? null : storeSearchQo.getStoreGroupIds().replaceAll(",", " "));
storeSearchDTO.setRegionIds(storeSearchQo.getRegion()); storeSearchDTO.setRegionIds(StringUtils.isBlank(storeSearchQo.getRegion()) ? null : storeSearchQo.getRegion().replaceAll(",", " "));
storeSearchDTO.setStoreTypes(storeSearchQo.getStoreType()); storeSearchDTO.setStoreTypes(StringUtils.isBlank(storeSearchQo.getStoreType()) ? null :storeSearchQo.getStoreType().replaceAll(",", " "));
storeSearchDTO.setStoreStatuss(storeSearchQo.getStoreStatus()); storeSearchDTO.setStoreStatuss(StringUtils.isBlank(storeSearchQo.getStoreStatus()) ? null :storeSearchQo.getStoreStatus().replaceAll(",", " "));
storeSearchDTO.setErpStatuss(storeSearchQo.getErpStatus()); storeSearchDTO.setErpStatuss(StringUtils.isBlank(storeSearchQo.getErpStatus()) ? null :storeSearchQo.getErpStatus().replaceAll(",", " "));
storeSearchDTO.setStoreTags(storeSearchQo.getStoreTag()); storeSearchDTO.setStoreTags(StringUtils.isBlank(storeSearchQo.getStoreTag()) ? null :storeSearchQo.getStoreTag().replaceAll(",", " "));
if(storeSearchQo.getAttentionStore() == 1){ if(storeSearchQo.getAttentionStore() == 1){
List<AttentionStoreDTO> result = this.storeAttentionApiService.pageStoreAttention(userId, enterpriseId, 1, Integer.MAX_VALUE).getResult().getResult(); List<AttentionStoreDTO> result = this.storeAttentionApiService.pageStoreAttention(userId, enterpriseId, 1, Integer.MAX_VALUE).getResult().getResult();
List<Integer> list = result.stream().map(t -> t.getStoreId()).collect(Collectors.toList()); List<Integer> list = result.stream().filter(t -> {
String storeInfoIds = StringUtils.join(list, ","); if(t.getStoreId() != null){
storeSearchDTO.setStoreInfoIds(storeSearchDTO.getStoreInfoIds()+","+ storeInfoIds); return true;
}else {
return false;
}
}).map(dto -> dto.getStoreId()).collect(Collectors.toList());
String storeInfoIds = StringUtils.join(list, " ");
storeSearchDTO.setStoreInfoIds(StringUtils.isNotBlank(storeSearchDTO.getStoreInfoIds()) ? storeSearchDTO.getStoreInfoIds()+" "+ storeInfoIds : storeInfoIds);
} }
if(storeSearchQo.getTmpStore() == 0){ if(storeSearchQo.getTmpStore() == 0){
if(CollectionUtils.isNotEmpty(tempStoreIdList)){ if(CollectionUtils.isNotEmpty(tempStoreIdList)){
storeSearchDTO.setStoreInfoIdsOfNot(StringUtils.join(tempStoreIdList, ",")); storeSearchDTO.setStoreInfoIdsOfNot(StringUtils.join(tempStoreIdList, " "));
} }
} }
ServiceResponse<Page<StoreDTO>> pageServiceResponse = this.storeApiService.listStore(storeSearchDTO, 1, 20000); ServiceResponse<Page<StoreDTO>> pageServiceResponse = this.storeApiService.listStore(storeSearchDTO, 1, 20000);
......
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