package com.xunwang.education.controller;


import com.github.xiaoymin.knife4j.annotations.ApiSupport;
import com.xunwang.servicebase.utils.R;
import com.xunwang.education.entity.Swiper;
import com.xunwang.education.service.SwiperService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
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;

/**
 * <p>
 * 轮播图 前端控制器
 * </p>
 *
 * @author Long
 * @since 2022-11-18
 */
@ApiSupport(author = "Long")
@Api("获取轮播图")
@RestController
@RequestMapping("/education/swiper")
public class SwiperController {

    @Autowired
    private SwiperService swiperService;

    @ApiOperation("获取轮播图列表")
    @GetMapping("getSwiperList")
    public R getSwiperList() {
        List<Swiper> list = swiperService.list(null);
        return R.ok().data("list", list);
    }

}

