luodangjia
2024-08-19 cb46cadf5a673f53a4ddcf93cadd1f376a9adeea
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);
    }
}