From 3a61aa096c3191e97770a92e4e145fe63ddc1aa4 Mon Sep 17 00:00:00 2001
From: doum <doum>
Date: 星期五, 27 二月 2026 18:41:05 +0800
Subject: [PATCH] 经销商管理

---
 server/dmmall_service/src/main/java/com/doumee/service/business/impl/CouponServiceImpl.java |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/server/dmmall_service/src/main/java/com/doumee/service/business/impl/CouponServiceImpl.java b/server/dmmall_service/src/main/java/com/doumee/service/business/impl/CouponServiceImpl.java
index 7a43d37..bdea826 100644
--- a/server/dmmall_service/src/main/java/com/doumee/service/business/impl/CouponServiceImpl.java
+++ b/server/dmmall_service/src/main/java/com/doumee/service/business/impl/CouponServiceImpl.java
@@ -106,6 +106,12 @@
                 throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(), "鍏宠仈鐨勫簵閾轰笉瀛樺湪锛�");
             }
         }
+        if(coupon.getUseType() ==0){
+            coupon.setValidDays(null);
+        }else{
+            coupon.setStartDate(null);
+            coupon.setEndDate(null);
+        }
         coupon.setApplyIds("");
         if(Constants.equalsInteger(coupon.getApplyType(),Constants.TWO) && coupon.getApplyIdList()!=null){
             coupon.setApplyIds(coupon.getApplyIdList().stream().map(String::valueOf).collect(Collectors.joining(",")));//浣跨敤瀵硅薄缂栫爜闆嗗悎
@@ -148,7 +154,7 @@
         isCreateParamValid(coupon);
         Coupon query= couponMapper.selectById(coupon.getId());
         initCouponStatus(query);
-     /*   if(!Constants.equalsInteger(query.getCouponStatus(),Constants.ZERO)){
+       /* if(!Constants.equalsInteger(query.getCouponStatus(),Constants.ZERO)){
             throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(), "娲诲姩宸插紑濮�/宸茬粨鏉熺姸鎬侊紝涓嶆敮鎸佺紪杈戞搷浣�");
         }*/
         coupon.setEditor(user.getId());

--
Gitblit v1.9.3