|
@@ -249,19 +249,17 @@ public class ExcelService {
|
|
|
pidList.add(pid);
|
|
|
}
|
|
|
}
|
|
|
- if(productSourceProductMap.size()<=1){
|
|
|
- for (String mchId : productSourceProductMap.keySet()) {
|
|
|
- ProductSource productSource = productSourceService.getByMchId(mchId);
|
|
|
- if(productSource !=null){
|
|
|
- JSONArray ids = new JSONArray();
|
|
|
- ids.addAll(productSourceProductMap.get(mchId));
|
|
|
- CdfProductListByIdsRequest idsRequest = new CdfProductListByIdsRequest(ids);
|
|
|
- CdfProductListByIdsVo vos = cdfHKClient.getProductListByIds(productSource.getCdfHost(), productSource.getCdfMchId(), idsRequest);
|
|
|
- if(vos.getProductCardList()!=null && vos.getProductCardList().size() >0){
|
|
|
- for (CdfProduct cdfProduct : vos.getProductCardList()) {
|
|
|
- List<String> pidList = resultPMap.computeIfAbsent(mchId, k -> new ArrayList<>());
|
|
|
- pidList.add(cdfProduct.getId());
|
|
|
- }
|
|
|
+ for (String mchId : productSourceProductMap.keySet()) {
|
|
|
+ ProductSource productSource = productSourceService.getByMchId(mchId);
|
|
|
+ if(productSource !=null){
|
|
|
+ JSONArray ids = new JSONArray();
|
|
|
+ ids.addAll(productSourceProductMap.get(mchId));
|
|
|
+ CdfProductListByIdsRequest idsRequest = new CdfProductListByIdsRequest(ids);
|
|
|
+ CdfProductListByIdsVo vos = cdfHKClient.getProductListByIds(productSource.getCdfHost(), productSource.getCdfMchId(), idsRequest);
|
|
|
+ if(vos.getProductCardList()!=null && vos.getProductCardList().size() >0){
|
|
|
+ for (CdfProduct cdfProduct : vos.getProductCardList()) {
|
|
|
+ List<String> pidList = resultPMap.computeIfAbsent(mchId, k -> new ArrayList<>());
|
|
|
+ pidList.add(cdfProduct.getId());
|
|
|
}
|
|
|
}
|
|
|
}
|