Commit c9ee68e2 authored by limei's avatar limei

企业注册接口校验修改

parent 2da620c9
......@@ -294,7 +294,7 @@ public class CompanyController extends BaseController {
public ResponseModel<Boolean> hasExistUser( @PathVariable(value = "adminLoginName") String adminLoginName) {
Boolean flag = false;
Company company = companyServiceImpl.getOne(new LambdaQueryWrapper<Company>().eq(Company::getAdminLoginName,adminLoginName));
if(ValidationUtil.isEmpty(company)) {
if(!ValidationUtil.isEmpty(company)) {
flag = true;
}
return ResponseHelper.buildResponse(flag);
......@@ -419,7 +419,7 @@ public class CompanyController extends BaseController {
public ResponseModel<Boolean> hasExistPhone( @PathVariable(value = "adminTel") String adminTel) {
Boolean flag = false;
Company company = companyServiceImpl.getOne(new LambdaQueryWrapper<Company>().eq(Company::getAdminTel,adminTel));
if(ValidationUtil.isEmpty(company)) {
if(!ValidationUtil.isEmpty(company)) {
flag = true;
}
return ResponseHelper.buildResponse(flag);
......@@ -435,8 +435,11 @@ public class CompanyController extends BaseController {
@ApiOperation(httpMethod = "GET", value = "判断组织机构是否存在", notes = "判断组织机构是否存在")
public ResponseModel<Boolean> hasExistUnit( @PathVariable(value = "creditCode") String creditCode) {
Boolean flag = false;
Company company = companyServiceImpl.getOne(new LambdaQueryWrapper<Company>().eq(Company::getCreditCode,creditCode));
if(ValidationUtil.isEmpty(company)) {
LambdaQueryWrapper<Company> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(Company::getCreditCode,creditCode);
Company company = companyServiceImpl.getOne(wrapper);
// Company company = companyServiceImpl.getOne(new LambdaQueryWrapper<Company>().eq(Company::getCreditCode,creditCode));
if(!ValidationUtil.isEmpty(company)) {
flag = true;
}
return ResponseHelper.buildResponse(flag);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment