Merge branch 'hotfix' into develop

master
kira 6 years ago
commit f21b52a42f

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

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

@ -20,5 +20,5 @@ public interface CouponValidateService {
JSONObject ctripCouponInfo(String coupon_log_id,int client_id); 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 @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")); String uri = signUrl(UriComponentsBuilder.fromHttpUrl(CUSTOMER_HOST + "coupon/"+coupon_id+"/addCtripCouponLog"));
HttpRequestGenerator gen = new HttpRequestGenerator(uri, RequestMethod.POST); HttpRequestGenerator gen = new HttpRequestGenerator(uri, RequestMethod.POST);
List<NameValuePair> params = new ArrayList<>(); List<NameValuePair> params = new ArrayList<>();
params.add(new BasicNameValuePair("order_id", order_id)); params.add(new BasicNameValuePair("order_id", order_id));
params.add(new BasicNameValuePair("openid", open_id)); params.add(new BasicNameValuePair("openid", open_id));
params.add(new BasicNameValuePair("status", status));
gen.setFormStringEntity(params); gen.setFormStringEntity(params);
try { try {
HttpRequestResult reqResult = gen.execute(); HttpRequestResult reqResult = gen.execute();

Loading…
Cancel
Save