Commit 2722d36c by zhiwj

Merge branch 'developer' of…

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