master
kira 6 years ago
parent bf25295eab
commit f682caf7cb

@ -34,7 +34,7 @@ public class CtripAfterPaymentFinishListener implements ApplicationListener<Afte
if (accuessCouponLogs != null&&accuessCouponLogs.size()>0) {
JSONObject accuessCouponLog = accuessCouponLogs.get(0);
String couponId = accuessCouponLog.getString("coupon_id");
couponValidateService.ctripCouponLogNotice(couponId,orderId,order.getString("customer_id"));
couponValidateService.ctripCouponLogNotice(couponId,orderId,order.getString("customer_id"),order.getString("status"));
logger.info("订单 [" + orderId + "]推送支付成功Ctrip卡券=======>[" + couponId + "]");
}
}

@ -38,7 +38,7 @@ public class CtripRefundFinishedEventListener implements ApplicationListener<Ref
if (accuessCouponLogs != null&&accuessCouponLogs.size()>0) {
JSONObject accuessCouponLog = accuessCouponLogs.get(0);
String couponId = accuessCouponLog.getString("coupon_id");
couponValidateService.ctripCouponLogNotice(couponId,orderId,order.getString("customer_id"));
couponValidateService.ctripCouponLogNotice(couponId,orderId,order.getString("customer_id"),order.getString("status"));
logger.info("订单 [" + orderId + "]推送退款成功Ctrip卡券=======>[" + couponId + "]");
}
}

@ -20,5 +20,5 @@ public interface CouponValidateService {
JSONObject ctripCouponInfo(String coupon_log_id,int client_id);
JSONObject ctripCouponLogNotice(String coupon_log_id,String order_id,String open_id);
JSONObject ctripCouponLogNotice(String coupon_log_id,String order_id,String open_id,String status);
}

@ -196,12 +196,13 @@ public class CouponValidateServiceImpl implements CouponValidateService {
}
@Override
public JSONObject ctripCouponLogNotice(String coupon_id, String order_id, String open_id) {
public JSONObject ctripCouponLogNotice(String coupon_id, String order_id, String open_id,String status) {
String uri = signUrl(UriComponentsBuilder.fromHttpUrl(CUSTOMER_HOST + "coupon/"+coupon_id+"/addCtripCouponLog"));
HttpRequestGenerator gen = new HttpRequestGenerator(uri, RequestMethod.POST);
List<NameValuePair> params = new ArrayList<>();
params.add(new BasicNameValuePair("order_id", order_id));
params.add(new BasicNameValuePair("openid", open_id));
params.add(new BasicNameValuePair("status", status));
gen.setFormStringEntity(params);
try {
HttpRequestResult reqResult = gen.execute();

Loading…
Cancel
Save