package com.fs.app.controller;


import com.fs.common.core.domain.R;
import com.fs.store.service.IFsAdvService;
import com.fs.store.vo.FsAdvListQueryVO;
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.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import java.util.List;


@Api("广告接口")
@RestController
@RequestMapping(value="/app/adv")
public class AdvController extends  AppBaseController {

    @Autowired
    private IFsAdvService advService;

    /**
     * 获取用户信息
     * @param request
     * @return     */
    @ApiOperation("获取广告")
    @GetMapping("/getAdv")
    public R getProductCate(@RequestParam(value="advType") Integer advType, HttpServletRequest request){
        List<FsAdvListQueryVO> advList=advService.selectFsAdvListQuery(advType);
        return R.ok().put("data", advList);
    }


}
