Merge remote-tracking branch 'origin/main'

main
cheney 11 months ago
commit 888ad01be7
  1. 6
      users/src/main/java/com/huoran/users/controller/EnterpriseCertificationController.java
  2. 8
      users/src/main/java/com/huoran/users/mapper/xml/EnterpriseCertificationMapper.xml

@ -10,6 +10,7 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam; import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
@ -33,6 +34,8 @@ public class EnterpriseCertificationController {
@Autowired @Autowired
public EnterpriseCertificationService service; public EnterpriseCertificationService service;
/** /**
* 由前台申请认证后才有后台认证记录认证状态有 待审核已通过未驳回三种状态没有未提交这种状态 * 由前台申请认证后才有后台认证记录认证状态有 待审核已通过未驳回三种状态没有未提交这种状态
* *
@ -76,6 +79,9 @@ public class EnterpriseCertificationController {
public R save(@RequestBody @ApiParam(name = "企业实名认证信息记录对象", value = "传入json格式", required = true) EnterpriseCertification enterpriseCertification, HttpServletRequest request) { public R save(@RequestBody @ApiParam(name = "企业实名认证信息记录对象", value = "传入json格式", required = true) EnterpriseCertification enterpriseCertification, HttpServletRequest request) {
String accountId = TokenUtils.getIdByJwtToken(request); String accountId = TokenUtils.getIdByJwtToken(request);
enterpriseCertification.setAccountId(Integer.valueOf(accountId)); enterpriseCertification.setAccountId(Integer.valueOf(accountId));
if (!ObjectUtils.isEmpty(service.checkWhetherItExists(enterpriseCertification.getCompanyName(), null, enterpriseCertification.getOpenId()))) {
throw new RuntimeException("企业名称已存在");
}
boolean addState = service.save(enterpriseCertification); boolean addState = service.save(enterpriseCertification);
return addState ? R.ok() : R.error("新增失败"); return addState ? R.ok() : R.error("新增失败");
} }

@ -34,13 +34,13 @@
t.platform_source = #{req.platformSource} t.platform_source = #{req.platformSource}
<if test=" req.auditStatus!= null and req.auditStatus!= ''"> <if test=" req.auditStatus!= null and req.auditStatus!= '' or req.auditStatus ==0">
and t.audit_status =#{req.auditStatus,jdbcType=VARCHAR} and t.audit_status =#{req.auditStatus,jdbcType=INTEGER}
</if> </if>
<if test=" req.authenticationStatus!= null and req.authenticationStatus!= ''"> <if test=" req.authenticationStatus!= null and req.authenticationStatus!= '' or req.authenticationStatus ==0">
and t.authentication_status =#{req.authenticationStatus,jdbcType=VARCHAR} and t.authentication_status =#{req.authenticationStatus,jdbcType=INTEGER}
</if> </if>
<if test="req.startCommitTime != '' and req.startCommitTime!= null <if test="req.startCommitTime != '' and req.startCommitTime!= null

Loading…
Cancel
Save