Commit 2400ef70 by guojuxing

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

parents 2318b7f7 ac0ce295
...@@ -147,6 +147,7 @@ public class DataAuthUtils { ...@@ -147,6 +147,7 @@ public class DataAuthUtils {
MbrVo vo = new MbrVo(); MbrVo vo = new MbrVo();
vo.setMbrAreaId(dto.getAreaId().toString()); vo.setMbrAreaId(dto.getAreaId().toString());
vo.setMbrAreaName(dto.getName()); vo.setMbrAreaName(dto.getName());
vo.setOwnType(dto.getOwnerFlag());
return vo; return vo;
}).collect(Collectors.toList()); }).collect(Collectors.toList());
} }
......
...@@ -62,8 +62,8 @@ public class IndexController { ...@@ -62,8 +62,8 @@ public class IndexController {
@RequestMapping("index-mbr") @RequestMapping("index-mbr")
public RestResponse indexMbr(Integer enterpriseId, Integer userId){ public RestResponse indexMbr(Integer enterpriseId, Integer userId){
//List<MbrVo> mbrArea = this.dataAuthUtils.getMbrArea(userId, enterpriseId); List<MbrVo> mbrArea = this.dataAuthUtils.getMbrArea(userId, enterpriseId);
return RestResponse.success(); return RestResponse.success(mbrArea);
} }
@RequestMapping("index-sales") @RequestMapping("index-sales")
...@@ -91,10 +91,10 @@ public class IndexController { ...@@ -91,10 +91,10 @@ public class IndexController {
list.add(-1); list.add(-1);
onLine.add("-1"); onLine.add("-1");
} }
//List<Long> mbrAreaIdList = this.dataAuthUtils.getMbrAreaId(userId, enterpriseId); List<Long> mbrAreaIdList = this.dataAuthUtils.getMbrAreaId(userId, enterpriseId);
ServiceResponse<IndexMemberDTO> indexMember = this.indexSalesApiService.getIndexMember(enterpriseId, list, onLine, ServiceResponse<IndexMemberDTO> indexMember = this.indexSalesApiService.getIndexMember(enterpriseId, list, onLine,
StringUtils.isNoneBlank(mbrAreaId) ? Long.valueOf(mbrAreaId) : null, StringUtils.isNoneBlank(mbrAreaId) ? Long.valueOf(mbrAreaId) : null,
null, dateTypeQo.getType(), dateTypeQo.getDate()); mbrAreaIdList, dateTypeQo.getType(), dateTypeQo.getDate());
return RestResponse.success(indexMember.getResult()); return RestResponse.success(indexMember.getResult());
} }
......
...@@ -88,14 +88,6 @@ public class StoreSearchUtils { ...@@ -88,14 +88,6 @@ public class StoreSearchUtils {
return list; return list;
} }
List<Integer> resultList = new ArrayList<>(); List<Integer> resultList = new ArrayList<>();
TempStoreConditionDTO tempStoreConditionDTO = this.tempStoreConditionApiService.getTempStoreCondition(enterpriseId).getResult();
List<Integer> tempStoreIdList = new ArrayList<>();
if(tempStoreConditionDTO != null) {
Integer tempStoreId = tempStoreConditionDTO.getStoreWidgetId();
tempStoreIdList = this.storeWidgetApiService.listStoreInfoIdByStoreWidgetId(enterpriseId, tempStoreId).getResult();
}
final List<Integer> tempStoreIdListf = tempStoreIdList;
log.info("tempStoreIdList:{}", JSON.toJSONString(tempStoreIdListf));
if(StringUtils.isNotBlank(searchJson)){ if(StringUtils.isNotBlank(searchJson)){
JSONObject json = JSON.parseObject(searchJson); JSONObject json = JSON.parseObject(searchJson);
StoreSearchQo storeSearchQo = json.getObject(StoreChannelEnum.OFFLINE.getChannel().toString(), StoreSearchQo.class); StoreSearchQo storeSearchQo = json.getObject(StoreChannelEnum.OFFLINE.getChannel().toString(), StoreSearchQo.class);
...@@ -111,6 +103,7 @@ public class StoreSearchUtils { ...@@ -111,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 -> {
...@@ -123,11 +116,6 @@ public class StoreSearchUtils { ...@@ -123,11 +116,6 @@ public class StoreSearchUtils {
String storeInfoIds = StringUtils.join(list, " "); String storeInfoIds = StringUtils.join(list, " ");
storeSearchDTO.setStoreInfoIds(StringUtils.isNotBlank(storeSearchDTO.getStoreInfoIds()) ? storeSearchDTO.getStoreInfoIds()+" "+ storeInfoIds : storeInfoIds); storeSearchDTO.setStoreInfoIds(StringUtils.isNotBlank(storeSearchDTO.getStoreInfoIds()) ? storeSearchDTO.getStoreInfoIds()+" "+ storeInfoIds : storeInfoIds);
} }
if(storeSearchQo.getTmpStore() == 0){
if(CollectionUtils.isNotEmpty(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);
log.info("storeResule:{}", JSON.toJSONString(pageServiceResponse)); log.info("storeResule:{}", JSON.toJSONString(pageServiceResponse));
if(pageServiceResponse.isSuccess() && pageServiceResponse.getResult() != null && CollectionUtils.isNotEmpty(pageServiceResponse.getResult().getResult())){ if(pageServiceResponse.isSuccess() && pageServiceResponse.getResult() != null && CollectionUtils.isNotEmpty(pageServiceResponse.getResult().getResult())){
...@@ -142,11 +130,11 @@ public class StoreSearchUtils { ...@@ -142,11 +130,11 @@ public class StoreSearchUtils {
} }
return false; return false;
}).collect(Collectors.toList()); }).collect(Collectors.toList());
} else {
resultList = storeInfoIdList;
} }
} }
} }
} else {
resultList = storeSearchJsonWhenNull(storeAuth, tempStoreIdListf);
} }
if(CollectionUtils.isNotEmpty(resultList)){ if(CollectionUtils.isNotEmpty(resultList)){
RedisUtil.setCache(key, 1, 10L, TimeUnit.MINUTES); RedisUtil.setCache(key, 1, 10L, TimeUnit.MINUTES);
...@@ -157,23 +145,6 @@ public class StoreSearchUtils { ...@@ -157,23 +145,6 @@ public class StoreSearchUtils {
return resultList; return resultList;
} }
private List<Integer> storeSearchJsonWhenNull(StoreAuth storeAuth, final List<Integer> tempStoreIdListf) {
if(CollectionUtils.isNotEmpty(storeAuth.getStoreInfoIdList())){
return storeAuth.getStoreInfoIdList().stream().filter(s -> {
if(CollectionUtils.isNotEmpty(tempStoreIdListf)){
if(tempStoreIdListf.contains(s)){
return false;
}else {
return true;
}
} else {
return true;
}
}).collect(Collectors.toList());
}
return new ArrayList<>();
}
public List<String> onLineStoreSearch(Integer userId, Integer enterpriseId, String searchJson){ public List<String> onLineStoreSearch(Integer userId, Integer enterpriseId, String searchJson){
OnLineAuth onlineStoreAuth = this.dataAuthUtils.getOnlineStore(userId, enterpriseId); OnLineAuth onlineStoreAuth = this.dataAuthUtils.getOnlineStore(userId, enterpriseId);
log.info("onlineStoreAuth:{}", JSON.toJSONString(onlineStoreAuth)); log.info("onlineStoreAuth:{}", JSON.toJSONString(onlineStoreAuth));
......
...@@ -18,6 +18,8 @@ import com.gic.cloud.web.constant.StoreChannelEnum; ...@@ -18,6 +18,8 @@ import com.gic.cloud.web.constant.StoreChannelEnum;
import com.gic.cloud.web.vo.*; import com.gic.cloud.web.vo.*;
import com.gic.commons.webapi.reponse.RestResponse; import com.gic.commons.webapi.reponse.RestResponse;
import com.gic.enterprise.dto.WmStoreDTO; import com.gic.enterprise.dto.WmStoreDTO;
import com.gic.enterprise.dto.union.UnionEnterpriseAuthDTO;
import com.gic.enterprise.service.UnionEnterpriseAuthApiService;
import com.gic.enterprise.service.WmStoreApiService; import com.gic.enterprise.service.WmStoreApiService;
import com.gic.mall.share.api.dto.shop.ShopDTO; import com.gic.mall.share.api.dto.shop.ShopDTO;
import com.gic.mall.share.api.enums.ShopTypeEnum; import com.gic.mall.share.api.enums.ShopTypeEnum;
...@@ -70,6 +72,8 @@ public class StoreWidgetController { ...@@ -70,6 +72,8 @@ public class StoreWidgetController {
private MenuApiService menuApiService; private MenuApiService menuApiService;
@Autowired @Autowired
private StoreBrandApiService storeBrandApiService; private StoreBrandApiService storeBrandApiService;
@Autowired
private UnionEnterpriseAuthApiService unionEnterpriseAuthApiService;
@RequestMapping("store-widget-index") @RequestMapping("store-widget-index")
public RestResponse storeWidgetIndex(Integer userId, Integer enterpriseId){ public RestResponse storeWidgetIndex(Integer userId, Integer enterpriseId){
...@@ -90,7 +94,7 @@ public class StoreWidgetController { ...@@ -90,7 +94,7 @@ public class StoreWidgetController {
} else if(storeAuth.isHasAuth() && !onlineStoreAuth.isHasAuth()){ } else if(storeAuth.isHasAuth() && !onlineStoreAuth.isHasAuth()){
//线下单渠道 //线下单渠道
vo.setType(2); vo.setType(2);
} else if(onlineStoreAuth.getList().size() == 1){ } else if(onlineStoreAuth.isHasAuth() && onlineStoreAuth.getList().size() == 1){
//线上单渠道 //线上单渠道
vo.setType(3); vo.setType(3);
List<OnLineStore> list = onlineStoreAuth.getList(); List<OnLineStore> list = onlineStoreAuth.getList();
...@@ -105,7 +109,7 @@ public class StoreWidgetController { ...@@ -105,7 +109,7 @@ public class StoreWidgetController {
items.add(indexItemVo); items.add(indexItemVo);
} }
} }
} else { //线上多渠道 } else if(onlineStoreAuth.isHasAuth() && onlineStoreAuth.getList().size() > 1){ //线上多渠道
vo.setType(1); vo.setType(1);
this.getOnlineItems(onlineStoreAuth, items); this.getOnlineItems(onlineStoreAuth, items);
} }
...@@ -122,6 +126,8 @@ public class StoreWidgetController { ...@@ -122,6 +126,8 @@ public class StoreWidgetController {
} }
} }
} }
List<UnionEnterpriseAuthDTO> ownEnterpriseList = this.unionEnterpriseAuthApiService.listOwnEnterpriseAuth(enterpriseId).getResult();
vo.setResourceType(CollectionUtils.isNotEmpty(ownEnterpriseList) ? 1 : 0);
return RestResponse.success(vo); return RestResponse.success(vo);
} }
...@@ -157,7 +163,9 @@ public class StoreWidgetController { ...@@ -157,7 +163,9 @@ public class StoreWidgetController {
StoreSearchDTO storeSearchDTO = new StoreSearchDTO(); StoreSearchDTO storeSearchDTO = new StoreSearchDTO();
storeSearchDTO.setEnterpriseId(enterpriseId); storeSearchDTO.setEnterpriseId(enterpriseId);
storeSearchDTO.setStoreGroupId(parentId); storeSearchDTO.setStoreGroupId(parentId);
storeSearchDTO.setStoreResource(Long.valueOf(storeAuth.getStoreWidgetId())); if(storeAuth.getStoreWidgetId() != null){
storeSearchDTO.setStoreResource(Long.valueOf(storeAuth.getStoreWidgetId()));
}
ServiceResponse<Page<StoreDTO>> response = this.storeApiService.listStore(storeSearchDTO, pageNum, pageSize); ServiceResponse<Page<StoreDTO>> response = this.storeApiService.listStore(storeSearchDTO, pageNum, pageSize);
Map<Integer, AttentionStoreDTO> result = this.storeAttentionApiService.getAllAttenttionStore(userId, enterpriseId).getResult(); Map<Integer, AttentionStoreDTO> result = this.storeAttentionApiService.getAllAttenttionStore(userId, enterpriseId).getResult();
if(CollectionUtils.isNotEmpty(response.getResult().getResult())){ if(CollectionUtils.isNotEmpty(response.getResult().getResult())){
...@@ -169,6 +177,7 @@ public class StoreWidgetController { ...@@ -169,6 +177,7 @@ public class StoreWidgetController {
itemsVo.setIdChain(map.get(dto.getStoreGroupId()).getIdChain() + dto.getStoreInfoId() + "_"); itemsVo.setIdChain(map.get(dto.getStoreGroupId()).getIdChain() + dto.getStoreInfoId() + "_");
itemsVo.setNameChain(map.get(dto.getStoreGroupId()).getNameChain() + dto.getStoreName() + "/"); itemsVo.setNameChain(map.get(dto.getStoreGroupId()).getNameChain() + dto.getStoreName() + "/");
itemsVo.setHasAttention(result.get(dto.getStoreInfoId()) == null ? 0 : 1); itemsVo.setHasAttention(result.get(dto.getStoreInfoId()) == null ? 0 : 1);
itemsVo.setOwnType(dto.getOwnType() == 1 ? 2 : 1);
items.add(itemsVo); items.add(itemsVo);
} }
groupVoPage.setTotalCount(response.getResult().getTotalCount()); groupVoPage.setTotalCount(response.getResult().getTotalCount());
...@@ -261,6 +270,7 @@ public class StoreWidgetController { ...@@ -261,6 +270,7 @@ public class StoreWidgetController {
StoreTypeVo storeTypeVo = new StoreTypeVo(); StoreTypeVo storeTypeVo = new StoreTypeVo();
storeTypeVo.setId(storeBrandDTO.getStoreBrandId()+""); storeTypeVo.setId(storeBrandDTO.getStoreBrandId()+"");
storeTypeVo.setName(storeBrandDTO.getStoreBrandName()); storeTypeVo.setName(storeBrandDTO.getStoreBrandName());
storeTypeVo.setOwnType(storeBrandDTO.getType());
list.add(storeTypeVo); list.add(storeTypeVo);
}); });
} }
...@@ -294,12 +304,14 @@ public class StoreWidgetController { ...@@ -294,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()+"");
...@@ -308,7 +320,6 @@ public class StoreWidgetController { ...@@ -308,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);
...@@ -322,7 +333,6 @@ public class StoreWidgetController { ...@@ -322,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()+"");
...@@ -330,65 +340,80 @@ public class StoreWidgetController { ...@@ -330,65 +340,80 @@ public class StoreWidgetController {
searchVo.setIdChain((map.get(storeDTO.getStoreGroupId()) != null ? map.get(storeDTO.getStoreGroupId()).getIdChain() : "") + storeDTO.getStoreInfoId()+"_"); searchVo.setIdChain((map.get(storeDTO.getStoreGroupId()) != null ? map.get(storeDTO.getStoreGroupId()).getIdChain() : "") + storeDTO.getStoreInfoId()+"_");
searchVo.setNameChain((map.get(storeDTO.getStoreGroupId())!= null ? map.get(storeDTO.getStoreGroupId()).getNameChain() : "") + storeDTO.getStoreName() + "/"); searchVo.setNameChain((map.get(storeDTO.getStoreGroupId())!= null ? map.get(storeDTO.getStoreGroupId()).getNameChain() : "") + storeDTO.getStoreName() + "/");
searchVo.setHasAttention(attentionStoreDtoMap.get(storeDTO.getStoreInfoId()) == null ? 0 : 1); searchVo.setHasAttention(attentionStoreDtoMap.get(storeDTO.getStoreInfoId()) == null ? 0 : 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);
} }
private void onlineStore(Page<StoreSearchVo> page, Integer userId, Integer enterpriseId, String search) { private void onlineStore(Page<StoreSearchVo> page, Integer userId, Integer enterpriseId, String search) {
OnLineAuth onlineStoreAuth = this.dataAuthUtils.getOnlineStore(userId, enterpriseId);
OnLineAuth onlineStore = this.dataAuthUtils.getOnlineStore(userId, enterpriseId); if(!onlineStoreAuth.isHasAuth()){
if(onlineStore.isHasAuth()){ return;
List<StoreSearchVo> list = new ArrayList<>(); }
List<OnLineStore> onlineStoreList = onlineStore.getList(); List<StoreSearchVo> list = new ArrayList<>();
for(OnLineStore onLineStore : onlineStoreList){ List<OnLineStore> onlineStoreList = onlineStoreAuth.getList();
if(StoreChannelEnum.GICMALL.getChannel().equals(onLineStore.getChannel())){ for(OnLineStore onLineStore : onlineStoreList){
List<ShopDTO> result = shopApiService.getAllShopByEnterpriseIdAndName(enterpriseId, search, ShopTypeEnum.MALL_SHOP.getCode()).getResult(); if(StoreChannelEnum.GICMALL.getChannel().equals(onLineStore.getChannel())){
if(CollectionUtils.isNotEmpty(result)){ List<ShopDTO> result = shopApiService.getAllShopByEnterpriseIdAndName(enterpriseId, search, ShopTypeEnum.MALL_SHOP.getCode()).getResult();
for(ShopDTO dto : result){ if(CollectionUtils.isNotEmpty(result)){
if(onLineStore.getStoreIdList().contains(dto.getId().toString())){ for(ShopDTO dto : result){
StoreSearchVo storeSearchVo = new StoreSearchVo(); if(onLineStore.getStoreIdList().contains(dto.getId().toString())){
storeSearchVo.setId(dto.getId().toString()); StoreSearchVo storeSearchVo = new StoreSearchVo();
storeSearchVo.setName(dto.getName()); storeSearchVo.setId(dto.getId().toString());
storeSearchVo.setDesc(StoreChannelEnum.GICMALL.getMessage()); storeSearchVo.setName(dto.getName());
storeSearchVo.setIdChain("_" + StoreChannelEnum.GICMALL.getChannel() + "_" + dto.getId() +"_"); storeSearchVo.setDesc(StoreChannelEnum.GICMALL.getMessage());
storeSearchVo.setNameChain(StoreChannelEnum.GICMALL.getMessage() + "/" + dto.getName()); storeSearchVo.setIdChain("_" + StoreChannelEnum.GICMALL.getChannel() + "_" + dto.getId() +"_");
storeSearchVo.setChannel(StoreChannelEnum.GICMALL.getChannel()); storeSearchVo.setNameChain(StoreChannelEnum.GICMALL.getMessage() + "/" + dto.getName());
list.add(storeSearchVo); storeSearchVo.setChannel(StoreChannelEnum.GICMALL.getChannel());
} list.add(storeSearchVo);
} }
} }
} }
if(StoreChannelEnum.WMMALL.getChannel().equals(onLineStore.getChannel())){ }
List<WmStoreDTO> wmStoreList = wmStoreApiService.listWmStore(enterpriseId, search).getResult(); if(StoreChannelEnum.WMMALL.getChannel().equals(onLineStore.getChannel())){
if(CollectionUtils.isNotEmpty(wmStoreList)){ List<WmStoreDTO> wmStoreList = wmStoreApiService.listWmStore(onLineStore.getStoreIdList(),search).getResult();
for(WmStoreDTO wmStoreDTO : wmStoreList){ if(CollectionUtils.isNotEmpty(wmStoreList)){
if(onLineStore.getStoreIdList().contains(wmStoreDTO.getWmStoreId())){ for(WmStoreDTO wmStoreDTO : wmStoreList){
StoreSearchVo storeSearchVo = new StoreSearchVo(); if(onLineStore.getStoreIdList().contains(wmStoreDTO.getWmStoreId())){
storeSearchVo.setId(wmStoreDTO.getWmStoreId()); StoreSearchVo storeSearchVo = new StoreSearchVo();
storeSearchVo.setName(wmStoreDTO.getWmMainAccount()); storeSearchVo.setId(wmStoreDTO.getWmStoreId());
storeSearchVo.setDesc(StoreChannelEnum.WMMALL.getMessage()); storeSearchVo.setName(wmStoreDTO.getWmMainAccount());
storeSearchVo.setIdChain("_" + StoreChannelEnum.GICMALL.getChannel() + "_" + wmStoreDTO.getWmStoreId() +"_"); storeSearchVo.setDesc(StoreChannelEnum.WMMALL.getMessage());
storeSearchVo.setNameChain(StoreChannelEnum.GICMALL.getMessage() + "/" + wmStoreDTO.getWmMainAccount()); storeSearchVo.setIdChain("_" + StoreChannelEnum.WMMALL.getChannel() + "_" + wmStoreDTO.getWmStoreId() +"_");
storeSearchVo.setChannel(StoreChannelEnum.GICMALL.getChannel()); storeSearchVo.setNameChain(StoreChannelEnum.WMMALL.getMessage() + "/" + wmStoreDTO.getWmMainAccount());
list.add(storeSearchVo); storeSearchVo.setChannel(StoreChannelEnum.WMMALL.getChannel());
} storeSearchVo.setOwnType(wmStoreDTO.getEnterpriseId().equals(enterpriseId) ? 1 : 2);
list.add(storeSearchVo);
} }
} }
} }
} }
page.setResult(list);
page.setTotalCount(list.size());
page.setTotalPage(1);
} }
page.setResult(list);
page.setTotalCount(list.size());
page.setTotalPage(1);
} }
@RequestMapping("get-store-count") @RequestMapping("get-store-count")
...@@ -449,7 +474,7 @@ public class StoreWidgetController { ...@@ -449,7 +474,7 @@ public class StoreWidgetController {
} }
} }
}else if(StoreChannelEnum.WMMALL.getChannel().equals(type)){ }else if(StoreChannelEnum.WMMALL.getChannel().equals(type)){
List<WmStoreDTO> result = wmStoreApiService.listWmStore(enterpriseId).getResult(); List<WmStoreDTO> result = wmStoreApiService.listWmStore(storeIdList, null).getResult();
if(CollectionUtils.isNotEmpty(result)){ if(CollectionUtils.isNotEmpty(result)){
for(WmStoreDTO wmStoreDTO : result){ for(WmStoreDTO wmStoreDTO : result){
if(storeIdList.contains(wmStoreDTO.getWmMallStoreId().toString())){ if(storeIdList.contains(wmStoreDTO.getWmMallStoreId().toString())){
...@@ -458,6 +483,7 @@ public class StoreWidgetController { ...@@ -458,6 +483,7 @@ public class StoreWidgetController {
onLineStoreVo.setName(wmStoreDTO.getWmPidName()); onLineStoreVo.setName(wmStoreDTO.getWmPidName());
onLineStoreVo.setIdChain("_" + type + "_" + wmStoreDTO.getWmStoreId()+"_"); onLineStoreVo.setIdChain("_" + type + "_" + wmStoreDTO.getWmStoreId()+"_");
onLineStoreVo.setNameChain(StoreChannelEnum.WMMALL.getMessage() + "/" + wmStoreDTO.getWmPidName()); onLineStoreVo.setNameChain(StoreChannelEnum.WMMALL.getMessage() + "/" + wmStoreDTO.getWmPidName());
onLineStoreVo.setOwnType(enterpriseId == wmStoreDTO.getEnterpriseId() ? 1: 2);
list.add(onLineStoreVo); list.add(onLineStoreVo);
} }
} }
......
...@@ -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;
}
} }
...@@ -9,6 +9,7 @@ package com.gic.cloud.web.vo; ...@@ -9,6 +9,7 @@ package com.gic.cloud.web.vo;
public class MbrVo { public class MbrVo {
private String mbrAreaId; private String mbrAreaId;
private String mbrAreaName; private String mbrAreaName;
private Integer ownType;
public String getMbrAreaId() { public String getMbrAreaId() {
return mbrAreaId; return mbrAreaId;
...@@ -25,4 +26,12 @@ public class MbrVo { ...@@ -25,4 +26,12 @@ public class MbrVo {
public void setMbrAreaName(String mbrAreaName) { public void setMbrAreaName(String mbrAreaName) {
this.mbrAreaName = mbrAreaName; this.mbrAreaName = mbrAreaName;
} }
public Integer getOwnType() {
return ownType;
}
public void setOwnType(Integer ownType) {
this.ownType = ownType;
}
} }
...@@ -12,6 +12,7 @@ public class OnLineStoreVo { ...@@ -12,6 +12,7 @@ public class OnLineStoreVo {
private String idChain; private String idChain;
private String nameChain; private String nameChain;
private Integer hasChildren = 0; private Integer hasChildren = 0;
private Integer ownType;
public Integer getHasChildren() { public Integer getHasChildren() {
...@@ -53,4 +54,12 @@ public class OnLineStoreVo { ...@@ -53,4 +54,12 @@ public class OnLineStoreVo {
public void setNameChain(String nameChain) { public void setNameChain(String nameChain) {
this.nameChain = nameChain; this.nameChain = nameChain;
} }
public Integer getOwnType() {
return ownType;
}
public void setOwnType(Integer ownType) {
this.ownType = ownType;
}
} }
...@@ -14,6 +14,10 @@ public class StoreGroupItemsVo { ...@@ -14,6 +14,10 @@ public class StoreGroupItemsVo {
private Integer isStore = 0; private Integer isStore = 0;
private Integer hasChildren = 0; private Integer hasChildren = 0;
private Integer hasAttention = 0; private Integer hasAttention = 0;
/**
* 1自有 2共享
*/
private Integer ownType;
public Integer getId() { public Integer getId() {
return id; return id;
...@@ -70,4 +74,12 @@ public class StoreGroupItemsVo { ...@@ -70,4 +74,12 @@ public class StoreGroupItemsVo {
public void setHasAttention(Integer hasAttention) { public void setHasAttention(Integer hasAttention) {
this.hasAttention = hasAttention; this.hasAttention = hasAttention;
} }
public Integer getOwnType() {
return ownType;
}
public void setOwnType(Integer ownType) {
this.ownType = ownType;
}
} }
...@@ -15,6 +15,10 @@ public class StoreSearchVo { ...@@ -15,6 +15,10 @@ public class StoreSearchVo {
private Integer channel; private Integer channel;
private Integer hasAttention = 0; private Integer hasAttention = 0;
private Integer hasChildren = 0; private Integer hasChildren = 0;
/**
* 1自有 2共享
*/
private Integer ownType;
public String getId() { public String getId() {
return id; return id;
...@@ -79,4 +83,12 @@ public class StoreSearchVo { ...@@ -79,4 +83,12 @@ public class StoreSearchVo {
public void setHasChildren(Integer hasChildren) { public void setHasChildren(Integer hasChildren) {
this.hasChildren = hasChildren; this.hasChildren = hasChildren;
} }
public Integer getOwnType() {
return ownType;
}
public void setOwnType(Integer ownType) {
this.ownType = ownType;
}
} }
...@@ -9,6 +9,10 @@ package com.gic.cloud.web.vo; ...@@ -9,6 +9,10 @@ package com.gic.cloud.web.vo;
public class StoreTypeVo { public class StoreTypeVo {
private String id; private String id;
private String name; private String name;
/**
* 1自有 2共享
*/
private Integer ownType;
public String getId() { public String getId() {
return id; return id;
...@@ -25,4 +29,12 @@ public class StoreTypeVo { ...@@ -25,4 +29,12 @@ public class StoreTypeVo {
public void setName(String name) { public void setName(String name) {
this.name = name; this.name = name;
} }
public Integer getOwnType() {
return ownType;
}
public void setOwnType(Integer ownType) {
this.ownType = ownType;
}
} }
...@@ -15,6 +15,10 @@ public class StoreWidgetIndexVo { ...@@ -15,6 +15,10 @@ public class StoreWidgetIndexVo {
private Integer attentionCount = 0; private Integer attentionCount = 0;
private Integer singleRegion = 0; private Integer singleRegion = 0;
private Integer hasWgs = 0; private Integer hasWgs = 0;
/**
* 是否显示资源类型 1是 0否
*/
private Integer resourceType=0;
public Integer getType() { public Integer getType() {
return type; return type;
...@@ -55,4 +59,12 @@ public class StoreWidgetIndexVo { ...@@ -55,4 +59,12 @@ public class StoreWidgetIndexVo {
public void setHasWgs(Integer hasWgs) { public void setHasWgs(Integer hasWgs) {
this.hasWgs = hasWgs; this.hasWgs = hasWgs;
} }
public Integer getResourceType() {
return resourceType;
}
public void setResourceType(Integer 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