From 0d230f5520ebdeedae4dd08a6ed82b77d979808b Mon Sep 17 00:00:00 2001 From: Sum1Dream <418471657@qq.com> Date: Thu, 1 Jun 2023 14:26:21 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E5=AE=9E=E7=89=A9=E4=BB=A3?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hai/service/OutRechargeOrderService.java | 2 ++ .../impl/OutRechargeOrderServiceImpl.java | 21 +++++++++++++++++++ 2 files changed, 23 insertions(+) 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; + } }