package com.ruoyi.system.controller.miniapp; import com.ruoyi.common.core.domain.R; import com.ruoyi.system.domain.vo.*; import com.ruoyi.system.service.config.*; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RestController; import javax.annotation.Resource; import java.util.List; /** * @author jqs34 * @ClassName AppHomeController * @description: TODO * @date 2023年04月18日 * @version: 1.0 */ @Api(value = "小程序首页相关接口", tags = "小程序首页相关接口", description = "小程序首页相关接口") @RestController @RequestMapping("/app/home") public class AppHomeController { @Resource private BannerService bannerService; @Resource private QuickEntryService quickEntryService; @Resource private AdvertService advertService; @Resource private PopService popService; @Resource private BottomNavService bottomNavService; @RequestMapping(value = "/getHomeBanner", method = RequestMethod.POST) @ApiOperation(value = "获取首页banner【2.0】") public R> getHomeBanner() { List appBannerVoList = bannerService.listHomeBannerVo(); return R.ok(appBannerVoList); } @RequestMapping(value = "/getQuickEntry", method = RequestMethod.POST) @ApiOperation(value = "获取首页快速入口【2.0】") public R> getQuickEntry() { List appQuickEntryVoList = quickEntryService.listQuickEntryVo(); return R.ok(appQuickEntryVoList); } @RequestMapping(value = "/getAdvert", method = RequestMethod.POST) @ApiOperation(value = "获取首页广告【2.0】") public R getAdvert() { AppAdvertVo appAdvertVo = advertService.getAdvertVo(); return R.ok(appAdvertVo); } @RequestMapping(value = "/getPop", method = RequestMethod.POST) @ApiOperation(value = "获取弹窗【2.0】") public R getAppPop() { AppPopVo appPopVo = popService.getAppPop(); return R.ok(appPopVo); } @RequestMapping(value = "/getBottomNav", method = RequestMethod.GET) @ApiOperation(value = "获取底部导航栏") public R> getBottomNav() { List list = bottomNavService.getAppBottomNav(); return R.ok(list); } }