|
|
@ -587,6 +587,7 @@ public class OutRechargeOrderServiceImpl implements OutRechargeOrderService { |
|
|
|
public void rechargeOrderToRefund(Long orderId) throws Exception { |
|
|
|
public void rechargeOrderToRefund(Long orderId) throws Exception { |
|
|
|
OutRechargeOrder order = outRechargeOrderService.findByOrderId(orderId); |
|
|
|
OutRechargeOrder order = outRechargeOrderService.findByOrderId(orderId); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
System.out.println("发起退款------------------------------------------------------------------------------" + orderId); |
|
|
|
// 101.待支付 102.已支付 100.已完成 104.已取消 105.已退款
|
|
|
|
// 101.待支付 102.已支付 100.已完成 104.已取消 105.已退款
|
|
|
|
if (order.getPayStatus() != 102) { |
|
|
|
if (order.getPayStatus() != 102) { |
|
|
|
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "无法退款,订单不处于已支付状态"); |
|
|
|
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "无法退款,订单不处于已支付状态"); |
|
|
@ -596,8 +597,9 @@ 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, "无法退款,订单处于充值中状态"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 退还积分
|
|
|
|
// 退还积分
|
|
|
|
if (order.getIntegralNum() != null) { |
|
|
|
if (order.getIntegralNum().compareTo(new BigDecimal(0)) > 0) { |
|
|
|
highUserService.goldHandle(order.getUserId(), order.getIntegralNum().intValue(), 1, 3, order.getId()); |
|
|
|
highUserService.goldHandle(order.getUserId(), order.getIntegralNum().intValue(), 1, 3, order.getId()); |
|
|
|
if (order.getPayRealPrice().compareTo(new BigDecimal(0)) == 0) { |
|
|
|
if (order.getPayRealPrice().compareTo(new BigDecimal(0)) == 0) { |
|
|
|
order.setPayStatus(105); |
|
|
|
order.setPayStatus(105); |
|
|
@ -788,8 +790,8 @@ public class OutRechargeOrderServiceImpl implements OutRechargeOrderService { |
|
|
|
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()); |
|
|
|
object.put("notifyUrl", CommonSysConst.getSysConfig().getJjNotifyUrl()); |
|
|
|
System.out.println("尖椒请求回调地址---------------------" + CommonSysConst.getSysConfig().getJjNotifyUrl()); |
|
|
|
System.out.println("outRechargeOrder-----------------------------------------------------------------------------------------------------------------------------------------------------" + outRechargePrice.getRechargeType()); |
|
|
|
if (outRechargePrice.getRechargeType() == 1) { |
|
|
|
if (outRechargeOrder.getRechargeType() == 1) { |
|
|
|
object.put("is_fast", 1); |
|
|
|
object.put("is_fast", 1); |
|
|
|
} |
|
|
|
} |
|
|
|
JSONObject returnObject = RechargeConfig.rechargeOrderByJj(object); |
|
|
|
JSONObject returnObject = RechargeConfig.rechargeOrderByJj(object); |
|
|
|