|
|
@ -92,6 +92,9 @@ public class OutRechargeOrderServiceImpl implements OutRechargeOrderService { |
|
|
|
@Autowired |
|
|
|
@Autowired |
|
|
|
private OutRechargeChildOrderService childOrderService; |
|
|
|
private OutRechargeChildOrderService childOrderService; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Resource |
|
|
|
|
|
|
|
private SecConfigService secConfigService; |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public List<OutRechargeOrder> getListRechargeOrder(Map<String, Object> map) { |
|
|
|
public List<OutRechargeOrder> getListRechargeOrder(Map<String, Object> map) { |
|
|
|
OutRechargeOrderExample example = new OutRechargeOrderExample(); |
|
|
|
OutRechargeOrderExample example = new OutRechargeOrderExample(); |
|
|
@ -406,6 +409,10 @@ public class OutRechargeOrderServiceImpl implements OutRechargeOrderService { |
|
|
|
|
|
|
|
|
|
|
|
String key = "recharge_" + outRechargeOrder.getId(); |
|
|
|
String key = "recharge_" + outRechargeOrder.getId(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (outRechargeOrderService.rechargeOrderAbnormal(outRechargeOrder)) { |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
try { |
|
|
|
try { |
|
|
|
|
|
|
|
|
|
|
|
// 分布式锁占坑
|
|
|
|
// 分布式锁占坑
|
|
|
@ -547,6 +554,10 @@ public class OutRechargeOrderServiceImpl implements OutRechargeOrderService { |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void getPrepaidRechargeApi(OutRechargeOrder outRechargeOrder) { |
|
|
|
public void getPrepaidRechargeApi(OutRechargeOrder outRechargeOrder) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (rechargeOrderAbnormal(outRechargeOrder)) { |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
JSONObject object = new JSONObject(); |
|
|
|
JSONObject object = new JSONObject(); |
|
|
|
object.put("rechargePrice" , outRechargeOrder.getRechargePrice()); |
|
|
|
object.put("rechargePrice" , outRechargeOrder.getRechargePrice()); |
|
|
|
object.put("rechargeMobile" , outRechargeOrder.getRechargeContent()); |
|
|
|
object.put("rechargeMobile" , outRechargeOrder.getRechargeContent()); |
|
|
@ -989,4 +1000,21 @@ public class OutRechargeOrderServiceImpl implements OutRechargeOrderService { |
|
|
|
|
|
|
|
|
|
|
|
return childOrder; |
|
|
|
return childOrder; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
public boolean rechargeOrderAbnormal(OutRechargeOrder order) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
HighOrder highOrder = highOrderService.getOrderByOrderNo(order.getOrderNo()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (secConfigService.isConfig("RECHARGE_ORDER" , order.getRechargeContent())) { |
|
|
|
|
|
|
|
highOrder.setExceptionStatus(true); |
|
|
|
|
|
|
|
highOrder.setExceptionContent("当前订单存在以前多充值!"); |
|
|
|
|
|
|
|
order.setRechargeStatus(204); |
|
|
|
|
|
|
|
orderService.updateOrderData(highOrder); |
|
|
|
|
|
|
|
outRechargeOrderMapper.updateByPrimaryKey(order); |
|
|
|
|
|
|
|
return true; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return false; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|