mitao
2024-05-20 3eaebb9f6c5ed23d3a9a5c644228452f890fb4dd
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
51
52
53
54
55
56
57
58
59
60
61
62
63
package com.ruoyi.goods.controller.mamagement;
 
 
import com.ruoyi.common.core.domain.R;
import com.ruoyi.goods.domain.pojo.GoodsSku;
import com.ruoyi.goods.domain.vo.GoodsCategoryVO;
import com.ruoyi.goods.service.IGoodsBrandService;
import com.ruoyi.goods.service.IGoodsCategoryService;
import com.ruoyi.goods.service.IGoodsFlavorTypeService;
import com.ruoyi.goods.service.IGoodsInfoTitleService;
import com.ruoyi.goods.service.IGoodsInfoTitleValueService;
import com.ruoyi.goods.service.IGoodsSeriesService;
import com.ruoyi.goods.service.IGoodsSkuService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import java.util.List;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
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("/mgt/goods-sku")
@RequiredArgsConstructor
@Api(value = "管理后台商品相关接口", tags = {"管理后台商品相关接口"})
public class MGTGoodsSkuController {
 
    private final IGoodsSkuService goodsSkuService;
    private final IGoodsBrandService goodsBrandService;
    private final IGoodsSeriesService goodsSeriesService;
    private final IGoodsCategoryService goodsCategoryService;
    private final IGoodsInfoTitleService goodsInfoTitleService;
    private final IGoodsFlavorTypeService goodsFlavorTypeService;
    private final IGoodsInfoTitleValueService goodsInfoTitleValueService;
 
    @ApiOperation(value = "获取商品分类列表", notes = "获取商品分类列表")
    @GetMapping("/category/list")
    public R<List<GoodsCategoryVO>> getGoodsCategoryList() {
        return R.ok(goodsCategoryService.getGoodsCategoryList());
    }
 
    /**
     * 获取当前商品信息
     */
    @RequestMapping("/getGoodsSkuOne")
    @ResponseBody
 
    public GoodsSku getGoodsSkuOne(Integer goodsSkuId) {
        GoodsSku goodsSkuOne = goodsSkuService.getById(goodsSkuId);
        return goodsSkuOne;
 
    }
 
}