Commit b576d834 by guojuxing

查询分店,门店名称添加

parent 271250d5
......@@ -123,12 +123,19 @@ public class WmStoreSyncController {
if (storeDTO == null) {
return RestResponse.failure(ErrorCode.PARAMETER_ERROR.getCode(), "门店不存在");
}
List<StoreDTO> list = getStoreList(storeDTO.getStoreInfoId().toString(), true);
Map<String, String> map = list.stream().collect(Collectors.toMap(e -> e.getStoreInfoId().toString(), StoreDTO::getStoreName));
ServiceResponse<List<WeimobStoreGicInfoDTO>> result = weimobStoreSiteService.listStoreId(wmMallStoreId, storeDTO.getStoreInfoId());
if (result.isSuccess()) {
List<WeimobStoreGicInfoDTO> subStoreList = result.getResult();
if (CollectionUtils.isNotEmpty(subStoreList)) {
StringBuilder sb = new StringBuilder();
subStoreList.forEach(e -> {
sb.append(e.getStoreInfoId()).append(",");
});
List<StoreDTO> list = getStoreList(sb.toString(), true);
Map<String, String> map = list
.stream()
.collect(Collectors.toMap(e -> e.getStoreInfoId().toString(), StoreDTO::getStoreName));
List<WmBranchVO> voList = EntityUtil.changeEntityListNew(WmBranchVO.class, subStoreList);
voList.forEach(vo -> vo.setStoreName(map.get(vo.getStoreInfoId().toString())));
return RestResponse.success(voList);
......
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