• Java项目:ssm教务管理系统


    作者主页:夜未央5788

     简介:Java领域优质创作者、Java项目、学习资料、技术互助

    文末获取源码

    项目介绍

    随着中国教育体制的不断改革与完善,学校的学生教师管理员等对互联网的使用也越来越频繁。随着学生与教师数量的不断增多,教务管理的容量,安全性,便捷性显得尤为重要。传统的人工管理的劣势也慢慢显现出来,但是其中的一优点还需要继续采纳,所以传统的人工与计算机的结合成为了目前的主流。对此我开发了一套基于SSM框架的教务管理系统。
    该系统采用的是Spring、SpringMVC、Mybatis、Shiro、LayUI、腾讯云。

    该项目分为管理员、教师、学生三种角色。
    主要实现了用户的登录注册,公告的浏览,选课操作,不同的管理员对不同信息的管理,教师对课程评分,教师结课等功能。该系统我在完成基础功能的前提下完成了上线。
     

    关键词:教务;教务管理系统;云服务器;JAVA;SSM

    环境需要

    1.运行环境:最好是java jdk 1.8,我们在这个平台上运行的。其他版本理论上也可以。
    2.IDE环境:IDEA,Eclipse,Myeclipse都可以。推荐IDEA;
    3.tomcat环境:Tomcat 7.x,8.x,9.x版本均可
    4.硬件环境:windows 7/8/10 1G内存以上;或者 Mac OS; 
    5.数据库:MySql 8.0版本;

    6.是否Maven项目:是;

    技术栈

    1. 后端:Spring+SpringMVC+Mybatis+Shiro

    2. 前端:JSP+LayUI+Echarts+jQuery

    使用说明

    1. 使用Navicat或者其它工具,在mysql中创建对应名称的数据库,并导入项目的sql文件;

    2. 使用IDEA/Eclipse/MyEclipse导入项目,Eclipse/MyEclipse导入时,若为maven项目请选择maven;

    若为maven项目,导入成功后请执行maven clean;maven install命令,然后运行;

    3. 将项目中db.properties配置文件中的数据库配置改为自己的配置;
    4. 运行项目,输入localhost:8080/ 登录
    管理员:admin 123456
    学生:zhangsan 123456

    教师:wangliu 123456

    运行截图

     

     

     

     

     

     

    相关代码

    基础课程控制器

    1. package com.jubilantz.controller;
    2. import com.jubilantz.entity.EasBaseCourse;
    3. import com.jubilantz.entity.EasClass;
    4. import com.jubilantz.services.EasBaseCourseService;
    5. import com.jubilantz.utils.PageUtil;
    6. import org.apache.shiro.authz.annotation.RequiresPermissions;
    7. import org.springframework.beans.factory.annotation.Autowired;
    8. import org.springframework.stereotype.Controller;
    9. import org.springframework.web.bind.annotation.RequestMapping;
    10. import org.springframework.web.bind.annotation.RequestMethod;
    11. import org.springframework.web.bind.annotation.RequestParam;
    12. import org.springframework.web.bind.annotation.ResponseBody;
    13. import java.util.HashMap;
    14. import java.util.List;
    15. import java.util.Map;
    16. /**
    17. * @Author JubilantZ
    18. * @Date: 2021/4/21 21:40
    19. */
    20. @Controller
    21. @RequestMapping("/easBaseCourse")
    22. public class EasBaseCourseController {
    23. @Autowired
    24. private EasBaseCourseService easBaseCourseService;
    25. @RequestMapping("/index")
    26. public String index() throws Exception {
    27. return "system/baseCourse/index";
    28. }
    29. @RequestMapping("/list")
    30. @ResponseBody
    31. public Map list(@RequestParam(defaultValue = "1") Integer page,
    32. @RequestParam(defaultValue = "10") Integer limit,
    33. EasBaseCourse easBaseCourse) throws Exception{
    34. Map map = new HashMap<>();
    35. int count = easBaseCourseService.getCount();
    36. // System.out.println("总行数:"+count);
    37. PageUtil pageUtil = new PageUtil(page,limit);
    38. List list = easBaseCourseService.getList(easBaseCourse,pageUtil);
    39. map.put("count",count);
    40. map.put("data",list);
    41. map.put("code",0);
    42. map.put("msg","");
    43. return map;
    44. }
    45. @RequestMapping("/baseCourseAddForm")
    46. public String baseCourseAddForm() throws Exception {
    47. return "system/baseCourse/baseCourseAddForm";
    48. }
    49. @RequestMapping(value = "/addBaseCourse",method = RequestMethod.POST)
    50. @ResponseBody
    51. public Map addBaseCourse(EasBaseCourse easBaseCourse) throws Exception{
    52. Map map = new HashMap<>();
    53. // System.out.println("我是基本课程名称:"+easBaseCourse.getCoursename());
    54. // System.out.println("我是基本课程简介:"+easBaseCourse.getSynopsis());
    55. List list = easBaseCourseService.findBaseCourseName(easBaseCourse.getCoursename());
    56. if (list.size() != 0){
    57. map.put("msg","基本课程已存在");
    58. map.put("result",false);
    59. }else if(easBaseCourse.getCoursename().length() <= 0){
    60. map.put("msg","课程名称不能为空");
    61. map.put("result",false);
    62. }else{
    63. //课程为null也可以添加 待完善
    64. easBaseCourseService.addBaseCourse(easBaseCourse);
    65. map.put("msg","添加成功");
    66. map.put("result",true);
    67. }
    68. return map;
    69. }
    70. @RequestMapping("/batchDeleteBaseCourse")
    71. @ResponseBody
    72. @RequiresPermissions("basecourse:delete")
    73. public Map batchDeleteBaseCourse(Integer[] ids) throws Exception{
    74. Map map = new HashMap();
    75. easBaseCourseService.batchDeleteBaseCourse(ids);
    76. map.put("msg","删除成功");
    77. map.put("result",true);
    78. return map;
    79. }
    80. @RequestMapping(value = "/getBaseCourseView")
    81. @ResponseBody
    82. public EasBaseCourse getBaseCourseView(Integer id) throws Exception {
    83. return easBaseCourseService.getBaseCourseView(id);
    84. }
    85. @RequestMapping(value = "/editBaseCourse",method = RequestMethod.POST)
    86. @ResponseBody
    87. public Map editBaseCourse(EasBaseCourse easBaseCourse) throws Exception{
    88. Map map = new HashMap<>();
    89. easBaseCourseService.updateBaseCourse(easBaseCourse);
    90. map.put("result",true);
    91. return map;
    92. }
    93. @RequestMapping("/search")
    94. @ResponseBody
    95. public List search() throws Exception{
    96. return easBaseCourseService.getAll();
    97. }
    98. }

    课程控制器

    1. package com.jubilantz.controller;
    2. import com.jubilantz.entity.EasClass;
    3. import com.jubilantz.services.EasClassService;
    4. import com.jubilantz.utils.PageUtil;
    5. import org.apache.shiro.authz.annotation.RequiresPermissions;
    6. import org.springframework.beans.factory.annotation.Autowired;
    7. import org.springframework.stereotype.Controller;
    8. import org.springframework.web.bind.annotation.RequestMapping;
    9. import org.springframework.web.bind.annotation.RequestMethod;
    10. import org.springframework.web.bind.annotation.RequestParam;
    11. import org.springframework.web.bind.annotation.ResponseBody;
    12. import java.util.HashMap;
    13. import java.util.List;
    14. import java.util.Map;
    15. /**
    16. * @Author JubilantZ
    17. * @Date: 2021/4/15 12:35
    18. */
    19. @Controller
    20. @RequestMapping("/easClass")
    21. public class EasClassController {
    22. @Autowired
    23. private EasClassService easClassService;
    24. @RequestMapping("/search")
    25. @ResponseBody
    26. public List search() throws Exception{
    27. return easClassService.getAll();
    28. }
    29. @RequestMapping("/index")
    30. public String index() throws Exception {
    31. return "system/class/index";
    32. }
    33. @RequestMapping("/list")
    34. @ResponseBody
    35. public Map list(@RequestParam(defaultValue = "1") Integer page,
    36. @RequestParam(defaultValue = "10") Integer limit,
    37. EasClass easClass) throws Exception{
    38. Map map = new HashMap<>();
    39. int count = easClassService.getCount();
    40. // System.out.println("总行数:"+count);
    41. PageUtil pageUtil = new PageUtil(page,limit);
    42. List list = easClassService.getList(easClass,pageUtil);
    43. map.put("count",count);
    44. map.put("data",list);
    45. map.put("code",0);
    46. map.put("msg","");
    47. return map;
    48. }
    49. @RequestMapping("/classForm")
    50. public String classForm() throws Exception {
    51. return "system/class/classForm";
    52. }
    53. @RequestMapping(value = "/addClass",method = RequestMethod.POST)
    54. @ResponseBody
    55. public Map addClass(EasClass easClass) throws Exception{
    56. Map map = new HashMap<>();
    57. // System.out.println("我是基本课程名称:"+easBaseCourse.getCoursename());
    58. // System.out.println("我是基本课程简介:"+easBaseCourse.getSynopsis());
    59. List list = easClassService.findClassName(easClass.getClasses());
    60. if (list.size() != 0){
    61. map.put("msg","班级已存在");
    62. map.put("result",false);
    63. }else if(easClass.getClasses().length() <= 0){
    64. map.put("msg","班级不能为空");
    65. map.put("result",false);
    66. }else{
    67. //课程为null也可以添加 待完善
    68. easClassService.addClass(easClass);
    69. map.put("msg","添加成功");
    70. map.put("result",true);
    71. }
    72. return map;
    73. }
    74. @RequestMapping("/batchDeleteClass")
    75. @ResponseBody
    76. @RequiresPermissions("class:delete")
    77. public Map batchDeleteClass(Integer[] ids) throws Exception{
    78. Map map = new HashMap();
    79. // System.out.println("前台传来的为:"+ids);
    80. easClassService.batchDeleteClass(ids);
    81. map.put("msg","删除成功");
    82. map.put("result",true);
    83. return map;
    84. }
    85. @RequestMapping(value = "/getClassView")
    86. @ResponseBody
    87. public EasClass getClassView(Integer id) throws Exception {
    88. return easClassService.getClassView(id);
    89. }
    90. @RequestMapping(value = "/editClass",method = RequestMethod.POST)
    91. @ResponseBody
    92. public Map editClass(EasClass easClass) throws Exception{
    93. Map map = new HashMap<>();
    94. easClassService.updateClass(easClass);
    95. map.put("result",true);
    96. return map;
    97. }
    98. }

    图表控制器

    1. package com.jubilantz.controller;
    2. import com.jubilantz.entity.EasBaseCourse;
    3. import com.jubilantz.services.EasBaseCourseService;
    4. import com.jubilantz.services.EasCourseService;
    5. import com.jubilantz.services.EasStudentService;
    6. import com.jubilantz.services.EasTeacherService;
    7. import org.springframework.beans.factory.annotation.Autowired;
    8. import org.springframework.stereotype.Controller;
    9. import org.springframework.web.bind.annotation.RequestMapping;
    10. import org.springframework.web.bind.annotation.RequestParam;
    11. import org.springframework.web.bind.annotation.ResponseBody;
    12. import java.util.HashMap;
    13. import java.util.Map;
    14. /**
    15. * @Author JubilantZ
    16. * @Date: 2021/4/29 18:29
    17. */
    18. @RequestMapping("/easEchart")
    19. @Controller
    20. public class EasEchartController {
    21. @Autowired
    22. private EasStudentService easStudentService;
    23. @Autowired
    24. private EasTeacherService easTeacherService;
    25. @Autowired
    26. private EasCourseService easCourseService;
    27. @Autowired
    28. private EasBaseCourseService easBaseCourseService;
    29. @RequestMapping("/scoreEchart")
    30. public String scoreEchart(){
    31. return "echarts/ScoreEcharts";
    32. }
    33. @RequestMapping("/peopleEchart")
    34. public String peopleEchart(){
    35. return "echarts/peopleEcharts";
    36. }
    37. @RequestMapping("/getAllStuAndTea")
    38. @ResponseBody
    39. public Map getAllStuAndTea(){
    40. Map map = new HashMap<>();
    41. int totalStu = easStudentService.getTotal();
    42. int totalTea = easTeacherService.getTotal();
    43. // System.out.println("教师总行数---->"+totalTea);
    44. map.put("totalStu",totalStu);
    45. map.put("totalTea",totalTea);
    46. map.put("code",0);
    47. map.put("msg","我是返回的内容");
    48. return map;
    49. }
    50. @RequestMapping("/getAllSex")
    51. @ResponseBody
    52. public Map getAllSex(){
    53. Map map = new HashMap<>();
    54. int totalMan = easStudentService.getTotalSex("男");
    55. int totalWoman = easStudentService.getTotalSex("女");
    56. map.put("totalMan",totalMan);
    57. map.put("totalWoman",totalWoman);
    58. map.put("code",0);
    59. map.put("msg","我是返回的内容");
    60. return map;
    61. }
    62. @RequestMapping("/getAllClassScore")
    63. @ResponseBody
    64. public Map getAllClassScore(Integer baseCourseId) throws Exception {
    65. Map map = new HashMap<>();
    66. // System.out.println("基础课程id为:"+baseCourseId);
    67. //根据基本课程id 和是否结束 来获取每门课程 合格条数 和不合格条数
    68. EasBaseCourse easBaseCourse = easBaseCourseService.getBaseCourseById(baseCourseId);
    69. String coursename = easBaseCourse.getCoursename();
    70. int totalPass = easCourseService.getTotalPass(baseCourseId);
    71. int totalNoPass = easCourseService.getTotalNoPass(baseCourseId);
    72. // if(totalPass != 0 && totalNoPass !=0 ){
    73. if(totalPass != 0 || totalNoPass != 0 ){
    74. map.put("coursename",coursename);
    75. map.put("totalPass",totalPass);
    76. map.put("totalNoPass",totalNoPass);
    77. // System.out.println("通过人数:"+totalPass);
    78. // System.out.println("未通过人数:"+totalNoPass);
    79. // System.out.println("coursename:"+coursename);
    80. }else {
    81. map.put("coursename",coursename);
    82. map.put("totalPass",0);
    83. map.put("totalNoPass",0);
    84. // System.out.println("通过人数:"+totalPass);
    85. // System.out.println("未通过人数:"+totalNoPass);
    86. }
    87. return map;
    88. }
    89. }

    登录控制器

    1. package com.jubilantz.controller;
    2. import com.jubilantz.entity.EasPermission;
    3. import com.jubilantz.entity.EasUser;
    4. import com.jubilantz.mappers.EasPermissionMapper;
    5. import org.apache.shiro.SecurityUtils;
    6. import org.apache.shiro.authc.IncorrectCredentialsException;
    7. import org.apache.shiro.authc.UnknownAccountException;
    8. import org.springframework.beans.factory.annotation.Autowired;
    9. import org.springframework.stereotype.Controller;
    10. import org.springframework.web.bind.annotation.RequestMapping;
    11. import org.springframework.web.bind.annotation.RequestMethod;
    12. import org.springframework.web.bind.annotation.RequestParam;
    13. import org.springframework.web.bind.annotation.ResponseBody;
    14. import javax.servlet.http.HttpServletRequest;
    15. import javax.servlet.http.HttpServletResponse;
    16. import javax.servlet.http.HttpSession;
    17. import java.util.HashMap;
    18. import java.util.List;
    19. import java.util.Map;
    20. /**
    21. * @Author JubilantZ
    22. * @Date: 2021/4/8 15:40
    23. */
    24. @Controller
    25. @RequestMapping("/easLogin")
    26. public class EasLoginController {
    27. @Autowired
    28. private EasPermissionMapper easPermissionMapper;
    29. @RequestMapping("/main")
    30. public String main() throws Exception{
    31. return "main";
    32. }
    33. // @RequestMapping("/home")
    34. // public String home() throws Exception{
    35. // return "system/home/homePage";
    36. // }
    37. @RequestMapping("/success")
    38. @ResponseBody
    39. public Map success(HttpSession session) throws Exception{
    40. Map map = new HashMap<>();
    41. map.put("code",0);
    42. EasUser easUser = (EasUser) SecurityUtils.getSubject().getPrincipal();
    43. session.setAttribute(Constants.LOGIN_USER,easUser);
    44. List list = easPermissionMapper.getPersByUserId(easUser.getId());
    45. session.setAttribute(Constants.LOGIN_USER_PERS,list);
    46. return map;
    47. }
    48. @RequestMapping(value = "/login",method = RequestMethod.GET)
    49. public String login() throws Exception{
    50. return "login";
    51. }
    52. /**
    53. * post方式的login方式什么时候调用?
    54. * 身份认证失败的时候会自动调用
    55. * @return
    56. * @throws Exception
    57. */
    58. @RequestMapping(value = "/login", method = RequestMethod.POST)
    59. @ResponseBody
    60. public Map login(HttpServletRequest request) throws Exception{
    61. Map map = new HashMap<>();
    62. // System.out.println("认证失败了吧!来我这了吧");
    63. String exceptionName = request.getAttribute("shiroLoginFailure").toString();
    64. if (exceptionName.equals(UnknownAccountException.class.getName())){
    65. map.put("code",1);
    66. map.put("msg","用户名不正确");
    67. return map;
    68. }else if(exceptionName.equals(IncorrectCredentialsException.class.getName())){
    69. map.put("code",2);
    70. map.put("msg","密码不正确");
    71. return map;
    72. }else if (exceptionName.equals("randomCodeError")){
    73. map.put("code",3);
    74. map.put("msg","验证码不正确");
    75. return map;
    76. }
    77. return null;
    78. }
    79. }

    主控制器

    1. package com.jubilantz.controller;
    2. import com.jubilantz.entity.EasNotice;
    3. import com.jubilantz.entity.EasUser;
    4. import com.jubilantz.services.EasNoticeService;
    5. import com.jubilantz.services.EasUserService;
    6. import com.jubilantz.utils.PageUtil;
    7. import org.apache.shiro.SecurityUtils;
    8. import org.springframework.beans.factory.annotation.Autowired;
    9. import org.springframework.stereotype.Controller;
    10. import org.springframework.web.bind.annotation.RequestMapping;
    11. import org.springframework.web.bind.annotation.RequestMethod;
    12. import org.springframework.web.bind.annotation.RequestParam;
    13. import org.springframework.web.bind.annotation.ResponseBody;
    14. import org.springframework.web.servlet.ModelAndView;
    15. import java.util.HashMap;
    16. import java.util.List;
    17. import java.util.Map;
    18. /**
    19. * @Author JubilantZ
    20. * @Date: 2021/4/28 20:25
    21. */
    22. @RequestMapping("/main")
    23. @Controller
    24. public class EasMainController {
    25. @Autowired
    26. private EasNoticeService easNoticeService;
    27. @Autowired
    28. private EasUserService easUserService;
    29. @RequestMapping("/homePage")
    30. public String homePage() throws Exception{
    31. return "system/home/homePage";
    32. }
    33. // @RequestMapping(value="/getNotice",method = RequestMethod.GET)
    34. // @ResponseBody
    35. // public Map getNotice(@RequestParam(defaultValue = "1") Integer page,
    36. // @RequestParam(defaultValue = "2") Integer limit,
    37. // EasNotice easNotice) throws Exception {
    38. // Map map = new HashMap<>();
    39. //
    40. System.out.println("模糊查询的内容为:"+easNotice.getContent());
    41. //
    42. // EasUser easUser = (EasUser) SecurityUtils.getSubject().getPrincipal();//获取EasUser对象
    43. //
    44. // //判断用户有没有 角色 有就返回角色id 没有就返回1000
    45. //
    46. // Integer roleId = easUserService.findRoleIdByUserId(easUser.getId());
    47. //
    48. //
    49. // String strRoleId =roleId +"";
    50. System.out.println("roleId:"+roleId);
    51. System.out.println("strRoleId:"+strRoleId);
    52. // PageUtil pageUtil = new PageUtil(page,limit);
    53. //
    54. // //没有角色
    55. // if(roleId == null || !(strRoleId.length() >0 || roleId == 2)){//全体可见的部分公告,没要求
    56. // //type = 1 全员可见 type = 2 教师可见 type = 3 草稿 管理员可见
    57. // int type = 1;
    58. // int count = easNoticeService.getCountByTypeAndEasNotice(type,easNotice);
    59. // pageUtil.setTotal(count);
    60. // pageUtil.setCount(limit);
    61. // int totalPage = pageUtil.getTotalPage();
    62. System.out.println("总页数为"+totalPage);
    63. //
    64. // List list = easNoticeService.getNoticeListByTypeAndEasNotice(type,easNotice,pageUtil);
    65. //
    66. // map.put("totalPage",totalPage);
    67. // map.put("count",count);
    68. // map.put("data",list);
    69. // map.put("code",0);
    70. // map.put("msg","");
    71. // }else if(roleId == 3){//增加教师公告可见
    72. // int type = 2;
    73. // int count = easNoticeService.getCountByTypeAndEasNotice(type,easNotice);
    74. // List list = easNoticeService.getNoticeListByTypeAndEasNotice(type,easNotice,pageUtil);
    75. // pageUtil.setTotal(count);
    76. // pageUtil.setCount(limit);
    77. // int totalPage = pageUtil.getTotalPage();
    78. System.out.println("总页数为"+totalPage);
    79. //
    80. // map.put("totalPage",totalPage);
    81. // map.put("count",count);
    82. // map.put("data",list);
    83. // map.put("code",0);
    84. // map.put("msg","");
    85. // }else{//管理员可见全部
    86. // int type = 3;
    87. // int count = easNoticeService.getCountByTypeAndEasNotice(type,easNotice);
    88. // List list = easNoticeService.getNoticeListByTypeAndEasNotice(type,easNotice,pageUtil);
    89. //
    90. // pageUtil.setTotal(count);
    91. // pageUtil.setCount(limit);
    92. // int totalPage = pageUtil.getTotalPage();
    93. //
    94. // map.put("totalPage",totalPage);
    95. //
    96. // map.put("count",count);
    97. // map.put("data",list);
    98. // map.put("code",0);
    99. // map.put("msg","");
    100. // }
    101. //
    102. // return map;
    103. // }
    104. @RequestMapping(value="/getNotice",method = RequestMethod.GET)
    105. @ResponseBody
    106. public Map getNotice(@RequestParam(defaultValue = "1") Integer page,
    107. @RequestParam(defaultValue = "2") Integer limit,
    108. EasNotice easNotice) throws Exception {
    109. Map map = new HashMap<>();
    110. // System.out.println("模糊查询的内容为:"+easNotice.getContent());
    111. EasUser easUser = (EasUser) SecurityUtils.getSubject().getPrincipal();//获取EasUser对象
    112. //判断用户有没有 角色 有就返回角色id 没有就返回1000
    113. List rolelist = easUserService.findRoleIdByUserId2(easUser.getId());
    114. PageUtil pageUtil = new PageUtil(page,limit);
    115. if(rolelist.size() >= 2){
    116. int type = 3;
    117. int count = easNoticeService.getCountByTypeAndEasNotice(type,easNotice);
    118. List list = easNoticeService.getNoticeListByTypeAndEasNotice(type,easNotice,pageUtil);
    119. pageUtil.setTotal(count);
    120. pageUtil.setCount(limit);
    121. int totalPage = pageUtil.getTotalPage();
    122. map.put("totalPage",totalPage);
    123. map.put("count",count);
    124. map.put("data",list);
    125. map.put("code",0);
    126. map.put("msg","");
    127. }else {
    128. if(rolelist.size() == 0 || rolelist.get(0) == 2){
    129. //type = 1 全员可见 type = 2 教师可见 type = 3 草稿 管理员可见
    130. int type = 1;
    131. int count = easNoticeService.getCountByTypeAndEasNotice(type,easNotice);
    132. pageUtil.setTotal(count);
    133. pageUtil.setCount(limit);
    134. int totalPage = pageUtil.getTotalPage();
    135. // System.out.println("总页数为"+totalPage);
    136. List list = easNoticeService.getNoticeListByTypeAndEasNotice(type,easNotice,pageUtil);
    137. map.put("totalPage",totalPage);
    138. map.put("count",count);
    139. map.put("data",list);
    140. map.put("code",0);
    141. map.put("msg","");
    142. }else if(rolelist.get(0) == 3) {
    143. int type = 2;
    144. int count = easNoticeService.getCountByTypeAndEasNotice(type,easNotice);
    145. List list = easNoticeService.getNoticeListByTypeAndEasNotice(type,easNotice,pageUtil);
    146. pageUtil.setTotal(count);
    147. pageUtil.setCount(limit);
    148. int totalPage = pageUtil.getTotalPage();
    149. // System.out.println("总页数为"+totalPage);
    150. map.put("totalPage",totalPage);
    151. map.put("count",count);
    152. map.put("data",list);
    153. map.put("code",0);
    154. map.put("msg","");
    155. }else{
    156. int type = 3;
    157. int count = easNoticeService.getCountByTypeAndEasNotice(type,easNotice);
    158. List list = easNoticeService.getNoticeListByTypeAndEasNotice(type,easNotice,pageUtil);
    159. pageUtil.setTotal(count);
    160. pageUtil.setCount(limit);
    161. int totalPage = pageUtil.getTotalPage();
    162. map.put("totalPage",totalPage);
    163. map.put("count",count);
    164. map.put("data",list);
    165. map.put("code",0);
    166. map.put("msg","");
    167. }
    168. }
    169. return map;
    170. }
    171. //点击查看具体通知
    172. @RequestMapping(value="/lookNotice")
    173. public ModelAndView look(Integer id){
    174. ModelAndView modelAndView = new ModelAndView();
    175. // System.out.println("我是通知id:"+id);
    176. List list = easNoticeService.getNoticeById(id);
    177. modelAndView.addObject("noticeList",list);
    178. modelAndView.setViewName("system/notice/homeNotice");
    179. return modelAndView;
    180. }
    181. }

    如果你也想学习本系统,下面领取。关注并回复:176ssm

  • 相关阅读:
    【Java基础】算术运算符及赋值运算符
    Python-ONNX 相关
    2.26回顾章节主体线索脉络,课程要求(评分)
    Java实验三:面向对象(二)
    SpringBoot+Vue实现前后端分高校学生考勤系统
    为什么电商使用高匿代理ip更有效果?
    迅为RK3568开发板Android12 系统功能测试-有线网测试
    《DevOps实践指南》- 读书笔记(四)
    C++ 泛型编程-模板
    概率论原理精解【1】
  • 原文地址:https://blog.csdn.net/hanyunlong1989/article/details/126412432