44323
2024-02-22 aa8ff2d61669d0779fdacdba76e26388587b435d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
package com.stylefeng.guns.modular.api;
 
import com.stylefeng.guns.modular.system.service.IBannerService;
import com.stylefeng.guns.modular.system.util.ResultUtil;
import com.stylefeng.guns.modular.system.warpper.res.BannerRes;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
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.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
 
import java.util.List;
 
/**
 * @author zhibing.pu
 * @Date 2023/11/7 16:42
 */
@RestController
@RequestMapping("")
public class BannerController {
 
    @Autowired
    private IBannerService bannerService;
 
 
 
    @ResponseBody
    @GetMapping("/base/banner/getBanners")
    @ApiOperation(value = "获取各种banner", tags = {"首页"})
    @ApiImplicitParams({
            @ApiImplicitParam(name = "position", value = "位置(1=首页,6=租房,7=买房,8=公司盘,9=求房源)", required = true)
    })
    public ResultUtil<BannerRes> getBanners(Integer position){
        BannerRes banners = bannerService.getBanner(position);
        return ResultUtil.success(banners);
    }
}