首页>代码>基于spring boot+mybatis+mysql开发银杏湖景区旅游系统,包括前台显示和后台管理系统>/travel_platform/src/main/java/hue/edu/xiong/volunteer_travel/controller/IndexController.java
package hue.edu.xiong.volunteer_travel.controller; import hue.edu.xiong.volunteer_travel.model.Attractions; import hue.edu.xiong.volunteer_travel.model.Hotel; import hue.edu.xiong.volunteer_travel.model.TravelRoute; import hue.edu.xiong.volunteer_travel.model.TravelStrategy; import hue.edu.xiong.volunteer_travel.service.ReserveService; import hue.edu.xiong.volunteer_travel.service.RouteService; import hue.edu.xiong.volunteer_travel.service.StrategyService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.RequestMapping; import java.util.List; @Controller public class IndexController { @Autowired private ReserveService reserveService; @Autowired private RouteService routeService; @Autowired private StrategyService strategyService; @RequestMapping("/") public String index(Model model) { List<Hotel> top10Hotel = reserveService.getTop10Hotel(); List<Attractions> top10Attractions = reserveService.getTop10Attractions(); List<TravelRoute> top10Route = routeService.findTop10Route(); List<TravelStrategy> top10Strategy = strategyService.findTop10Strategy(); model.addAttribute("top10Strategy",top10Strategy); model.addAttribute("top10Route", top10Route); model.addAttribute("top10Hotel", top10Hotel); model.addAttribute("top10Attractions", top10Attractions); return "index"; } }

102404426 LV8
3月3日
陈小灏 LV18
2月21日
微信网友_7041036943331328 LV7
2024年12月31日
陈金龙 LV7
2024年12月3日
wuying8208 LV15
2024年10月23日
微信网友_7134912998903808 LV15
2024年8月29日
krispeng LV14
2024年8月26日
TY0165 LV20
2024年6月21日
yuquanzuo LV2
2024年5月17日
李朝磊 LV18
2024年4月22日

jinxinquq
3月31日
暂无贡献等级
Javatopone
3月29日
暂无贡献等级
qwerty1019
3月3日
暂无贡献等级
102404426 LV8
3月3日
qibodong LV15
2月28日
哪里的完整版 LV8
2月26日
dane168 LV8
2月17日
微信网友_7371218154688512 LV4
2月5日
微信网友_7041036943331328 LV7
2024年12月31日
xiejingxun LV2
2024年12月31日