判断支付方式,调用不同url
This commit is contained in:
@ -24,6 +24,8 @@ public class DataPushApi {
|
||||
|
||||
@Value(value = "${dataPush.refundUrl}")
|
||||
private String refundUrl;
|
||||
@Value(value = "${dataPush.alirefundUrl}")
|
||||
private String alirefundUrl;
|
||||
@Value(value = "${dataPush.pushItemUrl}")
|
||||
private String pushItemUrl;
|
||||
|
||||
@ -125,7 +127,14 @@ public class DataPushApi {
|
||||
String jsonParams = objectMapper.writeValueAsString(refundRequest);
|
||||
logger.info("退款请求参数: {}", jsonParams);
|
||||
RestTemplate restTemplate = new RestTemplate();
|
||||
ResponseEntity<String> response = restTemplate.postForEntity(refundUrl, requestEntity, String.class);
|
||||
logger.info("支付方式为: {}", refundSub.getPaymentMethod());
|
||||
String url;
|
||||
if (refundSub.getPaymentMethod().equals("WX_PAY")){
|
||||
url = refundUrl;
|
||||
}else {
|
||||
url = alirefundUrl;
|
||||
}
|
||||
ResponseEntity<String> response = restTemplate.postForEntity(url, requestEntity, String.class);
|
||||
|
||||
// 处理退款接口响应
|
||||
if (response.getStatusCode() == HttpStatus.OK) {
|
||||
|
||||
@ -85,6 +85,7 @@ renren:
|
||||
|
||||
dataPush:
|
||||
refundUrl: http://115.190.8.52:8019/api/payment/refund
|
||||
alirefundUrl: http://115.190.8.52:8019/api/alipay/refund
|
||||
pushItemUrl: http://115.190.8.52:8019/item/sync/item
|
||||
|
||||
sendAddCompanyUrl: http://115.190.8.52:8016/send/companyinfo/
|
||||
|
||||
Reference in New Issue
Block a user