lyhzzz 1 yıl önce
ebeveyn
işleme
a4d202a770

+ 9 - 0
src/main/java/com/fdkankan/manage/controller/inner/InnerAPIController.java

@@ -30,12 +30,21 @@ public class InnerAPIController extends BaseController {
 
     @PostMapping("/getByRyId")
     public ResultData getByRyId(@RequestBody UserParam param){
+        if(StringUtils.isBlank(param.getRyNo()) || StringUtils.isBlank(param.getRyId())){
+            throw new BusinessException(ResultCode.MISSING_REQUIRED_PARAMETERS);
+        }
         JyUser jyuser = null;
         if(StringUtils.isNotBlank(param.getRyId())){
             jyuser = jyUserService.getByRyId(param.getRyId());
+            if(jyuser == null){
+                throw new BusinessException(ResultCode.JY_ID_NO_EXIST);
+            }
         }
         if(StringUtils.isBlank(param.getRyNo())){
             jyuser = jyUserService.getByRyNo(param.getRyNo());
+            if(jyuser == null){
+                throw new BusinessException(ResultCode.JY_ID_NO_EXIST);
+            }
         }
         return ResultData.ok(jyuser);
     }