Преглед на файлове

产品接口问题处理

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));