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;
|
|
}
|
|
}
|