ソースを参照

4/6 新增产品类别时许可费率为非必传,对许可费率进行判断需要先判断是否为Null

chendayu 2 年 前
コミット
017d50e940

+ 1 - 1
PAS/src/main/java/cn/cslg/pas/service/impl/ProductCategoryServiceImpl.java

@@ -65,7 +65,7 @@ public class ProductCategoryServiceImpl implements IProductCategoryService {
 
         //检查许可费率数值是否合法
         Double licenseRate = productCategoryAddNewDTO.getLicenseRate();
-        if (licenseRate < 0 || licenseRate > 1) {
+        if (licenseRate != null && (licenseRate < 0 || licenseRate > 1)) {
             String message = "新增产品失败,许可费率不合法,请填写正确数值";
             log.info("{}", message);
             throw new XiaoShiException(message);