Commit 68025b48 by 陶光胜

观云台小程序

parent 449fcf2e
package com.gic.cloud.web.controller;
import com.alibaba.druid.sql.ast.statement.SQLForeignKeyImpl;
import com.alibaba.fastjson.JSON;
import com.gic.api.base.commons.Page;
import com.gic.api.base.commons.ServiceResponse;
......@@ -257,30 +258,44 @@ public class StoreWidgetController {
}
}
}else{ //线上店铺
List<StoreSearchVo> list = new ArrayList<>();
List<ShopDTO> result = shopApiService.getAllShopByEnterpriseIdAndName(enterpriseId, search, ShopTypeEnum.MALL_SHOP.getCode()).getResult();
if(CollectionUtils.isNotEmpty(result)){
for(ShopDTO dto : result){
StoreSearchVo storeSearchVo = new StoreSearchVo();
storeSearchVo.setId(dto.getId().toString());
storeSearchVo.setName(dto.getName());
storeSearchVo.setDesc(StoreChannelEnum.GICMALL.getMessage());
list.add(storeSearchVo);
}
}
List<WmStoreDTO> result1 = wmStoreApiService.listWmStore(enterpriseId, search).getResult();
if(CollectionUtils.isNotEmpty(result1)){
for(WmStoreDTO wmStoreDTO : result1){
StoreSearchVo storeSearchVo = new StoreSearchVo();
storeSearchVo.setId(wmStoreDTO.getWmStoreId());
storeSearchVo.setName(wmStoreDTO.getWmMainAccount());
storeSearchVo.setDesc(StoreChannelEnum.WMMALL.getMessage());
list.add(storeSearchVo);
OnLineAuth onlineStore = this.dataAuthUtils.getOnlineStore(userId, enterpriseId);
if(onlineStore.isHasAuth()){
List<StoreSearchVo> list = new ArrayList<>();
List<OnLineStore> onlineStoreList = onlineStore.getList();
for(OnLineStore onLineStore : onlineStoreList){
if(onLineStore.getChannel() == StoreChannelEnum.GICMALL.getChannel()){
List<ShopDTO> result = shopApiService.getAllShopByEnterpriseIdAndName(enterpriseId, search, ShopTypeEnum.MALL_SHOP.getCode()).getResult();
if(CollectionUtils.isNotEmpty(result)){
for(ShopDTO dto : result){
if(onLineStore.getStoreIdList().contains(dto.getId().toString())){
StoreSearchVo storeSearchVo = new StoreSearchVo();
storeSearchVo.setId(dto.getId().toString());
storeSearchVo.setName(dto.getName());
storeSearchVo.setDesc(StoreChannelEnum.GICMALL.getMessage());
list.add(storeSearchVo);
}
}
}
}
if(onLineStore.getChannel() == StoreChannelEnum.WMMALL.getChannel()){
List<WmStoreDTO> result1 = wmStoreApiService.listWmStore(enterpriseId, search).getResult();
if(CollectionUtils.isNotEmpty(result1)){
for(WmStoreDTO wmStoreDTO : result1){
if(onLineStore.getStoreIdList().contains(wmStoreDTO.getWmStoreId())){
StoreSearchVo storeSearchVo = new StoreSearchVo();
storeSearchVo.setId(wmStoreDTO.getWmStoreId());
storeSearchVo.setName(wmStoreDTO.getWmMainAccount());
storeSearchVo.setDesc(StoreChannelEnum.WMMALL.getMessage());
list.add(storeSearchVo);
}
}
}
}
}
page.setResult(list);
page.setTotalCount(list.size());
page.setTotalPage(1);
}
page.setResult(list);
page.setTotalCount(list.size());
page.setTotalPage(1);
}
return RestResponse.success(page);
}
......
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