Commit 208e11b5 by 陶光胜

观云台小程序

parent defd7618
......@@ -111,17 +111,20 @@ public class StoreWidgetController {
storeGroupIdList = new ArrayList<>(storeGroupId);
}
Page<StoreGroupDTO> page = this.storeGroupApiService.pageStoreGroupByIds(storeGroupIdList, enterpriseId, parentId, null, pageSize, pageNum).getResult();
StoreGroupVo vo = new StoreGroupVo();
Page<StoreGroupItemsVo> groupVoPage = new Page<>(pageNum, pageSize);
List<StoreGroupItemsVo> items = new ArrayList<>();
if(CollectionUtils.isNotEmpty(page.getResult())){
for(StoreGroupDTO storeGroupDTO : page.getResult()){
StoreGroupItemsVo itemsVo = new StoreGroupItemsVo();
itemsVo.setId(storeGroupDTO.getStoreGroupId());
itemsVo.setName(storeGroupDTO.getStoreGroupName());
itemsVo.setChain(storeGroupDTO.getStoreGroupChain());
List<StoreGroupDTO> result = this.storeGroupApiService.pageStoreGroupByIds(storeGroupIdList, enterpriseId, parentId,null, pageSize, pageNum).getResult().getResult();
itemsVo.setHasChildren(CollectionUtils.isEmpty(result) ? 0 : 1);
items.add(itemsVo);
}
groupVoPage.setTotalCount(page.getTotalCount());
groupVoPage.setTotalPage(page.getTotalPage());
}else {
StoreSearchDTO storeSearchDTO = new StoreSearchDTO();
storeSearchDTO.setEnterpriseId(enterpriseId);
......@@ -136,10 +139,12 @@ public class StoreWidgetController {
itemsVo.setIsStore(1);
items.add(itemsVo);
}
groupVoPage.setTotalCount(response.getResult().getTotalCount());
groupVoPage.setTotalPage(response.getResult().getTotalPage());
}
}
vo.setItems(items);
return RestResponse.success(vo);
groupVoPage.setResult(items);
return RestResponse.success(groupVoPage);
}
@RequestMapping("store-type")
......
......@@ -3,6 +3,7 @@ package com.gic.cloud.web.vo;
public class StoreGroupItemsVo {
private Integer id;
private String name;
private String chain;
private Integer isStore = 0;
private Integer hasChildren = 0;
......@@ -37,4 +38,12 @@ public class StoreGroupItemsVo {
public void setHasChildren(Integer hasChildren) {
this.hasChildren = hasChildren;
}
public String getChain() {
return chain;
}
public void setChain(String chain) {
this.chain = chain;
}
}
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