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/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