标签:new 查询 lis style list() service bsp Collector constant
// 封装返回对象 String bizDataStr = bizMessage.getBizDataStr(); ConSellerGoods conSellerGoods = JsonUtil.fromJson(bizDataStr, ConSellerGoods.class); // 获取商家编码和商品编码,查询所有设备商品信息 GoodsBoxDto goodsBoxDto = new GoodsBoxDto(); goodsBoxDto.setSellerNo(conSellerGoods.getSellerNo()); ArrayList<String> listSkus = new ArrayList<>(); listSkus.add(conSellerGoods.getGoodsNo()); goodsBoxDto.setSkuList(listSkus); Result result = conBoxGoodsService.getBoxGoodsList(goodsBoxDto); if (result.isSuccess()) { List<ConBoxGoods> conBoxGoodsList = (List<ConBoxGoods>) result.get(BaseConstants.SERVICE_RESULT_SUCCESS_CODE); // 设备列表-根据商家和设备查询设备商品列表 // List<GoodsBoxDto> listSellerBox = conBoxGoodsList.stream() // .map(e -> new GoodsBoxDto(e.getSellerNo(), e.getBoxNo())) // .collect(Collectors.toList()); List<String> listBoxNos=conBoxGoodsList.stream().map(p->p.getBoxNo()).collect(Collectors.toList()); UIGoodsBoxDto uiGoodsBoxDto = new UIGoodsBoxDto(); uiGoodsBoxDto.setSellerNo(conSellerGoods.getSellerNo()); uiGoodsBoxDto.setListBoxNos(listBoxNos); Result boxGoodsListByListResult = conBoxGoodsService.getBoxGoodsListByListDto(uiGoodsBoxDto); // 根据商家和设备分组 List<ConBoxGoods> conBoxGoodsList2 = (List<ConBoxGoods>) boxGoodsListByListResult.get(BaseConstants.SERVICE_RESULT_SUCCESS_CODE); Map<String, List<ConBoxGoods>> listSellerBox2 = conBoxGoodsList2.stream().collect(Collectors.groupingBy(e -> fetchGroupKey(e))); ICRBoxListRequestDto icrBoxListRequestDto = new ICRBoxListRequestDto(); ArrayList<ICRSkuRequestDto> icrSkuRequestDtoArrayList = new ArrayList<>();
标签:new 查询 lis style list() service bsp Collector constant
原文地址:https://www.cnblogs.com/honghong75042/p/12540186.html