瀏覽代碼

优化代码

gaodm 6 年之前
父節點
當前提交
49058b5676
共有 1 個文件被更改,包括 3 次插入3 次删除
  1. 3 3
      icssman-service/src/main/java/com/diagbot/facade/DeptInfoFacade.java

+ 3 - 3
icssman-service/src/main/java/com/diagbot/facade/DeptInfoFacade.java

@@ -74,7 +74,7 @@ public class DeptInfoFacade extends DeptInfoServiceImpl {
     public Boolean updateDeptInfo(UpdateDeptInfoVO updateDeptInfoVO) {
         //判断科室是否已被删除
         if(deptInfoIsDeletedStatus(updateDeptInfoVO.getId())){
-            throw new CommonException(CommonErrorCode.RPC_ERROR,
+            throw new CommonException(CommonErrorCode.NOT_EXISTS,
                     "科室已删除");
         }
         //修改操作
@@ -95,7 +95,7 @@ public class DeptInfoFacade extends DeptInfoServiceImpl {
     public Boolean deleteDeptInfo(DeleteDeptInfoVO deleteDeptInfoVO) {
         //判断科室是否已被删除
         if(deptInfoIsDeletedStatus(deleteDeptInfoVO.getId())){
-            throw new CommonException(CommonErrorCode.RPC_ERROR,
+            throw new CommonException(CommonErrorCode.NOT_EXISTS,
                     "科室已删除");
         }
         //删除操作
@@ -156,7 +156,7 @@ public class DeptInfoFacade extends DeptInfoServiceImpl {
                     .eq("id",getDeptInfoDetialsVO.getId());
         DeptInfo deptInfo = this.getOne(queryWrapper);
         if(deptInfo == null){
-            throw new CommonException(CommonErrorCode.RPC_ERROR,
+            throw new CommonException(CommonErrorCode.NOT_EXISTS,
                     "科室信息不存在");
         }
         return deptInfo;