|
@@ -62,9 +62,10 @@ public class TaContractUserServiceImpl extends ServiceImpl<TaContractUserMapper,
|
62
|
62
|
queryWrapper.eq("mini_openid",MD5Utils.md5(person.getMiniOpenid()));
|
63
|
63
|
TaContractUser taContractUser = taContractUserMapper.selectOne(queryWrapper);
|
64
|
64
|
if (null != taContractUser) {
|
65
|
|
- taContractUser.setRaiseRecordId(taRaiseRecord.getRaiseRecordId());
|
66
|
|
- taContractUser.setCertifiedAddress(getFddServerHost(person.getMiniappId(),taContractUser.getCertifiedAddress()));
|
67
|
|
- return taContractUser;
|
|
65
|
+ TaContractUser firstCustomerInfo = getFirstCustomerInfo(person);
|
|
66
|
+ firstCustomerInfo.setRaiseRecordId(taRaiseRecord.getRaiseRecordId());
|
|
67
|
+ firstCustomerInfo.setCertifiedAddress(getFddServerHost(person.getMiniappId(),taContractUser.getCertifiedAddress()));
|
|
68
|
+ return firstCustomerInfo;
|
68
|
69
|
}
|
69
|
70
|
//没有法大大账号的先注册
|
70
|
71
|
log.info("========法大大个人注册=======");
|
|
@@ -90,7 +91,8 @@ public class TaContractUserServiceImpl extends ServiceImpl<TaContractUserMapper,
|
90
|
91
|
newContractUser.setOrgId(person.getOrgId());
|
91
|
92
|
|
92
|
93
|
log.info("正在申请个人认证,客户编码是{}",jsonObject.getString("data"));
|
93
|
|
- GetPersonVerifyUrl personverify = new GetPersonVerifyUrl(fadadaProperties.getAppId(),fadadaProperties.getAppSecret(),fadadaProperties.getVersion(),fadadaProperties.getServeHost());
|
|
94
|
+ log.info("appid {} , secret {}, version {} , serverhost {}",fadadaProperties.getAppId(),fadadaProperties.getAppSecret(),fadadaProperties.getVersion(),getFddServerHost(person.getMiniappId(),fadadaProperties.getServeHost()));
|
|
95
|
+ GetPersonVerifyUrl personverify = new GetPersonVerifyUrl(fadadaProperties.getAppId(),fadadaProperties.getAppSecret(),fadadaProperties.getVersion(),getFddServerHost(person.getMiniappId(),fadadaProperties.getServeHost()));
|
94
|
96
|
String customer_id = jsonObject.getString("data");
|
95
|
97
|
//0:三要素标准方案; 1:三要素补充方案 4 纯三要素方案;
|
96
|
98
|
String verifyed_way = "4";
|
|
@@ -107,7 +109,7 @@ public class TaContractUserServiceImpl extends ServiceImpl<TaContractUserMapper,
|
107
|
109
|
if (null !=data){
|
108
|
110
|
String url = JSON.parseObject(data).getString("url");
|
109
|
111
|
url = decode(url);
|
110
|
|
- newContractUser.setCertifiedAddress(getFddServerHost(person.getMiniappId(),url));
|
|
112
|
+ newContractUser.setCertifiedAddress(getFddDownServerHost(person.getMiniappId(),url));
|
111
|
113
|
newContractUser.setCertifiedSerialNumber(JSON.parseObject(data).getString("transactionNo"));
|
112
|
114
|
}
|
113
|
115
|
newContractUser.setStatus(0);
|
|
@@ -130,6 +132,22 @@ public class TaContractUserServiceImpl extends ServiceImpl<TaContractUserMapper,
|
130
|
132
|
return newUrl;
|
131
|
133
|
}
|
132
|
134
|
|
|
135
|
+ /**
|
|
136
|
+ * 替换法大大服务器地址
|
|
137
|
+ * @return
|
|
138
|
+ */
|
|
139
|
+ private String getFddDownServerHost(String miniappId,String subUrl) {
|
|
140
|
+ if (StringUtils.isEmpty(subUrl)){
|
|
141
|
+ return subUrl;
|
|
142
|
+ }
|
|
143
|
+ TaMiniapp taMiniapp = taMiniappMapper.selectById(miniappId);
|
|
144
|
+ int index = subUrl.indexOf("/");
|
|
145
|
+ int twoIndex = subUrl.indexOf("/",index+1);
|
|
146
|
+ int threeIndex = subUrl.indexOf("/",twoIndex+1);
|
|
147
|
+ String newUrl = StringUtils.isEmpty(taMiniapp.getFddDownloadHost()) ? subUrl : taMiniapp.getFddDownloadHost() + subUrl.substring(threeIndex);
|
|
148
|
+ return newUrl;
|
|
149
|
+ }
|
|
150
|
+
|
133
|
151
|
/**
|
134
|
152
|
* 去法大大处更新客户的状态
|
135
|
153
|
*
|