From 9465eba6872fa401a0faa65891c8b6444479c3a5 Mon Sep 17 00:00:00 2001
From: puzhibing <393733352@qq.com>
Date: 星期二, 10 九月 2024 11:22:40 +0800
Subject: [PATCH] 合并代码

---
 ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TCouponController.java |   17 +++++++++++++++++
 1 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TCouponController.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TCouponController.java
index 792106f..a2eefca 100644
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TCouponController.java
+++ b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TCouponController.java
@@ -197,5 +197,22 @@
         return R.ok(coupon);
     }
 
+    @PostMapping(value = "/getCouponById")
+    public R<TCoupon> getCouponById(@RequestParam("id") Integer id){
+        TCoupon coupon = tCouponService.getById(id);
+        return R.ok(coupon);
+    }
+    
+    
+    /**
+     * 修改优惠券
+     * @param coupon
+     * @return
+     */
+    @PostMapping(value = "/updateCoupon")
+    public R updateCoupon(@RequestBody TCoupon coupon){
+        tCouponService.updateById(coupon);
+        return R.ok();
+    }
 }
 

--
Gitblit v1.7.1