提交内容:API映射公共单据

备注:付款处理联调测试
提交人:邹江涛
This commit is contained in:
zoujiangtao 2024-12-09 14:17:00 +08:00
parent 77c7f3c20a
commit 34e62ff143
2 changed files with 3 additions and 22 deletions
sys/shkd-sys-sys/src/main/java/shkd/sys/sys/plugin

View File

@ -26,7 +26,7 @@ import java.util.Map;
* @Author Tao
* @Date 2024/11/7
*/
public class PayBillApiSavePlugin implements ApiSavePlugin, ApiSerializerPlugin {
public class PayBillApiSavePlugin implements ApiSavePlugin {
private static final Log logger = LogFactory.getLog(PayBillApiSavePlugin.class);
private static final long serialVersionUID = 7055073356277386444L;
private String shkd_businessid;
@ -122,7 +122,7 @@ public class PayBillApiSavePlugin implements ApiSavePlugin, ApiSerializerPlugin
return reqData;
}
@Override
/*@Override
public SerializerResult serialize(Object response, String accept, String contentType) {
logger.info("进入serialize方法");
try {
@ -152,5 +152,5 @@ public class PayBillApiSavePlugin implements ApiSavePlugin, ApiSerializerPlugin
String result = "...";
return new SerializerResult(MediaType.TEXT_PLAIN, result);
}
}
}*/
}

View File

@ -150,25 +150,6 @@ public class ApiMappingBillPlugin extends AbstractFormPlugin implements Plugin {
}
if ("shkd_testapi".equals(itemKey)) {
/*//域名
String domainName = dataEntity.getString("shkd_domainname");
//url
String url = dataEntity.getString("shkd_url");
ApiEntity apiEntity = new ApiEntity();
apiEntity.setURL(domainName + url);
apiEntity.setMethod("POST");
Map<String, Object> headMap = new HashMap<>();
headMap.put("Content-Type", "application/json");
apiEntity.setHeaders(headMap);
Map<String, Object> paramsMap = new HashMap<>();
Map<String, Object> resultMap = ApiService.getBIPToken(domainName);
logger.info("getBIPToken → 获取返回token{}", resultMap.get("token"));
paramsMap.put("access_token", resultMap.get("token"));
apiEntity.setQueryParams(paramsMap);
apiEntity.setRequestBody(codeEdit.getText());
logger.info("调用接口实体对象apiEntity → 返回结果:{}", apiEntity);
JSONObject responseBody = ApiEntity.getResponseBody(apiEntity);*/
//响应数据
String formattedContent;
try {