package com.kym.miniapp.controller;

import cn.dev33.satoken.annotation.SaIgnore;
import com.kym.common.R;
import com.kym.service.BannerService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * banner配置表 前端控制器
 * </p>
 *
 * @author skyline
 * @since 2023-10-18
 */
@RestController
@RequestMapping("/banner")
public class BannerController {

    private final BannerService bannerService;

    public BannerController(BannerService bannerService) {
        this.bannerService = bannerService;
    }

    /**
     * Banner列表
     *
     * @return
     */
    @SaIgnore
    @GetMapping
    R<?> listBanner() {
        return R.success(bannerService.listBannerForApp());
    }

}
