chenchaod 1 mês atrás
pai
commit
0c1155aaac

+ 22
- 14
zhywpt-service-ias/src/main/java/cn/com/taiji/ias/manager/order/UserUploadManager.java Ver arquivo

@@ -10,6 +10,7 @@ import cn.com.taiji.core.entity.issue.IssueOrderinfo;
import cn.com.taiji.core.entity.issue.IssueOrderinfoExt;
import cn.com.taiji.core.entity.issue.TransactionStatus;
import cn.com.taiji.core.entity.user.AccountInfo;
import cn.com.taiji.core.entity.user.Staff;
import cn.com.taiji.core.model.comm.protocol.AbstractSignTypeResponse;
import cn.com.taiji.core.model.comm.protocol.ias.order.GetCustomerIdRequest;
import cn.com.taiji.core.model.comm.protocol.ias.order.GetCustomerIdResponse;
@@ -142,21 +143,28 @@ public class UserUploadManager extends AbstractOrderManager<UserUploadRequest> {
userAddress = request.getAgentAddress();
}
//有账户单但(没有证件号或证件地址)
if (accountInfo != null && (!hasText(accountInfo.getIdNum()) || hasText(accountInfo.getUserIdImgUrl())
|| hasText(accountInfo.getUserIdBackImgUrl()))){
if (accountInfo != null && (!hasText(accountInfo.getIdNum()) || !hasText(accountInfo.getUserIdImgUrl())
|| !hasText(accountInfo.getUserIdBackImgUrl()) || !hasText(accountInfo.getAddress()))){
// throw newBusinessException("此手机号(账号)需要实名认证,登录小程序进行实名认证");
AuthRequest authRequest = new AuthRequest();
authRequest.setLoginSource(SourceType.SERVICE_HALL);//为了调接口通过,这里写死
authRequest.setOpenId(accountInfo.getOpenId());
authRequest.setIdNum(idNum);
authRequest.setIdType(idType);
authRequest.setUserName(name);
authRequest.setGender(Gender.UNKOWN);
authRequest.setUserIdImgUrl(userPosImgUrl);
authRequest.setUserIdBackImgUrl(userNegImgUrl);
authRequest.setExpireDate(vld);
authRequest.setAddress(userAddress);
authManager.serviceHandle(authRequest);
if (hasText(accountInfo.getIdNum())&&!accountInfo.getIdNum().equals(idNum)){
throw GlyServiceError.BUSINESS_VALIDATE_ERR.toHandleException("已存在绑定证件号与本次证件信息不一致");
}
accountInfo.setIdType(idType);
accountInfo.setIdNum(idNum);
accountInfo.setUserName(name);
accountInfo.setGender(Gender.UNKOWN);
accountInfo.setUserIdImgUrl(userPosImgUrl);
accountInfo.setUserIdBackImgUrl(userNegImgUrl);
accountInfo.setExpireDate(vld);
accountInfo.setAddress(userAddress);
accountInfo.setUpdateTime(LocalDateTime.now());
//同步修改员工的姓名
Staff staff = staffRepo.findByOpenId(accountInfo.getOpenId());
if (staff != null) {
staff.setStaffName(request.getUserName());
staffRepo.save(staff);
}
accountInfoRepo.save(accountInfo);
}
// 注册用户
if (accountInfo == null) {

Carregando…
Cancelar
Salvar