src/main/java/com/mty/cc/controller/ScoreController.java
(开头部分) 10KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
package com.mty.cc.controller;
import com.mty.cc.po.Appeal;
import com.mty.cc.po.Course;
import com.mty.cc.po.Score;
import com.mty.cc.po.User;
import com.mty.cc.service.CourseService;
import com.mty.cc.service.ScoreService;
import com.mty.cc.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
import java.util.ArrayList;
import java.util.List;
/*
* @description: 控制层
* @author: mty
*/
@Controller
@RequestMapping(value = "/score")
class ScoreController {
@Autowired(required=false)
private ScoreService scoreService;
@Autowired(required=false)
private CourseService courseService;
@Autowired(required=false)
private UserService userService;
/*
* @description: 跳转到首页
* @author: mty
*/
@RequestMapping("/scoreIndex")
public String scoreIndex(HttpServletRequest request,Model model) throws Exception{
List<Score> scoreList = scoreService.queryByAll();
int total = scoreList.size();
HttpSession session = request.getSession();
String type = session.getAttribute("type").toString();
model.addAttribute("scoreList", scoreList);
model.addAttribute("total", total);
model.addAttribute("type", type);
return "score/ScoreIndex";
}
/*
* @description: 学生跳转到首页
* @author: mty
*/
后面还有 255 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
