diff --git a/base-system-common/src/main/java/com/health/system/common/domain/util/IdCardConfigureType.java b/base-system-common/src/main/java/com/health/system/common/domain/util/IdCardConfigureType.java new file mode 100644 index 0000000..a163e11 --- /dev/null +++ b/base-system-common/src/main/java/com/health/system/common/domain/util/IdCardConfigureType.java @@ -0,0 +1,25 @@ +package com.health.system.common.domain.util; + +/** + * @author 冯凯 + * @version 1.0 + * @description: TODO + * @date 2023/10/28 20:16 + */ +public enum IdCardConfigureType { + + FACE("face"),Back("back"); + private String type; + + IdCardConfigureType(String type) { + this.type = type; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } +} diff --git a/base-system-server/src/main/java/com/health/system/server/config/ForestClientInterface.java b/base-system-server/src/main/java/com/health/system/server/config/ForestClientInterface.java new file mode 100644 index 0000000..603a3fc --- /dev/null +++ b/base-system-server/src/main/java/com/health/system/server/config/ForestClientInterface.java @@ -0,0 +1,56 @@ +package com.health.system.server.config; + +import com.dtflys.forest.annotation.Body; +import com.dtflys.forest.annotation.DataParam; +import com.dtflys.forest.annotation.Post; +import com.health.common.core.domain.Configure; +import org.springframework.context.annotation.Configuration; +import org.springframework.stereotype.Component; + +import java.util.Map; + +/** + * @author 冯凯 + * @version 1.0 + * @description: + * @date 2023/10/28 20:14 + */ +@Component +@Configuration +public interface ForestClientInterface { + + /** + * @description: 识别身份证正面的api + * @param: * @param image + * @return: Map + * @author 冯凯 + * @date: 2023/10/28 18:51 + */ + @Post(value = "https://cardnumber.market.alicloudapi.com/rest/160601/ocr/ocr_idcard.json", + headers = {"Authorization:APPCODE b491bc5d56bb4fa59171e19aaab030bb","Content-Type:application/json; charset=UTF-8"}) + Map helloForestFace(@DataParam("image") String image); + + /** + * @description: 识别身份证发面信息的api + * @param: * @param image + * @return: Map + * @author 冯凯 + * @date: 2023/10/28 18:51 + */ + @Post(value = "https://cardnumber.market.alicloudapi.com/rest/160601/ocr/ocr_idcard.json", + headers = {"Authorization:APPCODE b491bc5d56bb4fa59171e19aaab030bb","Content-Type:application/json; charset=UTF-8"}) + + Map helloForestBack(@DataParam("image") String image, @Body("configure") Configure configure); + + /** + * @description: 识别身银行卡信息的api + * @param: * @param image + * @return: Map + * @author 冯凯 + * @date: 2023/10/28 18:51 + */ + @Post(value = "https://dfbankcard.market.alicloudapi.com/ocr/bankcard", + headers = {"Authorization:APPCODE b491bc5d56bb4fa59171e19aaab030bb","Content-Type:application/x-www-form-urlencoded; charset=UTF-8"}) + Map helloForestBank(@DataParam("image") String image); +} +