فهرست منبع

产品接口问题处理

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<>();
         for (ProductInfoVo record : records) {
             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)) {
             Map<Long, String> customerMap = customerService.mapKV(Customer::getId, Customer::getName, q -> q.in(Customer::getId, customerIds));