增加forest

master
冯凯 2023-10-28 20:33:52 +08:00
parent 3d5b99511e
commit 90c62c80ec
2 changed files with 81 additions and 0 deletions

View File

@ -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;
}
}

View File

@ -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);
}