
package com.tmerclub.cloud.seckill.controller.app;

import com.tmerclub.cloud.common.response.ServerResponseEntity;
import com.tmerclub.cloud.seckill.mapper.SeckillMapper;
import com.tmerclub.cloud.seckill.model.SeckillCategory;
import com.tmerclub.cloud.seckill.service.SeckillCategoryService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
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;

/**
 * 秒杀分类信息
 *
 * @author lhd
 * @date 2021-04-19 11:26:35
 */
@RestController("appSeckillCategoryController")
@RequestMapping("/ua/seckillCategory")
@Tag(name = "app-秒杀分类信息")
public class SeckillCategoryController {

    @Autowired
    private SeckillCategoryService seckillCategoryService;

    @Autowired
    private SeckillMapper seckillMapper;


    @GetMapping("/list")
    @Operation(summary = "获取秒杀分类信息列表", description = "分页获取秒杀分类信息列表")
    public ServerResponseEntity<List<SeckillCategory>> list() {
        List<SeckillCategory> seckillCategory = seckillCategoryService.list();
        return ServerResponseEntity.success(seckillCategory);
    }
}
