main
rong.liu 11 months ago
parent 630cf4bdab
commit 81ab756cc4
  1. 35
      users/src/main/java/com/huoran/users/controller/AliRealNameAuthenticationController.java

@ -25,6 +25,7 @@ import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.apache.http.HttpResponse;
import org.apache.http.util.EntityUtils;
import org.jetbrains.annotations.NotNull;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.*;
@ -225,7 +226,9 @@ public class AliRealNameAuthenticationController {
}
enterpriseCertificationService.updateById(enterpriseCertification);
return R.ok("提交成功,请等待审核!");
//更改二次验证的组织信息
return changeTeamInformation(enterpriseCertification);
} else {
errorMsg = info.getReason();
return R.error().put("message", info.getReason());
@ -239,6 +242,22 @@ public class AliRealNameAuthenticationController {
}
@NotNull
private R changeTeamInformation(@RequestBody EnterpriseCertification enterpriseCertification) {
enterpriseCertification.setSubmitTime(new Date());
QueryWrapper<HrUserAccount> accountQueryWrapper1 = new QueryWrapper<>();
accountQueryWrapper1.eq("app_open_id", enterpriseCertification.getOpenId());
accountQueryWrapper1.eq("platform_id", enterpriseCertification.getPlatformSource());
HrUserAccount userAccount1 = userAccountService.getOne(accountQueryWrapper1);
userAccount1.setAccount(enterpriseCertification.getCompanyName());
userAccountService.updateById(userAccount1);
UpdateWrapper<HrUserInfo> userInfoUpdateWrapper = new UpdateWrapper<>();
userInfoUpdateWrapper.set("user_name", enterpriseCertification.getCompanyName());
userInfoUpdateWrapper.eq("user_id", userAccount1.getUserId());
userInfoService.update(new HrUserInfo(), userInfoUpdateWrapper);
return R.ok("提交成功,请等待审核!");
}
@ApiOperation(value = "统一社会信用代码认证(auditStatus给1,新增认证状态为待审核,用于个人认证幼儿园或供应商情况下)", response = CreditCodeResp.class)
@PostMapping("/organizationCertification")
public R organizationCertification(@RequestBody EnterpriseCertification enterpriseCertification, HttpServletRequest request) throws IOException {
@ -271,19 +290,7 @@ public class AliRealNameAuthenticationController {
enterpriseCertificationService.save(enterpriseCertification);
//更改二次验证的组织信息
enterpriseCertification.setSubmitTime(new Date());
QueryWrapper<HrUserAccount> accountQueryWrapper1 = new QueryWrapper<>();
accountQueryWrapper1.eq("app_open_id", enterpriseCertification.getOpenId());
accountQueryWrapper1.eq("platform_id", enterpriseCertification.getPlatformSource());
HrUserAccount userAccount1 = userAccountService.getOne(accountQueryWrapper1);
userAccount1.setAccount(enterpriseCertification.getCompanyName());
userAccountService.updateById(userAccount1);
UpdateWrapper<HrUserInfo> userInfoUpdateWrapper = new UpdateWrapper<>();
userInfoUpdateWrapper.set("user_name", enterpriseCertification.getCompanyName());
userInfoUpdateWrapper.eq("user_id", userAccount1.getUserId());
userInfoService.update(new HrUserInfo(), userInfoUpdateWrapper);
return R.ok("提交成功,请等待审核!");
return changeTeamInformation(enterpriseCertification);
} else {
errorMsg = info.getReason();

Loading…
Cancel
Save