package com.ruoyi.web.controller.app;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.ss.ad.domain.AdQuery;
import com.ruoyi.ss.ad.service.IAdService;
import com.ruoyi.ss.ad.service.impl.AdServiceImpl;
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;

/**
 * @author wjh
 * 2024/5/11
 */
@RestController
@RequestMapping("/app/ad")
public class AppAdController extends BaseController {

    @Autowired
    private IAdService adService;

    @ApiOperation("获取广告")
    @GetMapping
    public AjaxResult getAd() {
        return success(adService.selectOne(new AdQuery()));
    }

}
