package com.miaxis.app.controller.product;

import com.miaxis.common.constant.Constants;
import com.miaxis.common.core.controller.BaseController;
import com.miaxis.common.core.page.ResponsePageInfo;
import com.miaxis.product.service.IProductTypeInfoService;
import com.miaxis.product.vo.AppletProductTypeInfoVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 【小程序-品类管理】Controller
 *
 * @author miaxis
 * @date 2021-03-11
 */
@RestController
@RequiredArgsConstructor
@RequestMapping(Constants.STUDENT_PREFIX+"/applet/product/info")
@Api(tags={"【小程序-品类管理】"})
public class AppletProductTypeInfoController extends BaseController{

    private final IProductTypeInfoService productTypeInfoService;


    /**
     * 查询品类列表
     */
    @GetMapping("/list")
    @ApiOperation("查询品类列表")
    public ResponsePageInfo<AppletProductTypeInfoVo> list(){
        List<AppletProductTypeInfoVo> list = productTypeInfoService.selectAppletProductTypeInfoList();
        return toResponsePageInfo(list);
    }



}
