init
This commit is contained in:
@@ -5,11 +5,18 @@ import lombok.Data;
|
|||||||
|
|
||||||
@Data
|
@Data
|
||||||
public class UpdateUserAuthInfoReq {
|
public class UpdateUserAuthInfoReq {
|
||||||
@Schema(description = "提交学历认证")
|
/**
|
||||||
private Boolean pushEducationAuth;
|
* 单身认证
|
||||||
|
*/
|
||||||
|
@Schema(description = "单身认证")
|
||||||
|
private Boolean singlePersonAuth;
|
||||||
|
@Schema(description = "单身认证JSON数据")
|
||||||
|
private String singleJson;
|
||||||
/**
|
/**
|
||||||
* 学历照片
|
* 学历照片
|
||||||
*/
|
*/
|
||||||
|
@Schema(description = "提交学历认证")
|
||||||
|
private Boolean pushEducationAuth;
|
||||||
@Schema(description = "学历照片")
|
@Schema(description = "学历照片")
|
||||||
private String educationPic;
|
private String educationPic;
|
||||||
@Schema(description = "提交工作认证")
|
@Schema(description = "提交工作认证")
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|||||||
import com.ruoyi.common.exception.ServiceException;
|
import com.ruoyi.common.exception.ServiceException;
|
||||||
import com.ruoyi.common.helper.LoginHelper;
|
import com.ruoyi.common.helper.LoginHelper;
|
||||||
import com.ruoyi.common.utils.BeanConvertUtil;
|
import com.ruoyi.common.utils.BeanConvertUtil;
|
||||||
import com.ruoyi.common.utils.StringUtils;
|
|
||||||
import com.ruoyi.xq.domain.*;
|
import com.ruoyi.xq.domain.*;
|
||||||
import com.ruoyi.xq.dto.app.common.UserPicturesDTO;
|
import com.ruoyi.xq.dto.app.common.UserPicturesDTO;
|
||||||
import com.ruoyi.xq.dto.app.user.AddPicturesReq;
|
import com.ruoyi.xq.dto.app.user.AddPicturesReq;
|
||||||
@@ -290,6 +289,19 @@ public class CurrentUserManager {
|
|||||||
public void updateInfoAuth(UpdateUserAuthInfoReq req) {
|
public void updateInfoAuth(UpdateUserAuthInfoReq req) {
|
||||||
Long userId = LoginHelper.getUserId();
|
Long userId = LoginHelper.getUserId();
|
||||||
User user = userService.getById(userId);
|
User user = userService.getById(userId);
|
||||||
|
if(BooleanUtils.isTrue(req.getSinglePersonAuth())){ // 单身认证
|
||||||
|
if(req.getSingleJson() == null){
|
||||||
|
throw new ServiceException("请上传车辆认证照片");
|
||||||
|
}
|
||||||
|
boolean update = userAuthService.update(Wrappers.lambdaUpdate(UserAuth.class)
|
||||||
|
.eq(UserAuth::getUserId, userId)
|
||||||
|
.in(UserAuth::getSinglePersonAuth, AuditEnum.NO.getCode(), AuditEnum.FAIL.getCode())
|
||||||
|
.set(UserAuth::getSinglePersonAuth, AuditEnum.AUDITING.getCode()));
|
||||||
|
if(!update){
|
||||||
|
throw new ServiceException("单身认证正在审核中,请勿重复提交");
|
||||||
|
}
|
||||||
|
userAuthAuditService.saveAuthAudit(user,UserAuthTypeEnum.SINGLE,null,null,req.getSingleJson());
|
||||||
|
}
|
||||||
if(BooleanUtils.isTrue(req.getPushCarAuth())){ // 车辆认证
|
if(BooleanUtils.isTrue(req.getPushCarAuth())){ // 车辆认证
|
||||||
if(req.getCarPic() == null){
|
if(req.getCarPic() == null){
|
||||||
throw new ServiceException("请上传车辆认证照片");
|
throw new ServiceException("请上传车辆认证照片");
|
||||||
@@ -325,7 +337,7 @@ public class CurrentUserManager {
|
|||||||
.in(UserAuth::getEducationAuth, AuditEnum.NO.getCode(), AuditEnum.FAIL.getCode())
|
.in(UserAuth::getEducationAuth, AuditEnum.NO.getCode(), AuditEnum.FAIL.getCode())
|
||||||
.set(UserAuth::getEducationAuth, AuditEnum.AUDITING.getCode()));
|
.set(UserAuth::getEducationAuth, AuditEnum.AUDITING.getCode()));
|
||||||
if(!update){
|
if(!update){
|
||||||
throw new ServiceException("房产认证正在审核中,请勿重复提交");
|
throw new ServiceException("学历认证正在审核中,请勿重复提交");
|
||||||
}
|
}
|
||||||
userAuthAuditService.saveAuthAudit(user,UserAuthTypeEnum.EDUCATION,req.getEducationPic());
|
userAuthAuditService.saveAuthAudit(user,UserAuthTypeEnum.EDUCATION,req.getEducationPic());
|
||||||
}
|
}
|
||||||
@@ -338,7 +350,7 @@ public class CurrentUserManager {
|
|||||||
.in(UserAuth::getMarriageAuth, AuditEnum.NO.getCode(), AuditEnum.FAIL.getCode())
|
.in(UserAuth::getMarriageAuth, AuditEnum.NO.getCode(), AuditEnum.FAIL.getCode())
|
||||||
.set(UserAuth::getMarriageAuth, AuditEnum.AUDITING.getCode()));
|
.set(UserAuth::getMarriageAuth, AuditEnum.AUDITING.getCode()));
|
||||||
if(!update){
|
if(!update){
|
||||||
throw new ServiceException("房产认证正在审核中,请勿重复提交");
|
throw new ServiceException("婚况认证正在审核中,请勿重复提交");
|
||||||
}
|
}
|
||||||
userAuthAuditService.saveAuthAudit(user,UserAuthTypeEnum.MARRIAGE,req.getMarriagePic());
|
userAuthAuditService.saveAuthAudit(user,UserAuthTypeEnum.MARRIAGE,req.getMarriagePic());
|
||||||
}
|
}
|
||||||
@@ -355,7 +367,7 @@ public class CurrentUserManager {
|
|||||||
.in(UserAuth::getJobAuth, AuditEnum.NO.getCode(), AuditEnum.FAIL.getCode())
|
.in(UserAuth::getJobAuth, AuditEnum.NO.getCode(), AuditEnum.FAIL.getCode())
|
||||||
.set(UserAuth::getJobAuth, AuditEnum.AUDITING.getCode()));
|
.set(UserAuth::getJobAuth, AuditEnum.AUDITING.getCode()));
|
||||||
if(!update){
|
if(!update){
|
||||||
throw new ServiceException("房产认证正在审核中,请勿重复提交");
|
throw new ServiceException("工作认证正在审核中,请勿重复提交");
|
||||||
}
|
}
|
||||||
String authRemark = String.format("【%s】工作认证", userAuthJobAuthTypeEnum.getText());
|
String authRemark = String.format("【%s】工作认证", userAuthJobAuthTypeEnum.getText());
|
||||||
userAuthAuditService.saveAuthAudit(user,UserAuthTypeEnum.JOB,req.getJobPic(),authRemark);
|
userAuthAuditService.saveAuthAudit(user,UserAuthTypeEnum.JOB,req.getJobPic(),authRemark);
|
||||||
|
|||||||
@@ -16,11 +16,15 @@ import com.ruoyi.xq.enums.user.UserAuthTypeEnum;
|
|||||||
*/
|
*/
|
||||||
public interface UserAuthAuditService extends IService<UserAuthAudit> {
|
public interface UserAuthAuditService extends IService<UserAuthAudit> {
|
||||||
|
|
||||||
void saveAuthAudit(User user, UserAuthTypeEnum userAuthType, String pic, String remark);
|
default void saveAuthAudit(User user, UserAuthTypeEnum userAuthType, String pic, String remark){
|
||||||
|
saveAuthAudit(user,userAuthType,pic,remark,null);
|
||||||
|
}
|
||||||
default void saveAuthAudit(User user, UserAuthTypeEnum userAuthType, String pic) {
|
default void saveAuthAudit(User user, UserAuthTypeEnum userAuthType, String pic) {
|
||||||
saveAuthAudit(user,userAuthType,pic, null);
|
saveAuthAudit(user,userAuthType,pic, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void saveAuthAudit(User user, UserAuthTypeEnum userAuthType, String pic, String remark, String authOtherJson);
|
||||||
|
|
||||||
Page<UserAuthAuditAdminVo> pageAdmin(PageQuery pageQuery, UserAuthAuditAdminVo bo);
|
Page<UserAuthAuditAdminVo> pageAdmin(PageQuery pageQuery, UserAuthAuditAdminVo bo);
|
||||||
|
|
||||||
void auditSuccess(String ids);
|
void auditSuccess(String ids);
|
||||||
|
|||||||
@@ -106,7 +106,7 @@ public class CardAuthRecordServiceImpl extends ServiceImpl<CardAuthRecordMapper,
|
|||||||
this.updateById(updateRecord);
|
this.updateById(updateRecord);
|
||||||
if(pass){
|
if(pass){
|
||||||
userAuthService.update(Wrappers.lambdaUpdate(UserAuth.class)
|
userAuthService.update(Wrappers.lambdaUpdate(UserAuth.class)
|
||||||
.eq(UserAuth::getUserId, cardAuthRecord.getUsercode())
|
.eq(UserAuth::getUserId, cardAuthRecord.getUserId())
|
||||||
.set(UserAuth::getCardNumAuth, AuditEnum.SUCCESS.getCode()));
|
.set(UserAuth::getCardNumAuth, AuditEnum.SUCCESS.getCode()));
|
||||||
userAuthService.checkAuthNum(cardAuthRecord.getUserId());
|
userAuthService.checkAuthNum(cardAuthRecord.getUserId());
|
||||||
userInfoService.update(Wrappers.lambdaUpdate(UserInfo.class)
|
userInfoService.update(Wrappers.lambdaUpdate(UserInfo.class)
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ public class UserAuthAuditServiceImpl extends ServiceImpl<UserAuthAuditMapper,Us
|
|||||||
private UserAuthService userAuthService;
|
private UserAuthService userAuthService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void saveAuthAudit(User user, UserAuthTypeEnum userAuthType, String pic, String remark) {
|
public void saveAuthAudit(User user, UserAuthTypeEnum userAuthType, String pic, String remark, String authOtherJson) {
|
||||||
UserAuthAudit userAuthAudit = new UserAuthAudit();
|
UserAuthAudit userAuthAudit = new UserAuthAudit();
|
||||||
userAuthAudit.setUserId(user.getId());
|
userAuthAudit.setUserId(user.getId());
|
||||||
userAuthAudit.setUsercode(user.getUsercode());
|
userAuthAudit.setUsercode(user.getUsercode());
|
||||||
@@ -40,6 +40,7 @@ public class UserAuthAuditServiceImpl extends ServiceImpl<UserAuthAuditMapper,Us
|
|||||||
userAuthAudit.setAuthPic(pic);
|
userAuthAudit.setAuthPic(pic);
|
||||||
userAuthAudit.setAuthRemark(remark);
|
userAuthAudit.setAuthRemark(remark);
|
||||||
userAuthAudit.setAuditStatus(AuditEnum.AUDITING.getCode());
|
userAuthAudit.setAuditStatus(AuditEnum.AUDITING.getCode());
|
||||||
|
userAuthAudit.setAuthOther(authOtherJson);
|
||||||
this.save(userAuthAudit);
|
this.save(userAuthAudit);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -73,8 +74,8 @@ public class UserAuthAuditServiceImpl extends ServiceImpl<UserAuthAuditMapper,Us
|
|||||||
userAuthService.update(Wrappers.lambdaUpdate(UserAuth.class)
|
userAuthService.update(Wrappers.lambdaUpdate(UserAuth.class)
|
||||||
.eq(UserAuth:: getUserId, userInfoAudit.getUserId())
|
.eq(UserAuth:: getUserId, userInfoAudit.getUserId())
|
||||||
.set(UserAuth:: getJobAuth, AuditEnum.SUCCESS.getCode())
|
.set(UserAuth:: getJobAuth, AuditEnum.SUCCESS.getCode())
|
||||||
.set(UserAuth:: getJobPic, userInfoAudit.getAuthPic())
|
.set(UserAuth:: getJobPic, userInfoAudit.getAuthPic()));
|
||||||
.set(UserAuth:: getJobAuthType, userInfoAudit.getAuthOther()));
|
// .set(UserAuth:: getJobAuthType, userInfoAudit.getAuthOther()));
|
||||||
userAuthService.checkAuthNum(userInfoAudit.getUserId());
|
userAuthService.checkAuthNum(userInfoAudit.getUserId());
|
||||||
}else if(userInfoAudit.getAuthType().equals(UserAuthTypeEnum.EDUCATION.getCode())){
|
}else if(userInfoAudit.getAuthType().equals(UserAuthTypeEnum.EDUCATION.getCode())){
|
||||||
userAuthService.update(Wrappers.lambdaUpdate(UserAuth.class)
|
userAuthService.update(Wrappers.lambdaUpdate(UserAuth.class)
|
||||||
|
|||||||
Reference in New Issue
Block a user