Browse Source

优化代码

gaodm 6 years ago
parent
commit
49058b5676

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