From e058a649d8f6c78afd8f73d157058d5106aa6925 Mon Sep 17 00:00:00 2001
From: luodangjia <luodangjia>
Date: 星期一, 13 一月 2025 19:47:10 +0800
Subject: [PATCH] 12.18

---
 ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/RedPackegeSetController.java |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/RedPackegeSetController.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/RedPackegeSetController.java
index db83906..d70cbd1 100644
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/RedPackegeSetController.java
+++ b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/RedPackegeSetController.java
@@ -66,11 +66,11 @@
     @PostMapping("/addRedPackegeSet")
     @Transactional(rollbackFor = Exception.class)
     public R<Void> addRedPackegeSet(@RequestBody RedPackegeSetDto redPackegeSets){
-        redPackegeSetService.remove(null);
         List<RedPackegeSet> redPackegeSetList = redPackegeSets.getRedPackegeSets();
         if (hasOverlap(redPackegeSetList)) {
-            R.fail("时间段存在重叠,请重新配置");
+            return R.fail("时间段存在重叠,请重新配置");
         }
+        redPackegeSetService.remove(null);
         redPackegeSetService.saveBatch(redPackegeSetList);
         return R.ok();
     }

--
Gitblit v1.7.1