diff --git a/jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/employController/CommonApiController.java b/jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/employController/CommonApiController.java index 4e16436..add1cae 100644 --- a/jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/employController/CommonApiController.java +++ b/jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/employController/CommonApiController.java @@ -182,6 +182,21 @@ public class CommonApiController { @ApiOperation(value="我的服务-个人实名认证", notes="我的服务-个人实名认证") @RequestMapping(value = "/addAuthenticationPerson", method = {RequestMethod.POST}) public Result addAuthenticationPerson(@RequestHeader("X-Access-Token") String token, EmployAuthenticationPerson employAuthenticationPerson){ + String message = null; + //参数校验 + if(null == employAuthenticationPerson.getCerNo()){ + message = "证件号码为空,请输入正确的证件号码"; + }else if(null == employAuthenticationPerson.getName()){ + message = "姓名为空,请输入姓名"; + }else if(null == employAuthenticationPerson.getPhone()){ + message = "联系方式为空,请输入手机号码"; + } + //参数输入有误,返回错误信息 + if(null != message){ + return Result.OK(message); + } + + //业务处理 return commonApiService.addAuthenticationPerson(token, employAuthenticationPerson); } @@ -189,6 +204,23 @@ public class CommonApiController { @ApiOperation(value="我的服务-企业实名认证", notes="我的服务-企业实名认证") @RequestMapping(value = "/addAuthenticationCompany", method = {RequestMethod.POST}) public Result addAuthenticationCompany(@RequestHeader("X-Access-Token") String token, EmployAhthenticationCompany employAhthenticationCompany){ + String message = null; + //参数校验 + if(null == employAhthenticationCompany.getBusinessLicense()){ + message = "营业执照未上传,请上传营业执照"; + }else if(null == employAhthenticationCompany.getCompanyName()){ + message = "企业名称为空,请填写企业名称"; + }else if(null == employAhthenticationCompany.getLegalPerson()){ + message = "法定代表人姓名为空,请填写法定代表人姓名"; + }else if(null == employAhthenticationCompany.getCompanyAddress()){ + message = "企业地址为空,请填写企业地址"; + } + //参数输入有误,返回错误信息 + if(null != message){ + return Result.OK(message); + } + + //业务处理 return commonApiService.addAuthenticationCompany(token, employAhthenticationCompany); } //