From 85a21fdb54fa06f2fa6e25e763ec5337e85295e7 Mon Sep 17 00:00:00 2001
From: 无关风月 <443237572@qq.com>
Date: 星期五, 16 八月 2024 16:55:34 +0800
Subject: [PATCH] 小程序登录 token失效全局异常

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

diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TGoodsController.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TGoodsController.java
index f714570..bea875b 100644
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TGoodsController.java
+++ b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TGoodsController.java
@@ -1,6 +1,7 @@
 package com.ruoyi.other.controller;
 
 
+import com.ruoyi.common.core.domain.R;
 import com.ruoyi.common.core.web.domain.AjaxResult;
 import com.ruoyi.common.core.web.page.PageInfo;
 import com.ruoyi.other.api.domain.TActivity;
@@ -57,5 +58,16 @@
     public AjaxResult<PageInfo<TGoods>> pageList(@RequestBody GoodsDTO dto) {
         return AjaxResult.ok(goodsService.pageList(dto));
     }
+    
+    /**
+     * 根据id获取商品信息
+     * @param id
+     * @return
+     */
+    @PostMapping("/getGoodsById/{id}")
+    public R<TGoods> getGoodsById(@PathVariable Integer id){
+        TGoods goods = goodsService.getById(id);
+        return R.ok(goods);
+    }
 }
 

--
Gitblit v1.7.1