rentaiming
2024-05-24 c9e904c9533944c491d348e2a35c78bddc28db4b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
package com.ruoyi.goods.controller;
 
 
import com.ruoyi.common.core.domain.R;
import com.ruoyi.goods.service.IGoodsSkuService;
import javax.annotation.Resource;
 
import com.ruoyi.system.api.domain.GoodsSku;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
 
/**
 * <p>
 * 商品表 前端控制器
 * </p>
 *
 * @author mitao
 * @since 2024-05-16
 */
@RestController
@RequestMapping("/goods-sku")
public class GoodsSkuController {
 
    @Resource
    private IGoodsSkuService iGoodsSkuService;
 
    /**
     * 获取当前商品信息
     *
     */
    @PostMapping("/getGoodsSkuOne")
    @ResponseBody
    public R<GoodsSku> getGoodsSkuOne(@RequestBody Integer goodsSkuId) {
        GoodsSku goodsSkuOne=iGoodsSkuService.getById(goodsSkuId);
        return R.ok(goodsSkuOne);
 
    }
 
 
    @PostMapping("/updateGoodsSkuOne")
    @ResponseBody
    public R<Boolean> updateGoodsSkuOne(@RequestBody GoodsSku goodsSku) {
        return R.ok(iGoodsSkuService.updateById(goodsSku));
 
    }
 
}