浏览代码

产品接口问题处理

yzc 1 年之前
父节点
当前提交
e255b74e8f
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      hx-item/src/main/java/com/fjhx/item/service/product/impl/ProductInfoServiceImpl.java

+ 3 - 1
hx-item/src/main/java/com/fjhx/item/service/product/impl/ProductInfoServiceImpl.java

@@ -231,7 +231,9 @@ public class ProductInfoServiceImpl extends ServiceImpl<ProductInfoMapper, Produ
         List<Long> customerIds = new ArrayList<>();
         List<Long> customerIds = new ArrayList<>();
         for (ProductInfoVo record : records) {
         for (ProductInfoVo record : records) {
             ProductInfoEhsdJson productInfoEhsdJson = JSONObject.parseObject(record.getEhsdJson(), ProductInfoEhsdJson.class);
             ProductInfoEhsdJson productInfoEhsdJson = JSONObject.parseObject(record.getEhsdJson(), ProductInfoEhsdJson.class);
-            customerIds.add(Long.parseLong(productInfoEhsdJson.getCustomerId()));
+            if(ObjectUtil.isNotEmpty(productInfoEhsdJson.getCustomerId())) {
+                customerIds.add(Long.parseLong(productInfoEhsdJson.getCustomerId()));
+            }
         }
         }
         if (ObjectUtil.isNotEmpty(customerIds)) {
         if (ObjectUtil.isNotEmpty(customerIds)) {
             Map<Long, String> customerMap = customerService.mapKV(Customer::getId, Customer::getName, q -> q.in(Customer::getId, customerIds));
             Map<Long, String> customerMap = customerService.mapKV(Customer::getId, Customer::getName, q -> q.in(Customer::getId, customerIds));