|
|
@ -28,6 +28,7 @@ import javax.servlet.http.HttpServletRequest; |
|
|
|
import java.io.IOException; |
|
|
|
import java.io.IOException; |
|
|
|
import java.util.Date; |
|
|
|
import java.util.Date; |
|
|
|
import java.util.HashMap; |
|
|
|
import java.util.HashMap; |
|
|
|
|
|
|
|
import java.util.List; |
|
|
|
import java.util.Map; |
|
|
|
import java.util.Map; |
|
|
|
|
|
|
|
|
|
|
|
@Api(value = "小程序-实名认证", tags = "小程序-实名认证") |
|
|
|
@Api(value = "小程序-实名认证", tags = "小程序-实名认证") |
|
|
@ -44,6 +45,24 @@ public class AliRealNameAuthenticationController { |
|
|
|
@Autowired |
|
|
|
@Autowired |
|
|
|
public EnterpriseCertificationService enterpriseCertificationService; |
|
|
|
public EnterpriseCertificationService enterpriseCertificationService; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ApiOperation(value = "删除平台全部认证信息") |
|
|
|
|
|
|
|
@PostMapping("/deletePlatformAuthenticationInformation") |
|
|
|
|
|
|
|
public R deletePlatformAuthenticationInformation(@ApiParam(name = "openIds", value = "微信openId", required = true) @RequestBody List<String> openIds) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
openIds.forEach(openId ->{ |
|
|
|
|
|
|
|
QueryWrapper<UserAuthenticationInformation> queryWrapper = new QueryWrapper<>(); |
|
|
|
|
|
|
|
queryWrapper.eq("open_id", openId); |
|
|
|
|
|
|
|
service.remove(queryWrapper); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
QueryWrapper<EnterpriseCertification> queryWrapper1 = new QueryWrapper<>(); |
|
|
|
|
|
|
|
queryWrapper1.eq("open_id", openId); |
|
|
|
|
|
|
|
enterpriseCertificationService.remove(queryWrapper1); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return R.ok(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ApiOperation(value = "身份证图片验证") |
|
|
|
@ApiOperation(value = "身份证图片验证") |
|
|
|
@PostMapping("/faceAuthentication") |
|
|
|
@PostMapping("/faceAuthentication") |
|
|
@ -157,7 +176,7 @@ public class AliRealNameAuthenticationController { |
|
|
|
HttpResponse response = HttpUtils.doGet(host, path, method, headers, querys); |
|
|
|
HttpResponse response = HttpUtils.doGet(host, path, method, headers, querys); |
|
|
|
CreditCodeResp info = new Gson().fromJson(EntityUtils.toString(response.getEntity()), CreditCodeResp.class); |
|
|
|
CreditCodeResp info = new Gson().fromJson(EntityUtils.toString(response.getEntity()), CreditCodeResp.class); |
|
|
|
if (info.getStatus()) { |
|
|
|
if (info.getStatus()) { |
|
|
|
if (!ObjectUtils.isEmpty(enterpriseCertificationService.checkWhetherItExists(enterpriseCertification.getCompanyName(), certification.getId(),enterpriseCertification.getOpenId()))) { |
|
|
|
if (!ObjectUtils.isEmpty(enterpriseCertificationService.checkWhetherItExists(enterpriseCertification.getCompanyName(), certification.getId(), enterpriseCertification.getOpenId()))) { |
|
|
|
errorMsg = "企业名称已存在"; |
|
|
|
errorMsg = "企业名称已存在"; |
|
|
|
throw new RuntimeException(errorMsg); |
|
|
|
throw new RuntimeException(errorMsg); |
|
|
|
} |
|
|
|
} |
|
|
@ -201,7 +220,7 @@ public class AliRealNameAuthenticationController { |
|
|
|
HttpResponse response = HttpUtils.doGet(host, path, method, headers, querys); |
|
|
|
HttpResponse response = HttpUtils.doGet(host, path, method, headers, querys); |
|
|
|
CreditCodeResp info = new Gson().fromJson(EntityUtils.toString(response.getEntity()), CreditCodeResp.class); |
|
|
|
CreditCodeResp info = new Gson().fromJson(EntityUtils.toString(response.getEntity()), CreditCodeResp.class); |
|
|
|
if (info.getStatus()) { |
|
|
|
if (info.getStatus()) { |
|
|
|
if (!ObjectUtils.isEmpty(enterpriseCertificationService.checkWhetherItExists(enterpriseCertification.getCompanyName(),null, enterpriseCertification.getOpenId()))) { |
|
|
|
if (!ObjectUtils.isEmpty(enterpriseCertificationService.checkWhetherItExists(enterpriseCertification.getCompanyName(), null, enterpriseCertification.getOpenId()))) { |
|
|
|
errorMsg = "企业名称已存在"; |
|
|
|
errorMsg = "企业名称已存在"; |
|
|
|
throw new RuntimeException(errorMsg); |
|
|
|
throw new RuntimeException(errorMsg); |
|
|
|
} |
|
|
|
} |
|
|
|