|
|
@ -596,9 +596,6 @@ public class OutRechargeOrderServiceImpl implements OutRechargeOrderService { |
|
|
|
if (order.getRechargeStatus() == 201) { |
|
|
|
if (order.getRechargeStatus() == 201) { |
|
|
|
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "无法退款,订单处于充值中状态"); |
|
|
|
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "无法退款,订单处于充值中状态"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 1:支付宝 2:微信 3:汇联通工会卡 4:银联 5:银联分期
|
|
|
|
|
|
|
|
if (order.getPayType() == null) { |
|
|
|
|
|
|
|
// 退还积分
|
|
|
|
// 退还积分
|
|
|
|
if (order.getIntegralNum() != null) { |
|
|
|
if (order.getIntegralNum() != null) { |
|
|
|
highUserService.goldHandle(order.getUserId(), order.getIntegralNum().intValue(), 1, 3, order.getId()); |
|
|
|
highUserService.goldHandle(order.getUserId(), order.getIntegralNum().intValue(), 1, 3, order.getId()); |
|
|
@ -609,7 +606,6 @@ public class OutRechargeOrderServiceImpl implements OutRechargeOrderService { |
|
|
|
outRechargeOrderService.updateOrder(order); |
|
|
|
outRechargeOrderService.updateOrder(order); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} else { |
|
|
|
|
|
|
|
// 微信退款
|
|
|
|
// 微信退款
|
|
|
|
if (order.getPayType() == 2) { |
|
|
|
if (order.getPayType() == 2) { |
|
|
|
Map<String, String> param = new HashMap<>(); |
|
|
|
Map<String, String> param = new HashMap<>(); |
|
|
@ -679,7 +675,6 @@ public class OutRechargeOrderServiceImpl implements OutRechargeOrderService { |
|
|
|
order.setRefundFee(order.getPayRealPrice()); |
|
|
|
order.setRefundFee(order.getPayRealPrice()); |
|
|
|
outRechargeOrderService.updateOrder(order); |
|
|
|
outRechargeOrderService.updateOrder(order); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (order.getMemDiscountId() != null) { |
|
|
|
if (order.getMemDiscountId() != null) { |
|
|
@ -755,6 +750,23 @@ public class OutRechargeOrderServiceImpl implements OutRechargeOrderService { |
|
|
|
outRechargeChildOrderService.updateOrder(childOrder); |
|
|
|
outRechargeChildOrderService.updateOrder(childOrder); |
|
|
|
type = childOrder.getRechargePlatform(); |
|
|
|
type = childOrder.getRechargePlatform(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
// 查询充值子订单
|
|
|
|
|
|
|
|
Map<String, Object> childOrderMap103 = new HashMap<>(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
childOrderMap.put("parent_order_id", outRechargeOrder.getId()); |
|
|
|
|
|
|
|
childOrderMap.put("status", 103); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<OutRechargeChildOrder> childOrderList103 = outRechargeChildOrderService.getListRechargeChildOrder(childOrderMap103); |
|
|
|
|
|
|
|
if (childOrderList103.size() > 0) { |
|
|
|
|
|
|
|
type = childOrderList103.get(0).getRechargePlatform(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (type == 2) { |
|
|
|
|
|
|
|
type = 1; |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
type++; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
JSONObject object = new JSONObject(); |
|
|
|
JSONObject object = new JSONObject(); |
|
|
@ -765,10 +777,12 @@ public class OutRechargeOrderServiceImpl implements OutRechargeOrderService { |
|
|
|
|
|
|
|
|
|
|
|
for (String s : rechargePlatform) { |
|
|
|
for (String s : rechargePlatform) { |
|
|
|
// 尖椒充值
|
|
|
|
// 尖椒充值
|
|
|
|
if (s.equals("1") && (type == 2 || type == 0)) { |
|
|
|
if (s.equals("1") && type == 1) { |
|
|
|
object.put("out_order_id", orderNo); |
|
|
|
object.put("out_order_id", orderNo); |
|
|
|
object.put("amount", outRechargePrice.getRechargePrice()); |
|
|
|
object.put("amount", outRechargePrice.getRechargePrice()); |
|
|
|
object.put("mobile", outRechargeOrder.getRechargeContent()); |
|
|
|
object.put("mobile", outRechargeOrder.getRechargeContent()); |
|
|
|
|
|
|
|
object.put("notifyUrl", CommonSysConst.getSysConfig().getJjNotifyUrl()); |
|
|
|
|
|
|
|
System.out.println("尖椒请求回调地址---------------------" + CommonSysConst.getSysConfig().getJjNotifyUrl()); |
|
|
|
if (outRechargePrice.getRechargeType() == 1) { |
|
|
|
if (outRechargePrice.getRechargeType() == 1) { |
|
|
|
object.put("is_fast", 1); |
|
|
|
object.put("is_fast", 1); |
|
|
|
} |
|
|
|
} |
|
|
@ -782,11 +796,14 @@ public class OutRechargeOrderServiceImpl implements OutRechargeOrderService { |
|
|
|
rechargePlatformType = 1; |
|
|
|
rechargePlatformType = 1; |
|
|
|
break; |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
if (s.equals("2") && (type == 1 || type == 0)) { |
|
|
|
// 龙阅充值
|
|
|
|
|
|
|
|
if (s.equals("2") && type == 2) { |
|
|
|
object.put("out_trade_num", orderNo); |
|
|
|
object.put("out_trade_num", orderNo); |
|
|
|
object.put("product_id", outRechargePrice.getGoodsId()); |
|
|
|
object.put("product_id", outRechargePrice.getGoodsId()); |
|
|
|
object.put("mobile", outRechargeOrder.getRechargeContent()); |
|
|
|
object.put("mobile", outRechargeOrder.getRechargeContent()); |
|
|
|
|
|
|
|
object.put("notifyUrl", CommonSysConst.getSysConfig().getLyNotifyUrl()); |
|
|
|
JSONObject returnObject = RechargeConfig.rechargeOrderByLy(object); |
|
|
|
JSONObject returnObject = RechargeConfig.rechargeOrderByLy(object); |
|
|
|
|
|
|
|
System.out.println("龙阅请求回调地址---------------------" + CommonSysConst.getSysConfig().getLyNotifyUrl()); |
|
|
|
object.put("return_content", returnObject); |
|
|
|
object.put("return_content", returnObject); |
|
|
|
if (returnObject != null && returnObject.getLong("errno") == 0) { |
|
|
|
if (returnObject != null && returnObject.getLong("errno") == 0) { |
|
|
|
childOrder.setStatus(102); |
|
|
|
childOrder.setStatus(102); |
|
|
|