src/com/cms/controller/NoticeController.java
(开头部分) 5KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
package com.cms.controller;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.servlet.ModelAndView;
import com.alibaba.fastjson.JSON;
import com.cms.entity.Notice;
import com.cms.entity.Student;
import com.cms.entity.User;
import com.cms.service.NoticeService;
import com.cms.utils.StrUtil;
import com.cms.utils.page.Pagination;
@Controller
@RequestMapping(value="notice")
public class NoticeController {
private static final Integer AUTH_A = 3;
private static final Integer AUTH_T = 2;
private static final Integer AUTH_S = 1;
@Autowired
private NoticeService noticeService;
@ResponseBody
@RequestMapping(value="/list")
public String getNoticeList(@RequestParam(defaultValue="0")int curr,
@RequestParam(defaultValue="20")int nums,
@RequestParam(defaultValue="")String searchKey,
HttpSession session) {
Pagination<Student> page = new Pagination<Student>();
page.setPageSize(nums);
page.setPageNum(curr);
List<Notice> list = new ArrayList<Notice>();
User user = (User) session.getAttribute(StrUtil.USER);
Integer auth = null;
if (user.getUserType().equals(StrUtil.ADMIN)) {
auth = AUTH_A;
} else if (user.getUserType().equals(StrUtil.TEACHER)) {
auth = AUTH_T;
} else if (user.getUserType().equals(StrUtil.STUDENT)) {
auth = AUTH_S;
}
后面还有 134 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。