package com.ruoyi.api;


import com.ruoyi.ai.domain.AiBanner;
import com.ruoyi.ai.service.IAiBannerService;
import com.ruoyi.common.annotation.Anonymous;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.page.TableDataInfo;
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;

@Api(tags = "ai-banner信息")
@RestController
@RequestMapping("/api/banner")
public class AiBannerApiController extends BaseController {

    @Autowired
    private IAiBannerService aiBannerService;

    /**
     * 查询banner管理列表
     */
    @GetMapping("/getBannerList")
    @ApiOperation("查询banner列表")
    @Anonymous
    public TableDataInfo getBannerList(AiBanner aiBanner)
    {
        aiBanner.setStatus(0);
        List<AiBanner> list = aiBannerService.selectAiBannerList(aiBanner);
        return getDataTable(list);
    }


}
