From 8bdb26708241c70a9998b1729a2c9881422f2d5d Mon Sep 17 00:00:00 2001
From: peng <peng.com>
Date: 星期四, 16 十月 2025 15:35:39 +0800
Subject: [PATCH] 模板修改
---
framework/src/main/java/cn/lili/modules/lmk/service/impl/StoreCouponServiceImpl.java | 18 ++++++++++++++++++
1 files changed, 18 insertions(+), 0 deletions(-)
diff --git a/framework/src/main/java/cn/lili/modules/lmk/service/impl/StoreCouponServiceImpl.java b/framework/src/main/java/cn/lili/modules/lmk/service/impl/StoreCouponServiceImpl.java
index 1a5df49..0b325d6 100644
--- a/framework/src/main/java/cn/lili/modules/lmk/service/impl/StoreCouponServiceImpl.java
+++ b/framework/src/main/java/cn/lili/modules/lmk/service/impl/StoreCouponServiceImpl.java
@@ -246,4 +246,22 @@
storeCouponSingle.setCouponNo(String.format("%08d", i));
return storeCouponSingle;
}
+
+ @Override
+ public Result changeStatus(String id) {
+ StoreCoupon storeCoupon = this.getById(id);
+ if (storeCoupon == null) {
+ throw new ServiceException("褰撳墠搴楅摵浼樻儬鍗蜂笉瀛樺湪");
+ }
+ String status = storeCoupon.getStatus();
+ if (StoreCouponStausEnum.ENABLE.name().equals(status)) {
+ storeCoupon.setStatus(StoreCouponStausEnum.DISABLE.name());
+ }else if (StoreCouponStausEnum.DISABLE.name().equals(status)) {
+ storeCoupon.setStatus(StoreCouponStausEnum.ENABLE.name());
+ }else {
+ throw new ServiceException("褰撳墠搴楅摵浼樻儬鍗风姸鎬佸紓甯告棤娉曚慨鏀�");
+ }
+ this.updateById(storeCoupon);
+ return Result.ok();
+ }
}
--
Gitblit v1.8.0