diff --git a/hai-service/src/main/java/com/hai/service/OutRechargeOrderService.java b/hai-service/src/main/java/com/hai/service/OutRechargeOrderService.java index 1a834c3c..475a1cbb 100644 --- a/hai-service/src/main/java/com/hai/service/OutRechargeOrderService.java +++ b/hai-service/src/main/java/com/hai/service/OutRechargeOrderService.java @@ -212,4 +212,6 @@ public interface OutRechargeOrderService { OutRechargeChildOrder mobileChildOrderHandle(HighOrder highOrder , OutRechargeOrder outRechargeOrder); JSONObject prepaidRechargeOrderHandle(JSONObject object); + + boolean rechargeOrderAbnormal(OutRechargeOrder order); } diff --git a/hai-service/src/main/java/com/hai/service/impl/OutRechargeOrderServiceImpl.java b/hai-service/src/main/java/com/hai/service/impl/OutRechargeOrderServiceImpl.java index 2667ea36..725e60e3 100644 --- a/hai-service/src/main/java/com/hai/service/impl/OutRechargeOrderServiceImpl.java +++ b/hai-service/src/main/java/com/hai/service/impl/OutRechargeOrderServiceImpl.java @@ -92,6 +92,9 @@ public class OutRechargeOrderServiceImpl implements OutRechargeOrderService { @Autowired private OutRechargeChildOrderService childOrderService; + @Resource + private SecConfigService secConfigService; + @Override public List getListRechargeOrder(Map map) { OutRechargeOrderExample example = new OutRechargeOrderExample(); @@ -989,4 +992,22 @@ public class OutRechargeOrderServiceImpl implements OutRechargeOrderService { 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; + } }