注册 审核调整

cert
wangwei 2 years ago
parent bded976381
commit f89bafb08c

@ -207,19 +207,22 @@ public class UserRegisterController extends BaseController {
userCompanyEntity.setCheckStatus(3+"");
userRegisterEntity.setCheckStatus(3+"");
}
//插入资质证书
for (UserCertEntity userCertEntity : registComPerResponse.getList()) {
userCertService.saveOrUpdate(userCertEntity);
}
userRegisterService.update(userRegisterEntity);
userCompanyService.update(userCompanyEntity);
//是否存在相同企业
UserCompanyEntity one = userCompanyService.getOne(new QueryWrapper<UserCompanyEntity>().eq("companyName", registComPerResponse.getCompanyName()).or().eq("creditNum", registComPerResponse.getCreditNum()));
if(one != null){
return ResultVOUtils.error(500,"已存在该企业!");
}else{
//插入资质证书
for (UserCertEntity userCertEntity : registComPerResponse.getList()) {
userCertService.saveOrUpdate(userCertEntity);
}
userRegisterService.update(userRegisterEntity);
userCompanyService.update(userCompanyEntity);
// userPersonService.update(userPersonEntity);
return ResultVOUtils.success();
}
return ResultVOUtils.success();
}
@ -261,8 +264,9 @@ public class UserRegisterController extends BaseController {
}
//通过之后 修改注册状态 和企业状态 将注册信息插入到系统负责人表中 生成用户名密码
userCheckEntity.setCheckResult(1+"");
userCheckEntity.setResultExplain("通过");
//生成账号密码
String userName = "YY"+UuidUtils.getShortUuid(4);
String userName = "YYJY"+UuidUtils.getShortUuid(4);
String password = "123456";
UserRegisterEntity id = userRegisterService.getOne(new QueryWrapper<UserRegisterEntity>().eq("id", registComPerResponse.getId()));
UserPersonEntity userPersonEntity = new UserPersonEntity();
@ -283,9 +287,10 @@ public class UserRegisterController extends BaseController {
userCheckEntity.setId(IdUtil.getSnowflakeNextId());
userCheckEntity.setBusinessId(Long.valueOf(registComPerResponse.getUcId()));
userCheckEntity.setCreateUser(registComPerResponse.getReviewer());
userCheckEntity.setCheckResult(0+"");
userCheckEntity.setResultExplain(registComPerResponse.getReason());
if(!"isPass".equals(registComPerResponse.getIsPass())){
userCheckEntity.setCheckResult(0+"");
userCheckEntity.setResultExplain(registComPerResponse.getReason());
}
userCheckEntity.setCreateTime(new Date());
// userCertSetEntity.setId(IdUtil.getSnowflakeNextId());

@ -27,8 +27,19 @@
</sql>
<select id="selectByRegisterId" parameterType="java.lang.String"
resultType="com.glxp.api.entity.sup.UserCertEntity">
SELECT a.id,c.name,c.isNeed,ifnull(a.businessId,#{registerId}) businessId,a.companyId,a.code,a.filePath,a.validDate,a.expireDate,a.checkStatus,a.checkTime,a.checkComment,a.status,a.remark
FROM user_cert_set c LEFT JOIN
SELECT a.id,c.name,c.isNeed,ifnull(a.businessId,#{registerId}) businessId,a.companyId,a.code,a.filePath,a.validDate,a.expireDate,a.checkStatus,a.checkTime,a.checkComment,a.status,a.remark
FROM user_cert_set c LEFT JOIN
(SELECT * from user_cert WHERE businessId=#{registerId}) a ON c.name = a.name
</select>
<select id="filterCompanyCert" parameterType="com.glxp.api.req.purchase.certRequest"
resultType="com.glxp.api.entity.sup.UserCertEntity">
select * from user_cert
<where>
<if test="businessId != '' and businessId!=null">
and businessId = #{businessId}
</if>
</where>
ORDER BY id DESC
</select>
</mapper>

Loading…
Cancel
Save