Commit 73275032 authored by libin's avatar libin

Merge branch 'base-modify' of http://113.105.137.151:22280/youjj/cloud-platform into base-modify

parents 1f454acc 72bea98c
...@@ -141,23 +141,25 @@ public class OrderPayBiz extends BaseBiz<OrderPayMapper,OrderPay> { ...@@ -141,23 +141,25 @@ public class OrderPayBiz extends BaseBiz<OrderPayMapper,OrderPay> {
log.error("---支付回调处理---num====="+num+"----orderNo======="+orderNo); log.error("---支付回调处理---num====="+num+"----orderNo======="+orderNo);
if(num>0){ if(num>0){
//支付成功,添加积分 //支付成功,添加积分
if(orderPay.getStatus() == 1) { OrderPay pay= list.get(0);
OrderPay newValue = mapper.selectOne(orderPay);
log.info("支付回调信息:newValue = {}", newValue);
if(newValue.getStatus() == 1) {
JSONObject jsonObject = new JSONObject(); JSONObject jsonObject = new JSONObject();
jsonObject.put("userId", orderPay.getUserId()); jsonObject.put("userId", newValue.getUserId());
jsonObject.put("amount", orderPay.getAmount()); jsonObject.put("amount", newValue.getAmount());
jsonObject.put("channelId", orderPay.getOrderNo()); jsonObject.put("channelId", newValue.getOrderNo());
if(orderPay.getChannel() == 1) {//租车 if(newValue.getChannel() == 1) {//租车
jsonObject.put("integralRuleCode", "RENTRV"); jsonObject.put("integralRuleCode", "RENTRV");
} else if(orderPay.getChannel() == 2) { //旅游 } else if(newValue.getChannel() == 2) { //旅游
jsonObject.put("integralRuleCode", "BUYROUT"); jsonObject.put("integralRuleCode", "BUYROUT");
} else if(orderPay.getChannel() == 3) { //会员 } else if(newValue.getChannel() == 3) { //会员
jsonObject.put("integralRuleCode", "BUYMEMBER"); jsonObject.put("integralRuleCode", "BUYMEMBER");
} }
log.info("支付订单号:orderNo = {}, orderType = {}", orderPay.getOrderNo(), orderPay.getChannel()); log.info("支付订单号:orderNo = {}, orderType = {}", newValue.getOrderNo(), newValue.getChannel());
log.info("支付成功获取积分:发送消息 exchange = {}, routingKey = {}, json = {}", MQconstant.INTEGRAL_EXCHANGE, MQconstant.INTEGRAL_ROUTING_KEY, jsonObject.toJSONString()); log.info("支付成功获取积分:发送消息 exchange = {}, routingKey = {}, json = {}", MQconstant.INTEGRAL_EXCHANGE, MQconstant.INTEGRAL_ROUTING_KEY, jsonObject.toJSONString());
mqServiceBiZ.sendMessage(MQconstant.INTEGRAL_EXCHANGE, MQconstant.INTEGRAL_ROUTING_KEY, jsonObject.toJSONString()); mqServiceBiZ.sendMessage(MQconstant.INTEGRAL_EXCHANGE, MQconstant.INTEGRAL_ROUTING_KEY, jsonObject.toJSONString());
} }
OrderPay pay= list.get(0);
if(StringUtils.isNotBlank(pay.getNotifyUrl())){ if(StringUtils.isNotBlank(pay.getNotifyUrl())){
String url=pay.getNotifyUrl(); String url=pay.getNotifyUrl();
Integer type=pay.getType()==null?1:pay.getType(); Integer type=pay.getType()==null?1:pay.getType();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment