package com.ruoyi.web.app;

import com.ruoyi.bst.ad.service.AdService;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.page.TableDataInfo;
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;

@RestController
@RequestMapping("/app/ad")
public class AppAdController extends BaseController {

    @Autowired
    private AdService adService;

    @ApiOperation("获取广告")
    @GetMapping
    public TableDataInfo getAd() {
        startPage();
        return getDataTable(adService.toAppVOList());
    }

}
