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