浏览代码

fix: 添加返回异常code

fangxinjian 4 年之前
父节点
当前提交
1b32d7f3cc

+ 1 - 1
abi-cloud-qr-platform-server/src/main/java/com/abi/qms/platform/service/impl/BoxCodeFormatImpl.java

@@ -144,7 +144,7 @@ public class BoxCodeFormatImpl implements BoxCodeFormatService {
         //查询箱码幅面
         BoxCodeFormat boxCodeFormat = boxCodeFormatMapper.selectById(req.getId());
         if (boxCodeFormat == null) {
-            throw new BusinessException(ErrorCodeEnum.ERROR_PARAM.getCode(),"箱码幅面不存在");
+            throw new BusinessException(ErrorCodeEnum.NO_EXISTS_DATA.getCode(), "箱码幅面不存在");
         }
 
         //逻辑删除

+ 1 - 1
abi-cloud-qr-platform-server/src/main/java/com/abi/qms/platform/service/impl/DepartmentServiceImpl.java

@@ -182,7 +182,7 @@ public class DepartmentServiceImpl implements DepartmentService {
                 //1-校验必填与枚举
                 String errorMessage = checkDepartmentProperty(departmentProperty);
                 if (StringUtils.isNotBlank(errorMessage)) {
-                    throw new BusinessException(errorMessage);
+                    throw new BusinessException(ErrorCodeEnum.ERROR_PARAM.getCode(), errorMessage);
                 }
 
                 //2-调用业务代码新增