傅行帆 5 년 전
부모
커밋
3880bb9181

+ 15
- 1
src/main/java/com/huiju/estateagents/eContract/service/impl/TaContractServiceImpl.java 파일 보기

267
         }
267
         }
268
 
268
 
269
         taContractMapper.updateById(taContract);
269
         taContractMapper.updateById(taContract);
270
-        String manualUrl = getFddDownServerHost(person.getMiniappId(), signUrl);
270
+        String manualUrl = getFddServerHost(person.getMiniappId(), signUrl);
271
         return manualUrl;
271
         return manualUrl;
272
     }
272
     }
273
 
273
 
274
+
275
+    /**
276
+     * 替换法大大服务器地址
277
+     * @return
278
+     */
279
+    private String getFddServerHost(String miniappId,String subUrl) {
280
+        TaMiniapp taMiniapp = taMiniappMapper.selectById(miniappId);
281
+        int index = subUrl.indexOf("/");
282
+        int twoIndex = subUrl.indexOf("/",index+1);
283
+        int threeIndex = subUrl.indexOf("/",twoIndex+1);
284
+        String newUrl = StringUtils.isEmpty(taMiniapp.getFddServerHost()) ? subUrl : taMiniapp.getFddServerHost() + subUrl.substring(threeIndex);
285
+        return newUrl;
286
+    }
287
+
274
     /**
288
     /**
275
      * 检查签署合同状态
289
      * 检查签署合同状态
276
      *
290
      *

+ 23
- 5
src/main/java/com/huiju/estateagents/eContract/service/impl/TaContractUserServiceImpl.java 파일 보기

62
         queryWrapper.eq("mini_openid",MD5Utils.md5(person.getMiniOpenid()));
62
         queryWrapper.eq("mini_openid",MD5Utils.md5(person.getMiniOpenid()));
63
         TaContractUser taContractUser = taContractUserMapper.selectOne(queryWrapper);
63
         TaContractUser taContractUser = taContractUserMapper.selectOne(queryWrapper);
64
         if (null != taContractUser) {
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
         log.info("========法大大个人注册=======");
71
         log.info("========法大大个人注册=======");
90
         newContractUser.setOrgId(person.getOrgId());
91
         newContractUser.setOrgId(person.getOrgId());
91
 
92
 
92
         log.info("正在申请个人认证,客户编码是{}",jsonObject.getString("data"));
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
         String customer_id = jsonObject.getString("data");
96
         String customer_id = jsonObject.getString("data");
95
         //0:三要素标准方案; 1:三要素补充方案 4 纯三要素方案;
97
         //0:三要素标准方案; 1:三要素补充方案 4 纯三要素方案;
96
         String verifyed_way = "4";
98
         String verifyed_way = "4";
107
         if (null !=data){
109
         if (null !=data){
108
             String url = JSON.parseObject(data).getString("url");
110
             String url = JSON.parseObject(data).getString("url");
109
             url = decode(url);
111
             url = decode(url);
110
-            newContractUser.setCertifiedAddress(getFddServerHost(person.getMiniappId(),url));
112
+            newContractUser.setCertifiedAddress(getFddDownServerHost(person.getMiniappId(),url));
111
             newContractUser.setCertifiedSerialNumber(JSON.parseObject(data).getString("transactionNo"));
113
             newContractUser.setCertifiedSerialNumber(JSON.parseObject(data).getString("transactionNo"));
112
         }
114
         }
113
         newContractUser.setStatus(0);
115
         newContractUser.setStatus(0);
130
         return newUrl;
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
      *