diff --git a/WebContent/jsp/AddTbPermission.jsp b/WebContent/jsp/AddTbPermission.jsp
new file mode 100644
index 0000000000000000000000000000000000000000..44028bc74ddccd3d8f32dfeba92951571bd3a0af
--- /dev/null
+++ b/WebContent/jsp/AddTbPermission.jsp
@@ -0,0 +1,124 @@
+<%@ page language="java" contentType="text/html; charset=UTF-8"
+ pageEncoding="UTF-8"%>
+<%@taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
+<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
+
+
+
+
+
+
+ 增加权限
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -
+ 系统管理
+
+ - 权限管理
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/WebContent/jsp/AddTbRole.jsp b/WebContent/jsp/AddTbRole.jsp
new file mode 100644
index 0000000000000000000000000000000000000000..45f509723ca48e2dbb0554cb447fa9fc6972b06f
--- /dev/null
+++ b/WebContent/jsp/AddTbRole.jsp
@@ -0,0 +1,99 @@
+<%@ page language="java" contentType="text/html; charset=UTF-8"
+ pageEncoding="UTF-8"%>
+<%@taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
+<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
+
+
+
+
+
+
+ 增加角色
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -
+ 系统管理
+
+ - 角色管理
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/WebContent/jsp/Header.jsp b/WebContent/jsp/Header.jsp
index 33d0768384ab4cf37043131f874b9163a4458344..d241403495a576cd596285d5bc872875b61f7b61 100644
--- a/WebContent/jsp/Header.jsp
+++ b/WebContent/jsp/Header.jsp
@@ -38,7 +38,15 @@
用户管理
-
+ 角色管理
+ 权限管理
+
+
+
课程管理
diff --git a/WebContent/jsp/QueryTbPermission.jsp b/WebContent/jsp/QueryTbPermission.jsp
new file mode 100644
index 0000000000000000000000000000000000000000..4274eadf7ec12b671b2b1313020dc35b2d0d434d
--- /dev/null
+++ b/WebContent/jsp/QueryTbPermission.jsp
@@ -0,0 +1,102 @@
+<%@ page language="java" contentType="text/html; charset=UTF-8"
+ pageEncoding="UTF-8"%>
+<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
+<%@taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
+
+
+
+
+
+
+ 权限列表
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -
+ 系统管理
+
+ - 权限管理
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ID |
+ 权限名 |
+ 权限类型 |
+ url |
+ percode |
+ pid |
+ pids |
+ sort |
+ available |
+
+
+
+
+
+ ${course.id } |
+ ${course.name } |
+ ${course.type } |
+ ${course.url } |
+ ${course.percode } |
+ ${course.pid } |
+ ${course.pids } |
+ ${course.sort } |
+ ${course.available } |
+
+ 更新
+ 删除
+ |
+
+
+
+
+
+
+
+
+
+
增加权限
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/WebContent/jsp/QueryTbRole.jsp b/WebContent/jsp/QueryTbRole.jsp
new file mode 100644
index 0000000000000000000000000000000000000000..9bd399c5ad7148a0e4e3b3ab73cc13967213f50e
--- /dev/null
+++ b/WebContent/jsp/QueryTbRole.jsp
@@ -0,0 +1,103 @@
+<%@ page language="java" contentType="text/html; charset=UTF-8"
+ pageEncoding="UTF-8"%>
+<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
+<%@taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
+
+
+
+
+
+
+ 角色列表
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -
+ 系统管理
+
+ - 角色管理
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ID |
+ 名字 |
+ 编码 |
+ 评论 |
+ 可用 |
+
+
+
+
+
+ ${course.id } |
+ ${course.name } |
+ ${course.code } |
+ ${course.remark } |
+ ${course.available } |
+ <%-- ${course.academyid } | --%>
+
+ <%--
+
+ ${academy.name } |
+
+ ${user.id} |
+ --%>
+
+
+ 更新
+ 删除
+ |
+
+
+
+
+
+
+
+
+
+
增加角色
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/WebContent/jsp/UpdateTbPermission.jsp b/WebContent/jsp/UpdateTbPermission.jsp
new file mode 100644
index 0000000000000000000000000000000000000000..164ec8eaded2d5b47f69364449936223fea05b0e
--- /dev/null
+++ b/WebContent/jsp/UpdateTbPermission.jsp
@@ -0,0 +1,125 @@
+<%@ page language="java" contentType="text/html; charset=UTF-8"
+ pageEncoding="UTF-8"%>
+<%@taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
+
+
+
+
+
+ 修改用户信息
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -
+ 系统管理
+
+ - 权限管理
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/build/classes/cn/edu/hrbcu/curriculum/controller/CourseController.class b/build/classes/cn/edu/hrbcu/curriculum/controller/CourseController.class
index 633fad6a2f4a8df279254e47edef86c8a8818bd5..69164925a6c205018495d8941dd0435c459025e6 100644
Binary files a/build/classes/cn/edu/hrbcu/curriculum/controller/CourseController.class and b/build/classes/cn/edu/hrbcu/curriculum/controller/CourseController.class differ
diff --git a/src/cn/edu/hrbcu/curriculum/controller/CourseController.java b/src/cn/edu/hrbcu/curriculum/controller/CourseController.java
index 69411c66c76ed9b9ca423daa68ed1a24d938338c..5c20c9460d71b9d0b5f1f959d893fa7b6238bfd3 100644
--- a/src/cn/edu/hrbcu/curriculum/controller/CourseController.java
+++ b/src/cn/edu/hrbcu/curriculum/controller/CourseController.java
@@ -106,7 +106,6 @@ public class CourseController {
List examinationmethods = examinationmethodService.selectAllExaminationmethod();
ModelAndView modelAndView = new ModelAndView();
modelAndView.setViewName("/jsp/AddCourse");
- System.out.println(academies.size());
modelAndView.addObject("academies", academies);
modelAndView.addObject("coursemodes", coursemodes);
modelAndView.addObject("coursetypes", coursetypes);
diff --git a/src/cn/edu/hrbcu/curriculum/controller/TbPermissionController.java b/src/cn/edu/hrbcu/curriculum/controller/TbPermissionController.java
new file mode 100644
index 0000000000000000000000000000000000000000..5a06dfb35d1f37b4cb3ed44ffb6a6431012c71db
--- /dev/null
+++ b/src/cn/edu/hrbcu/curriculum/controller/TbPermissionController.java
@@ -0,0 +1,96 @@
+package cn.edu.hrbcu.curriculum.controller;
+
+import java.util.List;
+
+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.servlet.ModelAndView;
+
+import com.github.pagehelper.PageInfo;
+import cn.edu.hrbcu.curriculum.pojo.TbPermission;
+import cn.edu.hrbcu.curriculum.pojo.TbRole;
+import cn.edu.hrbcu.curriculum.service.TbPermissionService;
+
+@Controller
+@RequestMapping("/TbPermissionController")
+public class TbPermissionController {
+
+ @Autowired
+ TbPermissionService tbPermissionService;
+
+ @RequestMapping("/QueryTbPermission.action")
+ public ModelAndView QueryTbPermission(@RequestParam(value = "currentPage",required=false, defaultValue="1") Integer currentPage){
+ List list = tbPermissionService.selectTbPermissions(currentPage);
+
+ PageInfo page = new PageInfo(list);
+
+ ModelAndView modelAndView = new ModelAndView();
+ modelAndView.setViewName("/jsp/QueryTbPermission");
+ modelAndView.addObject("pageInfo", page);
+ modelAndView.addObject("page_url", "/CurriculumSystemManager/TbPermissionController/QueryTbPermission.action");
+
+ return modelAndView;
+ }
+
+ @RequestMapping("/QueryAllTbPermission.action")
+ @ResponseBody
+ public Object QueryAllTbPermission(){
+ List list = tbPermissionService.selectAllPermission();
+ return list;
+ }
+
+
+ @RequestMapping("/QueryTbPermissionById.action")
+ @ResponseBody
+ public Object QueryTbPermissionById(@RequestParam(value = "id",required=true, defaultValue="1") Long id){
+ TbPermission tbPermission_ = new TbPermission();
+ tbPermission_.setId(id);
+
+ TbPermission tbPermission = tbPermissionService.selectTbPermissionById(tbPermission_);
+ return tbPermission;
+ }
+
+ @RequestMapping("/AddTbPermission.action")
+ public Object AddTbPermission(TbPermission tbPermission){
+
+ tbPermissionService.insertPermission(tbPermission);
+
+ return "forward:/TbPermissionController/QueryTbPermission.action";
+ }
+
+ @RequestMapping("/DeleteTbPermission.action")
+ public Object DeleteTbPermission(TbPermission tbPermission){
+
+ tbPermissionService.deletTbPermission(tbPermission);
+
+ return "forward:/TbPermissionController/QueryTbPermission.action";
+ }
+
+
+ @RequestMapping("/UpdateTbPermission.action")
+ public Object UpdateTbRole(TbPermission tbPermission){
+ int cnt = tbPermissionService.updateTbPermission(tbPermission);
+
+ return "forward:/TbPermissionController/QueryTbPermission.action";
+ }
+
+ @RequestMapping("/toUpdateTbPermission.action")
+ public Object toUpdateTbPermission(TbPermission tbPermission){
+ tbPermission = tbPermissionService.selectTbPermissionById(tbPermission);
+ ModelAndView modelAndView = new ModelAndView();
+ modelAndView.setViewName("/jsp/UpdateTbPermission");
+ modelAndView.addObject("tbPermission", tbPermission);
+ return modelAndView;
+ }
+
+ @RequestMapping("/toAddTbPermission.action")
+ public Object toAddTbPermission(){
+ ModelAndView modelAndView = new ModelAndView();
+ modelAndView.setViewName("/jsp/AddTbPermission");
+ return modelAndView;
+ }
+
+}
diff --git a/src/cn/edu/hrbcu/curriculum/controller/TbRoleController.java b/src/cn/edu/hrbcu/curriculum/controller/TbRoleController.java
new file mode 100644
index 0000000000000000000000000000000000000000..889bedc739b59cdc572affe27e634c8923d09a5c
--- /dev/null
+++ b/src/cn/edu/hrbcu/curriculum/controller/TbRoleController.java
@@ -0,0 +1,93 @@
+package cn.edu.hrbcu.curriculum.controller;
+
+import java.util.List;
+
+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.servlet.ModelAndView;
+import com.github.pagehelper.PageInfo;
+import cn.edu.hrbcu.curriculum.pojo.TbRole;
+import cn.edu.hrbcu.curriculum.service.TbRoleService;
+
+@Controller
+@RequestMapping("/TbRoleController")
+public class TbRoleController {
+ @Autowired
+ TbRoleService tbRoleService;
+
+ @RequestMapping("/QueryTbRole.action")
+ public ModelAndView QueryTbRole(@RequestParam(value = "currentPage",required=false, defaultValue="1") Integer currentPage){
+ List list = tbRoleService.selectTbRoles(currentPage);
+
+ PageInfo page = new PageInfo(list);
+
+ ModelAndView modelAndView = new ModelAndView();
+ modelAndView.setViewName("/jsp/QueryTbRole");
+ modelAndView.addObject("pageInfo", page);
+ modelAndView.addObject("page_url", "/CurriculumSystemManager/TbRoleController/QueryCourse.action");
+
+ return modelAndView;
+ }
+
+ @RequestMapping("/QueryAllTbRole.action")
+ @ResponseBody
+ public Object QueryAllTbRole(){
+ List list = tbRoleService.selectAllRole();
+ return list;
+ }
+
+
+ @RequestMapping("/QueryTbRoleById.action")
+ @ResponseBody
+ public Object QueryTbRoleById(@RequestParam(value = "id",required=true, defaultValue="1") Long id){
+ TbRole tbRole_ = new TbRole();
+ tbRole_.setId(id);
+
+ TbRole course = tbRoleService.selectTbRoleById(tbRole_);
+ return course;
+ }
+
+ @RequestMapping("/AddTbRole.action")
+ public Object AddTbRole(TbRole tbRole){
+
+ tbRoleService.insertRole(tbRole);
+
+ return "forward:/TbRoleController/QueryTbRole.action";
+ }
+
+ @RequestMapping("/DeleteTbRole.action")
+ public Object DeleteCourse(TbRole tbRole){
+
+ tbRoleService.deletTbRole(tbRole);
+
+ return "forward:/TbRoleController/QueryTbRole.action";
+ }
+
+ @RequestMapping("/UpdateTbRole.action")
+ public Object UpdateTbRole(TbRole tbRole){
+ int cnt = tbRoleService.updateTbRole(tbRole);
+
+ return "forward:/TbRoleController/QueryTbRole.action";
+ }
+
+ @RequestMapping("/toUpdateTbRole.action")
+ public Object toUpdateTbRole(TbRole tbRole){
+ tbRole = tbRoleService.selectTbRoleById(tbRole);
+ ModelAndView modelAndView = new ModelAndView();
+ modelAndView.setViewName("/jsp/UpdateTbRole");
+ modelAndView.addObject("tbRole", tbRole);
+ return modelAndView;
+ }
+
+ @RequestMapping("/toAddTbRole.action")
+ public Object toAddTbRole(){
+ ModelAndView modelAndView = new ModelAndView();
+ modelAndView.setViewName("/jsp/AddTbRole");
+ return modelAndView;
+ }
+
+
+}