package com.bofeng.wx.controller; import com.bofeng.entity.QzTask; import com.bofeng.service.QzTaskService; import com.google.common.collect.Maps; import com.yvan.platform.YvanUtil; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.ui.ModelMap; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.servlet.ModelAndView; import java.util.List; import java.util.Map; @RestController public class YeWeiHuiController { @Autowired private QzTaskService qzTaskService; @GetMapping("/yeweihui/home.html") public ModelAndView yeweihui(ModelMap model) { Map queryParam = Maps.newLinkedHashMap(); queryParam.put("userId", "12345677"); queryParam.put("statistics", "M"); List taskList = qzTaskService.selectAll(); model.put("taskList", YvanUtil.toJsonPretty(taskList)); return new ModelAndView("/yeweihui/home.ftl", model); } }