package cn.iocoder.yudao.module.appBase.controller;

import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.module.jx.core.controller.BaseController;
import cn.iocoder.yudao.module.jx.domain.DriveSchoolSwiper;
import cn.iocoder.yudao.module.jx.service.IDriveSchoolSwiperService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 驾校-轮播图Controller
 *
 * @author ruoyi
 * @date 2024-03-19
 */
@RestController
@RequestMapping("/drivingSchool/applet/swiper")
public class DriveSchoolSwiperAppletController extends BaseController
{
    @Autowired
    private IDriveSchoolSwiperService driveSchoolSwiperService;

    /**
     * 查询驾校-轮播图列表
     */
    @GetMapping("/list")
    public CommonResult list(DriveSchoolSwiper driveSchoolSwiper)
    {
        List<DriveSchoolSwiper> list = driveSchoolSwiperService.selectDriveSchoolSwiperList(driveSchoolSwiper);
        return CommonResult.success(list);
    }


    /**
     * 获取驾校-轮播图详细信息
     */
   ////@PreAuthorize("@ss.hasPermi('system:swiper:query')")
    @GetMapping(value = "/{id}")
    public CommonResult getInfo(@PathVariable("id") Long id)
    {
        return success(driveSchoolSwiperService.selectDriveSchoolSwiperById(id));
    }
}
