傅行帆 5 anni fa
parent
commit
0ef345f4f8

+ 1
- 0
src/main/java/com/huiju/estateagents/config/FadadaProperties.java Vedi File

@@ -18,4 +18,5 @@ public class FadadaProperties {
18 18
     private String authReturnUrl;
19 19
     private String authNotifyUrl;
20 20
     private String signNotify;
21
+    private String redirectUrl;
21 22
 }

+ 12
- 5
src/main/java/com/huiju/estateagents/eContract/service/impl/TaContractServiceImpl.java Vedi File

@@ -32,6 +32,7 @@ import org.springframework.stereotype.Service;
32 32
 import org.springframework.transaction.annotation.Transactional;
33 33
 
34 34
 import java.io.File;
35
+import java.net.URLEncoder;
35 36
 import java.time.LocalDate;
36 37
 import java.time.LocalDateTime;
37 38
 import java.util.Map;
@@ -121,6 +122,8 @@ public class TaContractServiceImpl extends ServiceImpl<TaContractMapper, TaContr
121 122
         queryWrapper.eq("person_id",person.getPersonId());
122 123
         TaContract oldContract = taContractMapper.selectOne(queryWrapper);
123 124
         if (null != oldContract){
125
+            oldContract.setContractDownloadUrl(getFddDownServerHost(person.getMiniappId(),oldContract.getContractDownloadUrl()));
126
+            oldContract.setContractViewUrl(getFddDownServerHost(person.getMiniappId(),oldContract.getContractViewUrl()));
124 127
             return oldContract;
125 128
         }
126 129
 
@@ -165,8 +168,8 @@ public class TaContractServiceImpl extends ServiceImpl<TaContractMapper, TaContr
165 168
         }
166 169
 
167 170
         //反更新合同地址
168
-        taContract.setContractDownloadUrl(autoSignResultJson.getString("download_url"));
169
-        taContract.setContractViewUrl(autoSignResultJson.getString("viewpdf_url"));
171
+        taContract.setContractDownloadUrl(getFddDownServerHost(person.getMiniappId(),autoSignResultJson.getString("download_url")));
172
+        taContract.setContractViewUrl(getFddDownServerHost(person.getMiniappId(),autoSignResultJson.getString("viewpdf_url")));
170 173
         taContractMapper.updateById(taContract);
171 174
 
172 175
         //企业名称
@@ -178,12 +181,12 @@ public class TaContractServiceImpl extends ServiceImpl<TaContractMapper, TaContr
178 181
      * 替换法大大服务器地址
179 182
      * @return
180 183
      */
181
-    private String getFddServerHost(String miniappId,String subUrl) {
184
+    private String getFddDownServerHost(String miniappId,String subUrl) {
182 185
         TaMiniapp taMiniapp = taMiniappMapper.selectById(miniappId);
183 186
         int index = subUrl.indexOf("/");
184 187
         int twoIndex = subUrl.indexOf("/",index+1);
185 188
         int threeIndex = subUrl.indexOf("/",twoIndex+1);
186
-        String newUrl = StringUtils.isEmpty(taMiniapp.getFddServerHost()) ? subUrl : taMiniapp.getFddServerHost() + subUrl.substring(threeIndex);
189
+        String newUrl = StringUtils.isEmpty(taMiniapp.getFddDownloadHost()) ? subUrl : taMiniapp.getFddDownloadHost() + subUrl.substring(threeIndex);
187 190
         return newUrl;
188 191
     }
189 192
 
@@ -222,7 +225,9 @@ public class TaContractServiceImpl extends ServiceImpl<TaContractMapper, TaContr
222 225
         req.setSign_keyword(taContractBusiness.getCustomerKeywords());
223 226
         req.setKeyword_strategy(taContractBusiness.getCustomerStrategy());
224 227
         req.setDoc_title(taContractBusiness.getContractTemplateName());
225
-        req.setReturn_url("/onlineSelling/pages/raiseMoney/signResult");
228
+        String redirectUrl = URLEncoder.encode("/onlineSelling/pages/raiseMoney/signResult" + taContract.getInvoiceTargetId(), "utf-8");
229
+        String return_url=  fadadaProperties.getAuthReturnUrl() + "?appid=123&redirect="+ redirectUrl;
230
+        req.setReturn_url(return_url);
226 231
         req.setNotify_url(fadadaProperties.getSignNotify());
227 232
         String signUrl = base.invokeExtSign(req);
228 233
         return signUrl;
@@ -256,6 +261,8 @@ public class TaContractServiceImpl extends ServiceImpl<TaContractMapper, TaContr
256 261
         queryWrapper.eq("company_id",taContractBusiness.getCompanyId());
257 262
         queryWrapper.eq("person_id",person.getPersonId());
258 263
         TaContract oldContract = taContractMapper.selectOne(queryWrapper);
264
+        oldContract.setContractDownloadUrl(getFddDownServerHost(person.getMiniappId(),oldContract.getContractDownloadUrl()));
265
+        oldContract.setContractViewUrl(getFddDownServerHost(person.getMiniappId(),oldContract.getContractViewUrl()));
259 266
         return oldContract;
260 267
     }
261 268
 }

+ 3
- 1
src/main/java/com/huiju/estateagents/eContract/service/impl/TaContractUserServiceImpl.java Vedi File

@@ -25,6 +25,7 @@ import org.springframework.beans.factory.annotation.Autowired;
25 25
 import org.springframework.stereotype.Service;
26 26
 
27 27
 import java.io.File;
28
+import java.net.URLEncoder;
28 29
 import java.time.LocalDateTime;
29 30
 
30 31
 /**
@@ -96,7 +97,8 @@ public class TaContractUserServiceImpl extends ServiceImpl<TaContractUserMapper,
96 97
         String verifyed_way = "1";
97 98
         String page_modify = "1";
98 99
         String notify_url = fadadaProperties.getCompanyNotify();
99
-        String return_url= "/onlineSelling/pages/raiseMoney/Certification?id=" + taRaiseRecord.getRaiseRecordId();
100
+        String redirectUrl = URLEncoder.encode("/onlineSelling/pages/raiseMoney/Certification?id=" + taRaiseRecord.getRaiseRecordId(), "utf-8");
101
+        String return_url=  fadadaProperties.getAuthReturnUrl() + "?appid=123&redirect="+ redirectUrl;
100 102
         String customer_ident_type = "0";
101 103
         String personResult = personverify.invokePersonVerifyUrl(customer_id,verifyed_way,
102 104
                 page_modify,notify_url,return_url,null,customer_ident_type,

+ 7
- 16
src/main/java/com/huiju/estateagents/service/impl/TaRaiseServiceImpl.java Vedi File

@@ -186,6 +186,11 @@ public class TaRaiseServiceImpl extends ServiceImpl<TaRaiseMapper, TaRaise> impl
186 186
         String[] inviteTelArr = StringUtils.isEmpty(taRaise.getInviteTel()) ?
187 187
                 new String[]{} : taRaise.getInviteTel().split("\n");
188 188
 
189
+        QueryWrapper<TaRaiseInvite> taRaiseInviteQueryWrapper = new QueryWrapper<>();
190
+        taRaiseInviteQueryWrapper.eq("org_id", orgId);
191
+        taRaiseInviteQueryWrapper.eq("raise_id", taRaise.getRaiseId());
192
+        taRaiseInviteService.remove(taRaiseInviteQueryWrapper);
193
+
189 194
         Arrays.asList(inviteTelArr).stream().distinct().forEach(record -> {
190 195
             TaRaiseInvite taRaiseInvite = new TaRaiseInvite();
191 196
             taRaiseInvite.setOrgId(orgId);
@@ -193,22 +198,8 @@ public class TaRaiseServiceImpl extends ServiceImpl<TaRaiseMapper, TaRaise> impl
193 198
             taRaiseInvite.setBuildingId(taRaise.getBuildingId());
194 199
             taRaiseInvite.setSalesBatchId(taRaise.getSalesBatchId());
195 200
             taRaiseInvite.setCreateDate(LocalDateTime.now());
196
-
197
-            // 为新增 直接增加,跳过重复添加数据校验
198
-            if (isAdd) {
199
-                taRaiseInvite.setInviteTel(record);
200
-                taRaiseInviteList.add(taRaiseInvite);
201
-            } else {
202
-                QueryWrapper<TaRaiseInvite> taRaiseInviteQueryWrapper = new QueryWrapper<>();
203
-                taRaiseInviteQueryWrapper.eq("org_id", orgId);
204
-                taRaiseInviteQueryWrapper.eq("raise_id", taRaise.getRaiseId());
205
-                taRaiseInviteQueryWrapper.eq("invite_tel", record);
206
-                TaRaiseInvite queryResult = taRaiseInviteService.getOne(taRaiseInviteQueryWrapper);
207
-                if (queryResult == null) {
208
-                    taRaiseInvite.setInviteTel(record);
209
-                    taRaiseInviteList.add(taRaiseInvite);
210
-                }
211
-            }
201
+            taRaiseInvite.setInviteTel(record);
202
+            taRaiseInviteList.add(taRaiseInvite);
212 203
         });
213 204
         return taRaiseInviteService.saveBatch(taRaiseInviteList);
214 205
     }

+ 1
- 0
src/main/resources/application-blue.yml Vedi File

@@ -89,3 +89,4 @@ fadada:
89 89
   authReturnUrl: "http://localhost:8000/#/eContract/seal/detail?id="
90 90
   authNotifyUrl: "https://dev.pawoma.cn/api/fadd/autoAuthCompanySeal"
91 91
   signNotify: "https://dev.pawoma.cn/api/fadd/sign"
92
+  redirectUrl: "https://dev.pawoma.cn/other/redirect.html"

+ 2
- 1
src/main/resources/application-green.yml Vedi File

@@ -86,6 +86,7 @@ fadada:
86 86
   authServeHost: "http://test.api.fabigbig.com:8888/api/"
87 87
   serveHost: "https://testapi08.fadada.com/api/"
88 88
   companyNotify: "https://dev.pawoma.cn/api/fadd/company"
89
-  authReturnUrl: "http://dev.pawoma.cn/#/eContract/seal/list"
89
+  authReturnUrl: "http://localhost:8000/#/eContract/seal/detail?id="
90 90
   authNotifyUrl: "https://dev.pawoma.cn/api/fadd/autoAuthCompanySeal"
91 91
   signNotify: "https://dev.pawoma.cn/api/fadd/sign"
92
+  redirectUrl: "https://dev.pawoma.cn/other/redirect.html"

+ 8
- 4
src/main/resources/application-prod-blue.yml Vedi File

@@ -85,9 +85,13 @@ pay-refund: https://lt.pawoma.cn/api/refund/
85 85
 
86 86
 #法大大服务器地址
87 87
 fadada:
88
-  appId: ""
89
-  appSecret: ""
88
+  appId: "403057"
89
+  appSecret: "xcIaK36Vc09yXXRdinXYcXhW"
90 90
   version: "2.0"
91
-  serveHost: "https://testapi.fadada.com:8443/api/"
91
+  authServeHost: "http://test.api.fabigbig.com:8888/api/"
92
+  serveHost: "https://testapi08.fadada.com/api/"
92 93
   companyNotify: "https://dev.pawoma.cn/api/fadd/company"
93
-  signNotify: "https://dev.pawoma.cn/api/fadd/sign"
94
+  authReturnUrl: "http://localhost:8000/#/eContract/seal/detail?id="
95
+  authNotifyUrl: "https://dev.pawoma.cn/api/fadd/autoAuthCompanySeal"
96
+  signNotify: "https://dev.pawoma.cn/api/fadd/sign"
97
+  redirectUrl: "https://dev.pawoma.cn/other/redirect.html"

+ 8
- 4
src/main/resources/application-prod-green.yml Vedi File

@@ -85,9 +85,13 @@ pay-refund: https://lt.pawoma.cn/api/refund/
85 85
 
86 86
 #法大大服务器地址
87 87
 fadada:
88
-  appId: ""
89
-  appSecret: ""
88
+  appId: "403057"
89
+  appSecret: "xcIaK36Vc09yXXRdinXYcXhW"
90 90
   version: "2.0"
91
-  serveHost: "https://testapi.fadada.com:8443/api/"
91
+  authServeHost: "http://test.api.fabigbig.com:8888/api/"
92
+  serveHost: "https://testapi08.fadada.com/api/"
92 93
   companyNotify: "https://dev.pawoma.cn/api/fadd/company"
93
-  signNotify: "https://dev.pawoma.cn/api/fadd/sign"
94
+  authReturnUrl: "http://localhost:8000/#/eContract/seal/detail?id="
95
+  authNotifyUrl: "https://dev.pawoma.cn/api/fadd/autoAuthCompanySeal"
96
+  signNotify: "https://dev.pawoma.cn/api/fadd/sign"
97
+  redirectUrl: "https://dev.pawoma.cn/other/redirect.html"