qitz 2 лет назад
Родитель
Сommit
626ec17b45

+ 10
- 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/IdentityAuthenticationController.java Просмотреть файл

18
     @Autowired
18
     @Autowired
19
     private IdentityAuthenticationService identityAuthenticationService;
19
     private IdentityAuthenticationService identityAuthenticationService;
20
 
20
 
21
+    /**
22
+     * 查询身份认证EIDtoken
23
+     */
24
+    @PostMapping("/selectIdentityAuthenticaEIDtoken")
25
+    public AjaxResult selectIdentityAuthenticaEIDtoken()
26
+    {
27
+        IdentityAuthentication ientityAuthentication = identityAuthenticationService.selectIdentityAuthenticaEIDtoken();
28
+        return success(ientityAuthentication);
29
+    }
30
+
21
 
31
 
22
 
32
 
23
 
33
 

+ 2
- 1
ruoyi-admin/src/main/resources/application.yml Просмотреть файл

148
       cycle: 10
148
       cycle: 10
149
 identityAuthentication:
149
 identityAuthentication:
150
   credentialSecretId: 123
150
   credentialSecretId: 123
151
-  credentialSecretKey: 367
151
+  credentialSecretKey: 367
152
+  merchantId: 356

+ 2
- 2
ruoyi-common/pom.xml Просмотреть файл

141
 
141
 
142
         <dependency>
142
         <dependency>
143
             <groupId>com.tencentcloudapi</groupId>
143
             <groupId>com.tencentcloudapi</groupId>
144
-            <artifactId>tencentcloud-sdk-java-ocr</artifactId>
145
-            <version>3.1.701</version>
144
+            <artifactId>tencentcloud-sdk-java-faceid</artifactId>
145
+            <version>3.1.871</version>
146
         </dependency>
146
         </dependency>
147
 
147
 
148
         <!-- poi-tl-->
148
         <!-- poi-tl-->

+ 21
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/CaseAffiliate.java Просмотреть файл

44
     @Excel(name = "代理人联系地址")
44
     @Excel(name = "代理人联系地址")
45
     private String contactAddressAgent;
45
     private String contactAddressAgent;
46
 
46
 
47
+    /** 送达电子邮件 */
48
+    private String sendEmail;
49
+    /** 快递单号 */
50
+    private String trackNum;
51
+
52
+    public String getSendEmail() {
53
+        return sendEmail;
54
+    }
55
+
56
+    public void setSendEmail(String sendEmail) {
57
+        this.sendEmail = sendEmail;
58
+    }
59
+
60
+    public String getTrackNum() {
61
+        return trackNum;
62
+    }
63
+
64
+    public void setTrackNum(String trackNum) {
65
+        this.trackNum = trackNum;
66
+    }
67
+
47
     public String getNameAgent() {
68
     public String getNameAgent() {
48
         return nameAgent;
69
         return nameAgent;
49
     }
70
     }

+ 32
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/IdentityAuthentication.java Просмотреть файл

45
     /** 用户账号 */
45
     /** 用户账号 */
46
     private String userName;
46
     private String userName;
47
 
47
 
48
+    /** EID商户id */
49
+    private String merchantId;
50
+
51
+    /** EidToken */
52
+    private String eidToken;
53
+    /** 请求 ID */
54
+    private String requestId;
55
+
56
+    public String getMerchantId() {
57
+        return merchantId;
58
+    }
59
+
60
+    public void setMerchantId(String merchantId) {
61
+        this.merchantId = merchantId;
62
+    }
63
+
64
+    public String getEidToken() {
65
+        return eidToken;
66
+    }
67
+
68
+    public void setEidToken(String eidToken) {
69
+        this.eidToken = eidToken;
70
+    }
71
+
72
+    public String getRequestId() {
73
+        return requestId;
74
+    }
75
+
76
+    public void setRequestId(String requestId) {
77
+        this.requestId = requestId;
78
+    }
79
+
48
     public Long getUserId() {
80
     public Long getUserId() {
49
         return userId;
81
         return userId;
50
     }
82
     }

+ 2
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/IdentityAuthenticationService.java Просмотреть файл

1
 package com.ruoyi.wisdomarbitrate.service;
1
 package com.ruoyi.wisdomarbitrate.service;
2
 
2
 
3
 import com.ruoyi.wisdomarbitrate.domain.IdentityAuthentication;
3
 import com.ruoyi.wisdomarbitrate.domain.IdentityAuthentication;
4
+import com.tencentcloudapi.common.exception.TencentCloudSDKException;
4
 
5
 
5
 public interface IdentityAuthenticationService {
6
 public interface IdentityAuthenticationService {
6
 
7
 
8
     IdentityAuthentication  selectIdentityAuthentication(IdentityAuthentication identityAuthentication);
9
     IdentityAuthentication  selectIdentityAuthentication(IdentityAuthentication identityAuthentication);
9
 
10
 
10
 
11
 
12
+    IdentityAuthentication selectIdentityAuthenticaEIDtoken();
11
 }
13
 }

+ 1
- 1
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseEvidenceServiceImpl.java Просмотреть файл

109
                 caseAttachselect.setAnnexId(caseAttach.getAnnexId());
109
                 caseAttachselect.setAnnexId(caseAttach.getAnnexId());
110
                 caseAttachselect.setAnnexName(caseAttach.getAnnexName());
110
                 caseAttachselect.setAnnexName(caseAttach.getAnnexName());
111
                 caseAttachselect.setAnnexType(caseAttach.getAnnexType());
111
                 caseAttachselect.setAnnexType(caseAttach.getAnnexType());
112
-                return AjaxResult.success("上传成功",caseAttach);
112
+                return AjaxResult.success("上传成功",caseAttachselect);
113
             }
113
             }
114
         } catch (IOException e) {
114
         } catch (IOException e) {
115
             e.printStackTrace();
115
             e.printStackTrace();

+ 41
- 5
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/IdentityAuthenticationServiceImpl.java Просмотреть файл

1
 package com.ruoyi.wisdomarbitrate.service.impl;
1
 package com.ruoyi.wisdomarbitrate.service.impl;
2
 
2
 
3
-import com.alibaba.fastjson2.JSON;
4
-import com.alibaba.fastjson2.JSONObject;
3
+
4
+
5
+import com.alibaba.fastjson.JSON;
6
+import com.alibaba.fastjson.JSONObject;
5
 import com.ruoyi.common.core.domain.AjaxResult;
7
 import com.ruoyi.common.core.domain.AjaxResult;
6
 import com.ruoyi.wisdomarbitrate.domain.IdentityAuthentication;
8
 import com.ruoyi.wisdomarbitrate.domain.IdentityAuthentication;
7
 import com.ruoyi.wisdomarbitrate.mapper.IdentityAuthenticationMapper;
9
 import com.ruoyi.wisdomarbitrate.mapper.IdentityAuthenticationMapper;
11
 import com.tencentcloudapi.common.exception.TencentCloudSDKException;
13
 import com.tencentcloudapi.common.exception.TencentCloudSDKException;
12
 import com.tencentcloudapi.common.profile.ClientProfile;
14
 import com.tencentcloudapi.common.profile.ClientProfile;
13
 import com.tencentcloudapi.common.profile.HttpProfile;
15
 import com.tencentcloudapi.common.profile.HttpProfile;
14
-import com.tencentcloudapi.ocr.v20181119.OcrClient;
15
-import com.tencentcloudapi.ocr.v20181119.models.RecognizeTableAccurateOCRRequest;
16
-import com.tencentcloudapi.ocr.v20181119.models.RecognizeTableAccurateOCRResponse;
16
+import com.tencentcloudapi.faceid.v20180301.FaceidClient;
17
+import com.tencentcloudapi.faceid.v20180301.models.GetEidTokenRequest;
18
+import com.tencentcloudapi.faceid.v20180301.models.GetEidTokenResponse;
17
 import org.slf4j.Logger;
19
 import org.slf4j.Logger;
18
 import org.slf4j.LoggerFactory;
20
 import org.slf4j.LoggerFactory;
19
 import org.springframework.beans.factory.annotation.Autowired;
21
 import org.springframework.beans.factory.annotation.Autowired;
32
     private String credentialSecretId;
34
     private String credentialSecretId;
33
     @Value("${identityAuthentication.credentialSecretKey}")
35
     @Value("${identityAuthentication.credentialSecretKey}")
34
     private String credentialSecretKey;
36
     private String credentialSecretKey;
37
+    @Value("${identityAuthentication.merchantId}")
38
+    private String merchantId;
39
+
40
+//    private static final String SECRET_ID = "AKIDeEf2A8uX1HSainvvnXAc3X9ZlhtyvkMp";
41
+//    private static final String SECRET_KEY = "QjphKo8zkHZigT8j9PVtFPJyfIvO3d6V";
35
 
42
 
36
     @Autowired
43
     @Autowired
37
     private IdentityAuthenticationMapper identityAuthenticationMapper;
44
     private IdentityAuthenticationMapper identityAuthenticationMapper;
53
 
60
 
54
     }
61
     }
55
 
62
 
63
+    @Override
64
+    public IdentityAuthentication selectIdentityAuthenticaEIDtoken() {
65
+        IdentityAuthentication identityAuthentication = new IdentityAuthentication();
66
+        try{
67
+            //        Credential credIdenAuth = new Credential(SECRET_ID, SECRET_KEY);
68
+            Credential credIdenAuth = new Credential(credentialSecretId, credentialSecretKey);
69
+            HttpProfile httpProfileIdenAuth = new HttpProfile();
70
+            httpProfileIdenAuth.setEndpoint("faceid.tencentcloudapi.com");
71
+            ClientProfile clientProfileIdenAuth = new ClientProfile();
72
+            clientProfileIdenAuth.setHttpProfile(httpProfileIdenAuth);
73
+            FaceidClient clientIdenAuth = new FaceidClient(credIdenAuth, "", clientProfileIdenAuth);
74
+            // 实例化一个请求对象
75
+            GetEidTokenRequest reqIdenAuth = new GetEidTokenRequest();
76
+            //设置请求参数
77
+            reqIdenAuth.setMerchantId(merchantId);
78
+            GetEidTokenResponse respIdenAuth = clientIdenAuth.GetEidToken(reqIdenAuth);
79
+            String respJSON = GetEidTokenResponse.toJsonString(respIdenAuth);
80
+            JSONObject objJSON = JSON.parseObject(respJSON);
81
+            JSONObject objJSONRes = (JSONObject) objJSON.get("Response");
82
+            String eidToken = objJSONRes.getString("EidToken");
83
+            String requestId = objJSONRes.getString("RequestId");
84
+            identityAuthentication.setEidToken(eidToken);
85
+        }catch (TencentCloudSDKException e) {
86
+            System.out.println(e.toString());
87
+        }
88
+
89
+        return identityAuthentication;
90
+
91
+    }
56
 
92
 
57
 
93
 
58
 }
94
 }