Merge branch 'qtz' of SH-Arbitrate/Arbitrate-Backend into dev
This commit was merged in pull request #28.
This commit is contained in:
+10
@@ -18,6 +18,16 @@ public class IdentityAuthenticationController extends BaseController {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private IdentityAuthenticationService identityAuthenticationService;
|
private IdentityAuthenticationService identityAuthenticationService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询身份认证EIDtoken
|
||||||
|
*/
|
||||||
|
@PostMapping("/selectIdentityAuthenticaEIDtoken")
|
||||||
|
public AjaxResult selectIdentityAuthenticaEIDtoken()
|
||||||
|
{
|
||||||
|
IdentityAuthentication ientityAuthentication = identityAuthenticationService.selectIdentityAuthenticaEIDtoken();
|
||||||
|
return success(ientityAuthentication);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -149,3 +149,4 @@ elegent:
|
|||||||
identityAuthentication:
|
identityAuthentication:
|
||||||
credentialSecretId: 123
|
credentialSecretId: 123
|
||||||
credentialSecretKey: 367
|
credentialSecretKey: 367
|
||||||
|
merchantId: 356
|
||||||
@@ -141,8 +141,8 @@
|
|||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.tencentcloudapi</groupId>
|
<groupId>com.tencentcloudapi</groupId>
|
||||||
<artifactId>tencentcloud-sdk-java-ocr</artifactId>
|
<artifactId>tencentcloud-sdk-java-faceid</artifactId>
|
||||||
<version>3.1.701</version>
|
<version>3.1.871</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- poi-tl-->
|
<!-- poi-tl-->
|
||||||
|
|||||||
@@ -44,6 +44,27 @@ public class CaseAffiliate extends BaseEntity {
|
|||||||
@Excel(name = "代理人联系地址")
|
@Excel(name = "代理人联系地址")
|
||||||
private String contactAddressAgent;
|
private String contactAddressAgent;
|
||||||
|
|
||||||
|
/** 送达电子邮件 */
|
||||||
|
private String sendEmail;
|
||||||
|
/** 快递单号 */
|
||||||
|
private String trackNum;
|
||||||
|
|
||||||
|
public String getSendEmail() {
|
||||||
|
return sendEmail;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSendEmail(String sendEmail) {
|
||||||
|
this.sendEmail = sendEmail;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTrackNum() {
|
||||||
|
return trackNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTrackNum(String trackNum) {
|
||||||
|
this.trackNum = trackNum;
|
||||||
|
}
|
||||||
|
|
||||||
public String getNameAgent() {
|
public String getNameAgent() {
|
||||||
return nameAgent;
|
return nameAgent;
|
||||||
}
|
}
|
||||||
|
|||||||
+32
@@ -45,6 +45,38 @@ public class IdentityAuthentication extends BaseEntity {
|
|||||||
/** 用户账号 */
|
/** 用户账号 */
|
||||||
private String userName;
|
private String userName;
|
||||||
|
|
||||||
|
/** EID商户id */
|
||||||
|
private String merchantId;
|
||||||
|
|
||||||
|
/** EidToken */
|
||||||
|
private String eidToken;
|
||||||
|
/** 请求 ID */
|
||||||
|
private String requestId;
|
||||||
|
|
||||||
|
public String getMerchantId() {
|
||||||
|
return merchantId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMerchantId(String merchantId) {
|
||||||
|
this.merchantId = merchantId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getEidToken() {
|
||||||
|
return eidToken;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEidToken(String eidToken) {
|
||||||
|
this.eidToken = eidToken;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRequestId() {
|
||||||
|
return requestId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRequestId(String requestId) {
|
||||||
|
this.requestId = requestId;
|
||||||
|
}
|
||||||
|
|
||||||
public Long getUserId() {
|
public Long getUserId() {
|
||||||
return userId;
|
return userId;
|
||||||
}
|
}
|
||||||
|
|||||||
+2
@@ -1,6 +1,7 @@
|
|||||||
package com.ruoyi.wisdomarbitrate.service;
|
package com.ruoyi.wisdomarbitrate.service;
|
||||||
|
|
||||||
import com.ruoyi.wisdomarbitrate.domain.IdentityAuthentication;
|
import com.ruoyi.wisdomarbitrate.domain.IdentityAuthentication;
|
||||||
|
import com.tencentcloudapi.common.exception.TencentCloudSDKException;
|
||||||
|
|
||||||
public interface IdentityAuthenticationService {
|
public interface IdentityAuthenticationService {
|
||||||
|
|
||||||
@@ -8,4 +9,5 @@ public interface IdentityAuthenticationService {
|
|||||||
IdentityAuthentication selectIdentityAuthentication(IdentityAuthentication identityAuthentication);
|
IdentityAuthentication selectIdentityAuthentication(IdentityAuthentication identityAuthentication);
|
||||||
|
|
||||||
|
|
||||||
|
IdentityAuthentication selectIdentityAuthenticaEIDtoken();
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -109,7 +109,7 @@ public class CaseEvidenceServiceImpl implements ICaseEvidenceService {
|
|||||||
caseAttachselect.setAnnexId(caseAttach.getAnnexId());
|
caseAttachselect.setAnnexId(caseAttach.getAnnexId());
|
||||||
caseAttachselect.setAnnexName(caseAttach.getAnnexName());
|
caseAttachselect.setAnnexName(caseAttach.getAnnexName());
|
||||||
caseAttachselect.setAnnexType(caseAttach.getAnnexType());
|
caseAttachselect.setAnnexType(caseAttach.getAnnexType());
|
||||||
return AjaxResult.success("上传成功",caseAttach);
|
return AjaxResult.success("上传成功",caseAttachselect);
|
||||||
}
|
}
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
|||||||
+41
-5
@@ -1,7 +1,9 @@
|
|||||||
package com.ruoyi.wisdomarbitrate.service.impl;
|
package com.ruoyi.wisdomarbitrate.service.impl;
|
||||||
|
|
||||||
import com.alibaba.fastjson2.JSON;
|
|
||||||
import com.alibaba.fastjson2.JSONObject;
|
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
import com.ruoyi.wisdomarbitrate.domain.IdentityAuthentication;
|
import com.ruoyi.wisdomarbitrate.domain.IdentityAuthentication;
|
||||||
import com.ruoyi.wisdomarbitrate.mapper.IdentityAuthenticationMapper;
|
import com.ruoyi.wisdomarbitrate.mapper.IdentityAuthenticationMapper;
|
||||||
@@ -11,9 +13,9 @@ import com.tencentcloudapi.common.Credential;
|
|||||||
import com.tencentcloudapi.common.exception.TencentCloudSDKException;
|
import com.tencentcloudapi.common.exception.TencentCloudSDKException;
|
||||||
import com.tencentcloudapi.common.profile.ClientProfile;
|
import com.tencentcloudapi.common.profile.ClientProfile;
|
||||||
import com.tencentcloudapi.common.profile.HttpProfile;
|
import com.tencentcloudapi.common.profile.HttpProfile;
|
||||||
import com.tencentcloudapi.ocr.v20181119.OcrClient;
|
import com.tencentcloudapi.faceid.v20180301.FaceidClient;
|
||||||
import com.tencentcloudapi.ocr.v20181119.models.RecognizeTableAccurateOCRRequest;
|
import com.tencentcloudapi.faceid.v20180301.models.GetEidTokenRequest;
|
||||||
import com.tencentcloudapi.ocr.v20181119.models.RecognizeTableAccurateOCRResponse;
|
import com.tencentcloudapi.faceid.v20180301.models.GetEidTokenResponse;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
@@ -32,6 +34,11 @@ public class IdentityAuthenticationServiceImpl implements IdentityAuthenticatio
|
|||||||
private String credentialSecretId;
|
private String credentialSecretId;
|
||||||
@Value("${identityAuthentication.credentialSecretKey}")
|
@Value("${identityAuthentication.credentialSecretKey}")
|
||||||
private String credentialSecretKey;
|
private String credentialSecretKey;
|
||||||
|
@Value("${identityAuthentication.merchantId}")
|
||||||
|
private String merchantId;
|
||||||
|
|
||||||
|
// private static final String SECRET_ID = "AKIDeEf2A8uX1HSainvvnXAc3X9ZlhtyvkMp";
|
||||||
|
// private static final String SECRET_KEY = "QjphKo8zkHZigT8j9PVtFPJyfIvO3d6V";
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private IdentityAuthenticationMapper identityAuthenticationMapper;
|
private IdentityAuthenticationMapper identityAuthenticationMapper;
|
||||||
@@ -53,6 +60,35 @@ public class IdentityAuthenticationServiceImpl implements IdentityAuthenticatio
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public IdentityAuthentication selectIdentityAuthenticaEIDtoken() {
|
||||||
|
IdentityAuthentication identityAuthentication = new IdentityAuthentication();
|
||||||
|
try{
|
||||||
|
// Credential credIdenAuth = new Credential(SECRET_ID, SECRET_KEY);
|
||||||
|
Credential authenti = new Credential(credentialSecretId, credentialSecretKey);
|
||||||
|
HttpProfile httpProfileIdenAuth = new HttpProfile();
|
||||||
|
httpProfileIdenAuth.setEndpoint("faceid.tencentcloudapi.com");
|
||||||
|
ClientProfile clientInv= new ClientProfile();
|
||||||
|
clientInv.setHttpProfile(httpProfileIdenAuth);
|
||||||
|
FaceidClient clientIdenAuth = new FaceidClient(authenti, "", clientInv);
|
||||||
|
// 实例化一个请求对象
|
||||||
|
GetEidTokenRequest reqest = new GetEidTokenRequest();
|
||||||
|
//设置请求参数
|
||||||
|
reqest.setMerchantId(merchantId);
|
||||||
|
GetEidTokenResponse respIdenAuth = clientIdenAuth.GetEidToken(reqest);
|
||||||
|
String respJSON = GetEidTokenResponse.toJsonString(respIdenAuth);
|
||||||
|
JSONObject objJSON = JSON.parseObject(respJSON);
|
||||||
|
JSONObject objJSONRes = (JSONObject) objJSON.get("Response");
|
||||||
|
String eidToken = objJSONRes.getString("EidToken");
|
||||||
|
String requestId = objJSONRes.getString("RequestId");
|
||||||
|
identityAuthentication.setEidToken(eidToken);
|
||||||
|
}catch (TencentCloudSDKException e) {
|
||||||
|
System.out.println(e.toString());
|
||||||
|
}
|
||||||
|
|
||||||
|
return identityAuthentication;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -46,7 +46,7 @@
|
|||||||
update case_attach
|
update case_attach
|
||||||
set
|
set
|
||||||
case_appli_id= #{caseAppliId}
|
case_appli_id= #{caseAppliId}
|
||||||
where annexId = #{annex_id}
|
where annex_id = #{annexId}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user