Commit a39f2785 by 陶光胜

门店控件修复

parent 3dbec5fd
...@@ -103,6 +103,7 @@ public class StoreSearchUtils { ...@@ -103,6 +103,7 @@ public class StoreSearchUtils {
storeSearchDTO.setStoreStatuss(StringUtils.isBlank(storeSearchQo.getStoreStatus()) ? null :storeSearchQo.getStoreStatus().replaceAll(",", " ")); storeSearchDTO.setStoreStatuss(StringUtils.isBlank(storeSearchQo.getStoreStatus()) ? null :storeSearchQo.getStoreStatus().replaceAll(",", " "));
storeSearchDTO.setRealStatuss(StringUtils.isBlank(storeSearchQo.getErpStatus()) ? null :storeSearchQo.getErpStatus().replaceAll(",", " ")); storeSearchDTO.setRealStatuss(StringUtils.isBlank(storeSearchQo.getErpStatus()) ? null :storeSearchQo.getErpStatus().replaceAll(",", " "));
storeSearchDTO.setStoreTags(StringUtils.isBlank(storeSearchQo.getStoreTag()) ? null :storeSearchQo.getStoreTag().replaceAll(",", " ")); storeSearchDTO.setStoreTags(StringUtils.isBlank(storeSearchQo.getStoreTag()) ? null :storeSearchQo.getStoreTag().replaceAll(",", " "));
storeSearchDTO.setStoreBrandIds(StringUtils.isBlank(storeSearchQo.getStoreBrand()) ? null :storeSearchQo.getStoreBrand().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().filter(t -> { List<Integer> list = result.stream().filter(t -> {
......
...@@ -304,12 +304,14 @@ public class StoreWidgetController { ...@@ -304,12 +304,14 @@ public class StoreWidgetController {
int typeOfStoreGroup = 1; int typeOfStoreGroup = 1;
//线下门店 //线下门店
int typeOfOfflineStore = 2; int typeOfOfflineStore = 2;
//线上店铺
int typeOfShop = 3;
List<StoreSearchVo> storeSearchVoList = new ArrayList<>();
if(type == typeOfStoreGroup){ if(type == typeOfStoreGroup){
Page<StoreGroupDTO> result = this.storeGroupApiService.pageStoreGroupByIds(null, enterpriseId, null, search, pageSize, pageNum).getResult(); Page<StoreGroupDTO> result = this.storeGroupApiService.pageStoreGroupByIds(null, enterpriseId, null, search, pageSize, pageNum).getResult();
page.setTotalPage(result.getTotalPage()); page.setTotalPage(result.getTotalPage());
page.setTotalCount(result.getTotalCount()); page.setTotalCount(result.getTotalCount());
if(CollectionUtils.isNotEmpty(result.getResult())){ if(CollectionUtils.isNotEmpty(result.getResult())){
List<StoreSearchVo> storeSearchVoList = new ArrayList<>();
for(StoreGroupDTO storeGroupDTO : result.getResult()){ for(StoreGroupDTO storeGroupDTO : result.getResult()){
StoreSearchVo searchVo = new StoreSearchVo(); StoreSearchVo searchVo = new StoreSearchVo();
searchVo.setId(storeGroupDTO.getStoreGroupId()+""); searchVo.setId(storeGroupDTO.getStoreGroupId()+"");
...@@ -318,7 +320,6 @@ public class StoreWidgetController { ...@@ -318,7 +320,6 @@ public class StoreWidgetController {
searchVo.setNameChain(map.get(storeGroupDTO.getStoreGroupId()).getNameChain()); searchVo.setNameChain(map.get(storeGroupDTO.getStoreGroupId()).getNameChain());
storeSearchVoList.add(searchVo); storeSearchVoList.add(searchVo);
} }
page.setResult(storeSearchVoList);
} }
}else if(type == typeOfOfflineStore){ }else if(type == typeOfOfflineStore){
StoreAuth storeAuth = this.dataAuthUtils.getStoreAuth(userId, enterpriseId); StoreAuth storeAuth = this.dataAuthUtils.getStoreAuth(userId, enterpriseId);
...@@ -332,7 +333,6 @@ public class StoreWidgetController { ...@@ -332,7 +333,6 @@ public class StoreWidgetController {
page.setTotalCount(result.getTotalCount()); page.setTotalCount(result.getTotalCount());
page.setTotalPage(result.getTotalPage()); page.setTotalPage(result.getTotalPage());
if(CollectionUtils.isNotEmpty(result.getResult())){ if(CollectionUtils.isNotEmpty(result.getResult())){
List<StoreSearchVo> storeSearchVoList = new ArrayList<>();
for(StoreDTO storeDTO : result.getResult()){ for(StoreDTO storeDTO : result.getResult()){
StoreSearchVo searchVo = new StoreSearchVo(); StoreSearchVo searchVo = new StoreSearchVo();
searchVo.setId(storeDTO.getStoreInfoId()+""); searchVo.setId(storeDTO.getStoreInfoId()+"");
...@@ -343,14 +343,27 @@ public class StoreWidgetController { ...@@ -343,14 +343,27 @@ public class StoreWidgetController {
searchVo.setOwnType(storeDTO.getOwnType() == 1 ? 2 : 1); searchVo.setOwnType(storeDTO.getOwnType() == 1 ? 2 : 1);
storeSearchVoList.add(searchVo); storeSearchVoList.add(searchVo);
} }
page.setResult(storeSearchVoList);
} }
} }
}else{ }else if(typeOfShop == type){
//线上店铺 //线上店铺
onlineStore(page, userId, enterpriseId, search); onlineStore(page, userId, enterpriseId, search);
} else {
List<StoreTagDTO> storeTagDTOList = this.storeTagApiService.listByEnterprise(enterpriseId, search).getResult();
if(CollectionUtils.isNotEmpty(storeTagDTOList)){
for(StoreTagDTO dto : storeTagDTOList){
StoreSearchVo storeSearchVo = new StoreSearchVo();
storeSearchVo.setId(dto.getStoreTagId().toString());
storeSearchVo.setName(dto.getStoreTagName());
storeSearchVo.setDesc(StoreChannelEnum.OFFLINE.getMessage());
storeSearchVo.setIdChain("_" + StoreChannelEnum.OFFLINE.getChannel() + "_" + dto.getStoreTagId() +"_");
storeSearchVo.setNameChain(StoreChannelEnum.OFFLINE.getMessage() + "/" + dto.getStoreTagName());
storeSearchVo.setChannel(StoreChannelEnum.OFFLINE.getChannel());
storeSearchVoList.add(storeSearchVo);
}
}
} }
page.setResult(storeSearchVoList);
return RestResponse.success(page); return RestResponse.success(page);
} }
......
...@@ -28,6 +28,10 @@ public class StoreSearchQo { ...@@ -28,6 +28,10 @@ public class StoreSearchQo {
*/ */
private Integer hasWgs = 0; private Integer hasWgs = 0;
private String storeBrand;
private String resourceType;
public Integer getAll() { public Integer getAll() {
return all; return all;
} }
...@@ -115,4 +119,20 @@ public class StoreSearchQo { ...@@ -115,4 +119,20 @@ public class StoreSearchQo {
public void setHasWgs(Integer hasWgs) { public void setHasWgs(Integer hasWgs) {
this.hasWgs = hasWgs; this.hasWgs = hasWgs;
} }
public String getStoreBrand() {
return storeBrand;
}
public void setStoreBrand(String storeBrand) {
this.storeBrand = storeBrand;
}
public String getResourceType() {
return resourceType;
}
public void setResourceType(String resourceType) {
this.resourceType = resourceType;
}
} }
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