提交代码

dev-discount
= 3 years ago
commit 76c8e2f2ac
  1. 26
      hai-cweb/src/main/java/com/cweb/controller/pay/TuanYouController.java
  2. 3
      hai-service/src/main/java/com/hai/service/pay/impl/GoodsOrderServiceImpl.java

@ -77,20 +77,22 @@ public class TuanYouController {
HighOrder order = highOrderService.getOrderByOrderNo(object.getString("thirdOrderNo"));
// 订单状态:1 待支付 2 已支付 3.已完成 4. 已退款 5.已取消 6.退款中 7.拒绝退款
if (order != null && order.getOrderStatus() == 6) {
// 退单结果 true:成功 false:失败
if (object.getBoolean("refundResult") == true && order != null) {
OrderRefundModel orderRefundModel = WxOrderConfig.orderToRefund(order.getPaySerialNo(), order.getPayRealPrice(), order.getPayRealPrice());
if(orderRefundModel.getResult_code().equals("SUCCESS")) {
order.setOrderStatus(4);
order.setRefundTime(new Date());
order.setRefundPrice(order.getPayRealPrice());
if (order != null) {
if (order.getOrderStatus() == 2 || order.getOrderStatus() == 6) {
// 退单结果 true:成功 false:失败
if (object.getBoolean("refundResult") == true && order != null) {
OrderRefundModel orderRefundModel = WxOrderConfig.orderToRefund(order.getPaySerialNo(), order.getPayRealPrice(), order.getPayRealPrice());
if(orderRefundModel.getResult_code().equals("SUCCESS")) {
order.setOrderStatus(4);
order.setRefundTime(new Date());
order.setRefundPrice(order.getPayRealPrice());
highOrderService.updateOrderDetail(order);
}
} else if (!object.getBoolean("refundResult") == true && order != null) {
order.setOrderStatus(7);
order.setRefusalRefundContent(object.getString("refundFailReason"));
highOrderService.updateOrderDetail(order);
}
} else if (!object.getBoolean("refundResult") == true && order != null) {
order.setOrderStatus(7);
order.setRefusalRefundContent(object.getString("refundFailReason"));
highOrderService.updateOrderDetail(order);
}
}
response.setCharacterEncoding("UTF-8");

@ -150,7 +150,7 @@ public class GoodsOrderServiceImpl implements PayService {
paramMap.put("priceVip", priceVip); // 优惠价
paramMap.put("driverPhone", order.getMemPhone());
paramMap.put("thirdSerialNo", order.getOrderNo());
paramMap.put("refuelingAmount", highChildOrder.getGoodsActualPrice());
paramMap.put("refuelingAmount", highChildOrder.getTotalPrice());
// 油品类型 1:汽油:2:柴油;3:天然气
if (highChildOrder.getGasOilType() == 1) {
@ -159,7 +159,6 @@ public class GoodsOrderServiceImpl implements PayService {
paramMap.put("accountNo", CommonSysConst.getSysConfig().getTuanYouDieselAccount());
}
JSONObject orderPushObject = TuanYouConfig.refuelingOrderPush(paramMap);
System.out.println(orderPushObject.toJSONString());
// 推送团油订单记录
HighGasOrderPush highGasOrderPush = new HighGasOrderPush();
highGasOrderPush.setCreateTime(new Date());

Loading…
Cancel
Save