main
rong.liu 11 months ago
parent a03076c89c
commit 44f25504b5
  1. 4
      users/src/main/java/com/huoran/users/controller/EnterpriseCertificationController.java
  2. 5
      users/src/main/java/com/huoran/users/service/impl/EnterpriseCertificationServiceImpl.java

@ -35,7 +35,6 @@ public class EnterpriseCertificationController {
public EnterpriseCertificationService service;
/**
* 由前台申请认证后才有后台认证记录认证状态有 待审核已通过未驳回三种状态没有未提交这种状态
*
@ -79,7 +78,7 @@ public class EnterpriseCertificationController {
public R save(@RequestBody @ApiParam(name = "企业实名认证信息记录对象", value = "传入json格式", required = true) EnterpriseCertification enterpriseCertification, HttpServletRequest request) {
String accountId = TokenUtils.getIdByJwtToken(request);
enterpriseCertification.setAccountId(Integer.valueOf(accountId));
if (!ObjectUtils.isEmpty(service.checkWhetherItExists(enterpriseCertification.getCompanyName(), null, enterpriseCertification.getOpenId()))) {
if (!ObjectUtils.isEmpty(service.checkWhetherItExists(enterpriseCertification.getCompanyName(), null, null))) {
throw new RuntimeException("企业名称已存在");
}
boolean addState = service.save(enterpriseCertification);
@ -97,7 +96,6 @@ public class EnterpriseCertificationController {
}
@PostMapping("/informationAudit")
@ApiOperation(value = "信息审核", response = EnterpriseCertification.class)
public R informationAudit(@ApiParam(name = "auditStatus", value = "审核状态(2.通过,3.不通过)", required = true) @RequestParam Integer auditStatus,

@ -28,13 +28,14 @@ public class EnterpriseCertificationServiceImpl extends ServiceImpl<EnterpriseCe
public EnterpriseCertification checkWhetherItExists(String company_name, Integer id,String opnenId) {
QueryWrapper<EnterpriseCertification> wrapper = new QueryWrapper<>();
wrapper.eq("company_name", company_name);
/*if (!ObjectUtils.isEmpty(opnenId)){
wrapper.eq("open_id", opnenId);
}*/
if (!ObjectUtils.isEmpty(id)){
wrapper.last( " and id <> " + id);
}
//校验已经通过的企业名称是否重复
// wrapper.eq("audit_status", 2);
return getOne(wrapper);
}

Loading…
Cancel
Save