From b9522d131e168a92c88f23e2c0a3a2df079926b4 Mon Sep 17 00:00:00 2001
From: zhibing.pu <393733352@qq.com>
Date: 星期一, 19 八月 2024 17:43:43 +0800
Subject: [PATCH] 新增加小程序接口

---
 ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TCouponController.java |   18 ++++++++++++++----
 1 files changed, 14 insertions(+), 4 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 a94298d..eede80e 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
@@ -87,6 +87,8 @@
                 }else{
                     record.setMeetTheConditions("满"+byId.getMeetTheConditions()+"元可用");
                 }
+                record.setCoverPicture(byId.getCoverPicture());
+                record.setDetailsPicture(byId.getDetailsPicture());
             }
         }
         return AjaxResult.ok(data);
@@ -115,11 +117,7 @@
         return AjaxResult.ok(tCouponService.pageList(dto));
     }
 
-    @PostMapping(value = "/getCouponById")
-    public R<TCoupon> getCouponById(@RequestParam Integer id) {
-        return R.ok(tCouponService.getById(id));
 
-    }
     /**
      * 小程序远程调用 获取优惠券信息
      */
@@ -132,5 +130,17 @@
         }
         return R.ok(list);
     }
+    
+    
+    /**
+     * 根据id获取优惠券信息
+     * @param id
+     * @return
+     */
+    @PostMapping(value = "/getCouponById1/{id}")
+    public R<TCoupon> getCouponById1(@PathVariable(value = "id") Integer id){
+        TCoupon coupon = tCouponService.getById(id);
+        return R.ok(coupon);
+    }
 }
 

--
Gitblit v1.7.1