|
|
@@ -178,21 +178,21 @@ public class AgentServiceImpl implements IAgentService {
|
|
|
//生成邀请码
|
|
|
String inviteCode = ShareCodeUtils.idToCode(Long.parseLong(add.getPhone()));
|
|
|
add.setInviteCode(InviteType.AGENT.getCode() + inviteCode);
|
|
|
- //签合同 TODO
|
|
|
-// Boolean signFlag = jzqService.uploadPersSign(bo.getIdCard(), bo.getSignImage());
|
|
|
-// if(!signFlag){
|
|
|
-// throw new ServiceException(AgentExceptionEnum.Agent_SIGN_FAIL);
|
|
|
-// }
|
|
|
-// //个人先认证
|
|
|
-// Boolean certiFlag = jzqService.cloudCertiPerInfo(add.getRealName(), add.getIdCard(), bo.getIdCardFrontUrl(), bo.getIdCardBackUrl());
|
|
|
-// if(!certiFlag){
|
|
|
-// throw new ServiceException(AgentExceptionEnum.Agent_SIGN_CONTRACT_FAIL);
|
|
|
-// }
|
|
|
-// String contractNo = jzqService.applySign(buildSignatories(add));
|
|
|
-// if (StringUtils.isEmpty(contractNo)) {
|
|
|
-// throw new ServiceException(AgentExceptionEnum.Agent_SIGN_CONTRACT_FAIL);
|
|
|
-// }
|
|
|
-// add.setContractNo(contractNo);
|
|
|
+ //签合同
|
|
|
+ Boolean signFlag = jzqService.uploadPersSign(bo.getIdCard(), bo.getSignImage());
|
|
|
+ if(!signFlag){
|
|
|
+ throw new ServiceException(AgentExceptionEnum.Agent_SIGN_FAIL);
|
|
|
+ }
|
|
|
+ //个人先认证
|
|
|
+ Boolean certiFlag = jzqService.cloudCertiPerInfo(add.getRealName(), add.getIdCard(), bo.getIdCardFrontUrl(), bo.getIdCardBackUrl());
|
|
|
+ if(!certiFlag){
|
|
|
+ throw new ServiceException(AgentExceptionEnum.Agent_SIGN_CONTRACT_FAIL);
|
|
|
+ }
|
|
|
+ String contractNo = jzqService.applySign(buildSignatories(add));
|
|
|
+ if (StringUtils.isEmpty(contractNo)) {
|
|
|
+ throw new ServiceException(AgentExceptionEnum.Agent_SIGN_CONTRACT_FAIL);
|
|
|
+ }
|
|
|
+ add.setContractNo(contractNo);
|
|
|
boolean flag = baseMapper.insert(add) > 0;
|
|
|
if (flag) {
|
|
|
bo.setAgentId(add.getAgentId());
|