├── README.md ├── gss.png ├── gss.sql ├── pom.xml ├── src └── main │ ├── java │ └── com │ │ └── imu │ │ ├── constant │ │ └── Constant.java │ │ ├── controller │ │ ├── AdminController.java │ │ ├── FileController.java │ │ ├── MessageController.java │ │ ├── PathController.java │ │ ├── SecretaryController.java │ │ ├── StudentController.java │ │ ├── TeacherController.java │ │ ├── TopicController.java │ │ ├── TopicMapController.java │ │ ├── UploadController.java │ │ └── UserController.java │ │ ├── dao │ │ ├── AdminDAO.java │ │ ├── FileDAO.java │ │ ├── MessageDAO.java │ │ ├── StudentDAO.java │ │ ├── TeacherDAO.java │ │ ├── TopicDAO.java │ │ └── TopicMapDAO.java │ │ ├── dto │ │ └── Result.java │ │ ├── entity │ │ ├── Admin.java │ │ ├── File.java │ │ ├── Message.java │ │ ├── Page.java │ │ ├── Student.java │ │ ├── Teacher.java │ │ ├── Topic.java │ │ ├── TopicMap.java │ │ └── User.java │ │ ├── enums │ │ ├── StatusEnum.java │ │ └── UserTypeEnum.java │ │ ├── interceptor │ │ └── LoginInterceptor.java │ │ ├── mapper │ │ ├── AdminMapper.xml │ │ ├── FileMapper.xml │ │ ├── MessageMapper.xml │ │ ├── StudentMapper.xml │ │ ├── TeacherMapper.xml │ │ ├── TopicMapMapper.xml │ │ └── TopicMapper.xml │ │ ├── param │ │ └── MessageParam.java │ │ ├── service │ │ ├── AdminService.java │ │ ├── FileService.java │ │ ├── MessageService.java │ │ ├── StudentService.java │ │ ├── TeacherService.java │ │ ├── TopicMapService.java │ │ ├── TopicService.java │ │ ├── UserService.java │ │ └── impl │ │ │ ├── AdminServiceImpl.java │ │ │ ├── FileServiceImpl.java │ │ │ ├── MessageServiceImpl.java │ │ │ ├── StudentServiceImpl.java │ │ │ ├── TeacherServiceImpl.java │ │ │ ├── TopicMapServiceImpl.java │ │ │ ├── TopicServiceImpl.java │ │ │ └── UserServiceImpl.java │ │ └── util │ │ ├── MD5Util.java │ │ ├── PageUtil.java │ │ └── TimeUtil.java │ ├── resources │ ├── jdbc.properties │ ├── log4j.properties │ ├── spring-mvc.xml │ └── spring-mybatis.xml │ └── webapp │ ├── 404.jsp │ ├── 405.jsp │ ├── WEB-INF │ └── web.xml │ ├── assets │ ├── css │ │ ├── bootstrap.css │ │ ├── bootstrap.min.css │ │ ├── btu.css │ │ ├── demo.css │ │ ├── demo.css.map │ │ ├── main.css │ │ └── main.css.map │ ├── img │ │ ├── apple-icon.png │ │ ├── favicon.png │ │ ├── login-bg.jpg │ │ ├── logo-dark.png │ │ ├── profile-bg.png │ │ ├── user-medium.png │ │ ├── user.png │ │ ├── user1.png │ │ ├── user2.png │ │ ├── user3.png │ │ ├── user4.png │ │ └── user5.png │ ├── layer │ │ ├── layer.js │ │ ├── mobile │ │ │ ├── layer.js │ │ │ └── need │ │ │ │ └── layer.css │ │ └── theme │ │ │ └── default │ │ │ ├── icon-ext.png │ │ │ ├── icon.png │ │ │ ├── layer.css │ │ │ ├── loading-0.gif │ │ │ ├── loading-1.gif │ │ │ └── loading-2.gif │ ├── scripts │ │ ├── gss.js │ │ ├── jquery-3.2.1.min.js │ │ └── klorofil-common.js │ └── vendor │ │ ├── bootstrap │ │ ├── css │ │ │ ├── bootstrap-theme.css │ │ │ ├── bootstrap-theme.min.css │ │ │ ├── bootstrap.css │ │ │ └── bootstrap.min.css │ │ ├── fonts │ │ │ ├── glyphicons-halflings-regular.eot │ │ │ ├── glyphicons-halflings-regular.svg │ │ │ ├── glyphicons-halflings-regular.ttf │ │ │ ├── glyphicons-halflings-regular.woff │ │ │ └── glyphicons-halflings-regular.woff2 │ │ └── js │ │ │ ├── bootstrap.js │ │ │ ├── bootstrap.min.js │ │ │ └── npm.js │ │ ├── chartist │ │ ├── css │ │ │ ├── chartist-custom.css │ │ │ ├── chartist-custom.css.map │ │ │ ├── chartist.css │ │ │ └── chartist.min.css │ │ ├── js │ │ │ ├── chartist.js │ │ │ └── chartist.min.js │ │ ├── map │ │ │ ├── chartist.css.map │ │ │ └── chartist.min.js.map │ │ └── scss │ │ │ └── chartist.scss │ │ ├── font-awesome │ │ ├── css │ │ │ ├── font-awesome.css │ │ │ └── font-awesome.min.css │ │ └── fonts │ │ │ ├── FontAwesome.otf │ │ │ ├── fontawesome-webfont.eot │ │ │ ├── fontawesome-webfont.svg │ │ │ ├── fontawesome-webfont.ttf │ │ │ ├── fontawesome-webfont.woff │ │ │ └── fontawesome-webfont.woff2 │ │ ├── jquery-slimscroll │ │ ├── jquery.slimscroll.js │ │ └── jquery.slimscroll.min.js │ │ ├── jquery.easy-pie-chart │ │ ├── angular.easypiechart.js │ │ ├── angular.easypiechart.min.js │ │ ├── easypiechart.js │ │ ├── easypiechart.min.js │ │ ├── jquery.easypiechart.js │ │ └── jquery.easypiechart.min.js │ │ ├── jquery │ │ ├── jquery.js │ │ ├── jquery.min.js │ │ └── jquery.min.map │ │ ├── linearicons │ │ ├── fonts │ │ │ ├── Linearicons-Free.eot │ │ │ ├── Linearicons-Free.svg │ │ │ ├── Linearicons-Free.ttf │ │ │ ├── Linearicons-Free.woff │ │ │ └── Linearicons-Free.woff2 │ │ └── style.css │ │ └── toastr │ │ ├── toastr.css │ │ ├── toastr.js │ │ ├── toastr.min.css │ │ └── toastr.min.js │ ├── jsp │ ├── admin │ │ └── modpwd.jsp │ ├── index.jsp │ ├── management │ │ ├── admin │ │ │ ├── add.jsp │ │ │ └── scan.jsp │ │ ├── student │ │ │ ├── add.jsp │ │ │ ├── edit.jsp │ │ │ └── scan.jsp │ │ └── teacher │ │ │ ├── add.jsp │ │ │ ├── edit.jsp │ │ │ └── scan.jsp │ ├── public │ │ ├── info │ │ │ ├── stuinfo.jsp │ │ │ └── teainfo.jsp │ │ └── topic │ │ │ ├── scan.jsp │ │ │ ├── studetail.jsp │ │ │ └── teadetail.jsp │ ├── secretary │ │ └── mytopic.jsp │ ├── student │ │ ├── info.jsp │ │ ├── modpwd.jsp │ │ ├── mytopic.jsp │ │ └── scan.jsp │ └── teacher │ │ ├── info.jsp │ │ ├── modpwd.jsp │ │ ├── mytopic.jsp │ │ ├── publish.jsp │ │ └── topicList.jsp │ ├── login.jsp │ └── sessiontimeout.jsp └── 数据库表结构.xlsx /README.md: -------------------------------------------------------------------------------- 1 | # 一个学生毕设选题系统 2 | 3 | ### 框架 4 | 5 | SSM 6 | 7 | ### 主要功能 8 | 9 | ##### 1) 用户管理: 10 | 11 | 1. 分为:3个群体:老师(开题老师、答辩秘书)、管理员、学生。 12 | 2. 管理员:管理学生、教师。 13 | 3. 老师:增加题目,修改题目,录取学生。 14 | 4. 学生:选择题目、查看结果等。 15 | ###### 2) 选题管理: 16 | 17 | 教师: 18 | 19 | 1. 教师能够对选题进行发布。 20 | 2. 教师对报名学生信息进行查看、选择录取,查看报名人数,删除学生。 21 | 3. 教师浏览选题,对学生上传开题报告进行查看,填写指导意见(发回学生)。 22 | 4. 教师对学生上传的毕业论文进行查看,填写指导意见(发回学生)。 23 | 5. 教师对学生的答辩的情况进行信息填写。 24 | 6. 答辩秘书对答辩记录单的填写和提交 25 | 26 | 学生: 27 | 28 | 1. 学生对本人信息进行上传(姓名、学院、专业、联系方式) 29 | 2. 学生预选自己感兴趣的选题 30 | 3. 学生选题的退选、改选和确定。 31 | 4. 学生论文开题报告的提交,查看结果 32 | 5. 学生毕业设计的提交,查看结果 33 | 34 | ### 登录 35 | ![](https://github.com/songyaxu/gss/blob/master/gss.png) 36 | -------------------------------------------------------------------------------- /gss.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/songyaxu/gss/c0cf44128564097e61041dbe2825ece3e2db7071/gss.png -------------------------------------------------------------------------------- /pom.xml: -------------------------------------------------------------------------------- 1 | 3 | 4.0.0 4 | com.imu 5 | gss 6 | war 7 | 0.0.1-SNAPSHOT 8 | gss Maven Webapp 9 | http://maven.apache.org 10 | 11 | 12 | [4.3.17,) 13 | 3.2.8 14 | 1.7.12 15 | 1.2.17 16 | 3.1.0 17 | 7.0 18 | 19 | 20 | 21 | 22 | 23 | junit 24 | junit 25 | 4.11 26 | 27 | test 28 | 29 | 30 | 31 | javax 32 | javaee-api 33 | 7.0 34 | 35 | 36 | 37 | org.springframework 38 | spring-test 39 | ${srping.version} 40 | 41 | 42 | org.springframework 43 | spring-core 44 | ${srping.version} 45 | 46 | 47 | org.springframework 48 | spring-oxm 49 | ${srping.version} 50 | 51 | 52 | org.springframework 53 | spring-tx 54 | ${srping.version} 55 | 56 | 57 | org.springframework 58 | spring-jdbc 59 | ${srping.version} 60 | 61 | 62 | org.springframework 63 | spring-aop 64 | ${srping.version} 65 | 66 | 67 | org.springframework 68 | spring-context 69 | ${srping.version} 70 | 71 | 72 | org.springframework 73 | spring-context-support 74 | ${srping.version} 75 | 76 | 77 | org.springframework 78 | spring-expression 79 | ${srping.version} 80 | 81 | 82 | org.springframework 83 | spring-orm 84 | ${srping.version} 85 | 86 | 87 | org.springframework 88 | spring-web 89 | ${srping.version} 90 | 91 | 92 | org.springframework 93 | spring-webmvc 94 | ${srping.version} 95 | 96 | 97 | 98 | 99 | org.mybatis 100 | mybatis 101 | ${mybatis.version} 102 | 103 | 104 | org.mybatis 105 | mybatis-spring 106 | 1.2.2 107 | 108 | 109 | 110 | 111 | mysql 112 | mysql-connector-java 113 | 5.1.35 114 | 115 | 116 | 117 | commons-dbcp 118 | commons-dbcp 119 | 1.4 120 | 121 | 122 | 123 | jstl 124 | jstl 125 | 1.2 126 | 127 | 128 | 129 | log4j 130 | log4j 131 | ${log4j.version} 132 | 133 | 134 | org.slf4j 135 | slf4j-api 136 | ${slf4j.version} 137 | 138 | 139 | org.slf4j 140 | slf4j-log4j12 141 | ${slf4j.version} 142 | 143 | 144 | 145 | 146 | 147 | com.alibaba 148 | fastjson 149 | [1.2.31,) 150 | 151 | 152 | org.codehaus.jackson 153 | jackson-mapper-asl 154 | 1.9.13 155 | 156 | 157 | 158 | commons-fileupload 159 | commons-fileupload 160 | 1.3.1 161 | 162 | 163 | commons-io 164 | commons-io 165 | 2.4 166 | 167 | 168 | commons-codec 169 | commons-codec 170 | 1.10 171 | 172 | 173 | javax.servlet 174 | javax.servlet-api 175 | ${servlet-api.version} 176 | 177 | 178 | 179 | 180 | gss 181 | 182 | 183 | org.apache.maven.plugins 184 | maven-compiler-plugin 185 | 3.0 186 | 187 | 1.8 188 | 1.8 189 | 190 | 191 | 192 | 193 | 194 | -------------------------------------------------------------------------------- /src/main/java/com/imu/constant/Constant.java: -------------------------------------------------------------------------------- 1 | package com.imu.constant; 2 | 3 | public class Constant { 4 | 5 | public final static int PAGE_SIZE=10; 6 | public final static String FILE_LOCATION="/webapp/file"; 7 | } 8 | -------------------------------------------------------------------------------- /src/main/java/com/imu/controller/AdminController.java: -------------------------------------------------------------------------------- 1 | package com.imu.controller; 2 | 3 | import java.util.List; 4 | 5 | import javax.annotation.Resource; 6 | import javax.servlet.http.HttpSession; 7 | 8 | import org.springframework.stereotype.Controller; 9 | import org.springframework.web.bind.annotation.PathVariable; 10 | import org.springframework.web.bind.annotation.RequestMapping; 11 | import org.springframework.web.bind.annotation.ResponseBody; 12 | 13 | import com.imu.constant.Constant; 14 | import com.imu.dto.Result; 15 | import com.imu.entity.Admin; 16 | import com.imu.entity.Page; 17 | import com.imu.entity.Student; 18 | import com.imu.service.AdminService; 19 | import com.imu.util.MD5Util; 20 | import com.imu.util.PageUtil; 21 | 22 | @Controller 23 | @RequestMapping("admin") 24 | public class AdminController { 25 | 26 | @Resource 27 | private AdminService adminService; 28 | 29 | @ResponseBody 30 | @RequestMapping("add") 31 | public Result add(Admin admin) { 32 | if(admin.getPassword()==null||"".equals(admin.getPassword())) 33 | admin.setPassword(MD5Util.md5(admin.getId())); 34 | else 35 | admin.setPassword(MD5Util.md5(admin.getPassword())); 36 | int res=adminService.add(admin); 37 | Result result = new Result(); 38 | result.setMessage("添加失败"); 39 | result.setStatusCode("0"); 40 | if(res==1){ 41 | result.setMessage("添加成功"); 42 | result.setStatusCode("1"); 43 | } 44 | return result; 45 | } 46 | 47 | @RequestMapping("scan") 48 | public String scan(HttpSession session) { 49 | String key=""; 50 | Integer total =0; 51 | total=adminService.getByKeyCount(key); 52 | Page page = new Page(); 53 | page=PageUtil.createPage(Constant.PAGE_SIZE, total, 0); 54 | total=adminService.getByKeyCount(key); 55 | List adminList=adminService.getByKey(key,page); 56 | session.setAttribute("adminKey", ""); 57 | session.setAttribute("adminList", adminList); 58 | session.setAttribute("adminPage", page); 59 | return "management/admin/scan"; 60 | } 61 | 62 | @RequestMapping("scan/page/{pageNo}") 63 | public String scan(HttpSession session,@PathVariable(value="pageNo") int pageNo,String key) { 64 | Integer total =0; 65 | if(null == key ) 66 | key = (String) session.getAttribute("adminKey"); 67 | total=adminService.getByKeyCount(key); 68 | Page page = new Page(); 69 | page=PageUtil.createPage(Constant.PAGE_SIZE, total, pageNo); 70 | total=adminService.getByKeyCount(key); 71 | List adminList=adminService.getByKey(key,page); 72 | session.setAttribute("adminKey", ""); 73 | session.setAttribute("adminList", adminList); 74 | session.setAttribute("adminPage", page); 75 | return "management/admin/scan"; 76 | } 77 | } -------------------------------------------------------------------------------- /src/main/java/com/imu/controller/FileController.java: -------------------------------------------------------------------------------- 1 | package com.imu.controller; 2 | 3 | import java.io.File; 4 | import java.io.IOException; 5 | 6 | import javax.annotation.Resource; 7 | 8 | import org.apache.commons.io.FileUtils; 9 | import org.springframework.http.HttpHeaders; 10 | import org.springframework.http.HttpStatus; 11 | import org.springframework.http.MediaType; 12 | import org.springframework.http.ResponseEntity; 13 | import org.springframework.stereotype.Controller; 14 | import org.springframework.web.bind.annotation.PathVariable; 15 | import org.springframework.web.bind.annotation.RequestMapping; 16 | import org.springframework.web.bind.annotation.ResponseBody; 17 | 18 | import com.imu.dto.Result; 19 | import com.imu.service.FileService; 20 | 21 | @Controller 22 | @RequestMapping("file") 23 | public class FileController { 24 | 25 | @Resource 26 | private FileService fileService; 27 | 28 | @RequestMapping("download/{id}") 29 | public ResponseEntity download(@PathVariable(value="id") int id) throws IOException { 30 | com.imu.entity.File f1 = fileService.getFileById(id); 31 | File file=new File(f1.getLocation()); 32 | if(file.exists()) { 33 | HttpHeaders headers = new HttpHeaders(); 34 | String fileName=new String(f1.getFileName().getBytes("UTF-8"),"iso-8859-1");//为了解决中文名称乱码问题 35 | headers.setContentDispositionFormData("attachment", fileName); 36 | headers.setContentType(MediaType.APPLICATION_OCTET_STREAM); 37 | return new ResponseEntity(FileUtils.readFileToByteArray(file), 38 | headers, HttpStatus.CREATED); 39 | } 40 | return null; 41 | } 42 | 43 | @ResponseBody 44 | @RequestMapping("check/{id}") 45 | public Result checkFile(@PathVariable(value="id") int id) { 46 | Result res= new Result(); 47 | res.setMessage("找不到相应对象"); 48 | res.setStatusCode("0"); 49 | com.imu.entity.File f1 = fileService.getFileById(id); 50 | if(f1==null) { 51 | return res; 52 | } 53 | else { 54 | File file=new File(f1.getLocation()); 55 | if(file.exists()) { 56 | res.setStatusCode("1"); 57 | res.setMessage("文件存在"); 58 | }else { 59 | res.setStatusCode("0"); 60 | res.setMessage("文件不存在"); 61 | } 62 | } 63 | return res; 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /src/main/java/com/imu/controller/MessageController.java: -------------------------------------------------------------------------------- 1 | package com.imu.controller; 2 | 3 | import javax.annotation.Resource; 4 | import javax.servlet.http.HttpSession; 5 | 6 | import org.springframework.stereotype.Controller; 7 | import org.springframework.web.bind.annotation.RequestMapping; 8 | import org.springframework.web.bind.annotation.ResponseBody; 9 | 10 | import com.imu.dto.Result; 11 | import com.imu.entity.Message; 12 | import com.imu.entity.Topic; 13 | import com.imu.entity.User; 14 | import com.imu.service.MessageService; 15 | import com.imu.service.TopicService; 16 | import com.imu.util.TimeUtil; 17 | 18 | @Controller 19 | @RequestMapping("message") 20 | public class MessageController { 21 | 22 | @Resource 23 | private MessageService messageService; 24 | 25 | @Resource 26 | private TopicService topicService; 27 | 28 | @RequestMapping("send") 29 | @ResponseBody 30 | public Result send(Message message,HttpSession session) { 31 | User user = (User) session.getAttribute("user"); 32 | Result res = new Result(); 33 | Topic topic = topicService.get(message.getTopicId()); 34 | if(topic.getStatus()==1) 35 | message.setStage(1); 36 | else 37 | message.setStage(topic.getStatus()-1); 38 | res.setStatusCode("0"); 39 | res.setMessage("未知错误,发送失败"); 40 | if(user == null) 41 | return res; 42 | message.setTime(TimeUtil.currentTime()); 43 | message.setSendId(user.getId()); 44 | int r=messageService.add(message); 45 | if(r>=1) 46 | { 47 | res.setMessage("发送成功"); 48 | res.setStatusCode("1"); 49 | } 50 | return res; 51 | } 52 | 53 | } 54 | -------------------------------------------------------------------------------- /src/main/java/com/imu/controller/PathController.java: -------------------------------------------------------------------------------- 1 | package com.imu.controller; 2 | 3 | import javax.annotation.Resource; 4 | import javax.servlet.http.HttpServletRequest; 5 | import javax.servlet.http.HttpSession; 6 | 7 | import org.springframework.stereotype.Controller; 8 | import org.springframework.web.bind.annotation.PathVariable; 9 | import org.springframework.web.bind.annotation.RequestMapping; 10 | 11 | import com.imu.entity.Student; 12 | import com.imu.entity.Teacher; 13 | import com.imu.entity.User; 14 | import com.imu.enums.UserTypeEnum; 15 | import com.imu.service.StudentService; 16 | import com.imu.service.TeacherService; 17 | 18 | @Controller 19 | public class PathController { 20 | 21 | @Resource 22 | private TeacherService teacherService; 23 | 24 | @Resource 25 | private StudentService studentService; 26 | /** 27 | * 管理员使用Path 28 | */ 29 | 30 | @RequestMapping("/manage/student/add") 31 | public String stuAdd(HttpSession session) { 32 | return "/management/student/add"; 33 | } 34 | 35 | @RequestMapping("/manage/teacher/add") 36 | public String teaAdd(HttpSession session) { 37 | return "/management/teacher/add"; 38 | } 39 | 40 | @RequestMapping("/manage/admin/add") 41 | public String adminAdd(HttpSession session) { 42 | return "/management/admin/add"; 43 | } 44 | 45 | @RequestMapping("/admin/modPwd") 46 | public String modifyPwd(HttpSession session){ 47 | return "/admin/modpwd"; 48 | } 49 | 50 | @RequestMapping("/manage/student/{id}") 51 | public String editStu(HttpServletRequest request,@PathVariable(value="id") String id) { 52 | Student student=studentService.getStuInfoById(id); 53 | request.setAttribute("student", student); 54 | return "/management/student/edit"; 55 | } 56 | 57 | @RequestMapping("/manage/teacher/{id}") 58 | public String editTea(HttpServletRequest request,@PathVariable(value="id") String id) { 59 | Teacher teacher=teacherService.getTeacherById(id); 60 | request.setAttribute("teacher", teacher); 61 | return "/management/teacher/edit"; 62 | } 63 | /** 64 | * 教师使用Path 65 | */ 66 | @RequestMapping("/teacher/publish") 67 | public String publish(HttpSession session) { 68 | return "/teacher/publish"; 69 | } 70 | 71 | /** 72 | * 通用path 73 | * @param session 74 | * @return 75 | */ 76 | @RequestMapping("/user/info") 77 | public String userInfo(HttpSession session,HttpServletRequest request) { 78 | User user=(User) session.getAttribute("user"); 79 | if(user==null) 80 | return "405"; 81 | if(user.getType()==UserTypeEnum.SECRETARY.getCode() || user.getType()==UserTypeEnum.TEACHER.getCode()) { 82 | Teacher teacher=teacherService.getTeacherById(user.getId()); 83 | request.setAttribute("teacher", teacher); 84 | return "/teacher/info"; 85 | } 86 | if(user.getType()==UserTypeEnum.STUDENT.getCode()) { 87 | Student student=studentService.getStuInfoById(user.getId()); 88 | request.setAttribute("student", student); 89 | return "/student/info"; 90 | } 91 | else 92 | return "404"; 93 | } 94 | 95 | @RequestMapping("/user/modPwd") 96 | public String userModifyPwd(HttpSession session){ 97 | User user=(User) session.getAttribute("user"); 98 | if(user==null) 99 | return "405"; 100 | if(user.getType()==UserTypeEnum.SECRETARY.getCode() || user.getType()==UserTypeEnum.TEACHER.getCode()) { 101 | return "/teacher/modpwd"; 102 | } 103 | if(user.getType()==UserTypeEnum.STUDENT.getCode()) { 104 | return "/student/modpwd"; 105 | } 106 | if(user.getType()==UserTypeEnum.ADMIN.getCode()) { 107 | return "/admin/modpwd"; 108 | } 109 | else 110 | return "404"; 111 | } 112 | 113 | @RequestMapping("teacher/topicList") 114 | public String teacherTopicList() { 115 | return "/teacher/topicList"; 116 | } 117 | 118 | } 119 | -------------------------------------------------------------------------------- /src/main/java/com/imu/controller/SecretaryController.java: -------------------------------------------------------------------------------- 1 | package com.imu.controller; 2 | 3 | import java.util.List; 4 | 5 | import javax.annotation.Resource; 6 | import javax.servlet.http.HttpSession; 7 | 8 | import org.springframework.stereotype.Controller; 9 | import org.springframework.web.bind.annotation.PathVariable; 10 | import org.springframework.web.bind.annotation.RequestMapping; 11 | 12 | import com.imu.constant.Constant; 13 | import com.imu.entity.Page; 14 | import com.imu.entity.Topic; 15 | import com.imu.entity.User; 16 | import com.imu.service.StudentService; 17 | import com.imu.service.TeacherService; 18 | import com.imu.service.TopicService; 19 | import com.imu.util.PageUtil; 20 | 21 | @RequestMapping("secretary") 22 | @Controller 23 | public class SecretaryController { 24 | 25 | @Resource 26 | private TeacherService teacherService; 27 | 28 | @Resource 29 | private StudentService studentService; 30 | 31 | @Resource 32 | private TopicService topicService; 33 | 34 | @RequestMapping("mytopic/page/{pageNo}") 35 | public String scan(HttpSession session,@PathVariable(value="pageNo") int pageNo) { 36 | Integer total =0; 37 | User user=(User)session.getAttribute("user"); 38 | total=topicService.getSecretaryCount(user.getId()); 39 | Page page = new Page(); 40 | page=PageUtil.createPage(Constant.PAGE_SIZE, total, pageNo); 41 | List topList=topicService.getSecretaryTopic(user.getId(), page); 42 | for (Topic topic : topList) { 43 | topic.setTeacherName(teacherService.getTeacherById(topic.getTeacherId()).getName()); 44 | topic.setStudentName(studentService.getStuInfoById(topic.getStudentId()).getName()); 45 | } 46 | session.setAttribute("secTopList", topList); 47 | session.setAttribute("secTopPage", page); 48 | return "secretary/mytopic"; 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /src/main/java/com/imu/controller/StudentController.java: -------------------------------------------------------------------------------- 1 | package com.imu.controller; 2 | 3 | 4 | import java.util.List; 5 | 6 | import javax.annotation.Resource; 7 | import javax.servlet.http.HttpSession; 8 | 9 | import org.springframework.stereotype.Controller; 10 | import org.springframework.web.bind.annotation.PathVariable; 11 | import org.springframework.web.bind.annotation.RequestMapping; 12 | import org.springframework.web.bind.annotation.ResponseBody; 13 | 14 | import com.imu.constant.Constant; 15 | import com.imu.dto.Result; 16 | import com.imu.entity.Page; 17 | import com.imu.entity.Student; 18 | import com.imu.service.StudentService; 19 | import com.imu.util.MD5Util; 20 | import com.imu.util.PageUtil; 21 | 22 | @Controller 23 | @RequestMapping("student") 24 | public class StudentController { 25 | 26 | @Resource 27 | private StudentService studentService; 28 | 29 | 30 | @ResponseBody 31 | @RequestMapping("add") 32 | public Result add(Student student) { 33 | if(student.getPassword()==null||"".equals(student.getPassword())) 34 | student.setPassword(MD5Util.md5(student.getId())); 35 | else 36 | student.setPassword(MD5Util.md5(student.getPassword())); 37 | int res=studentService.add(student); 38 | Result result = new Result(); 39 | result.setMessage("添加失败"); 40 | result.setStatusCode("0"); 41 | if(res==1){ 42 | result.setMessage("添加成功"); 43 | result.setStatusCode("1"); 44 | } 45 | return result; 46 | } 47 | 48 | 49 | @RequestMapping("scan") 50 | public String scan(HttpSession session) { 51 | String key=""; 52 | Integer total =0; 53 | total=studentService.getByKeyCount(key); 54 | Page page = new Page(); 55 | page=PageUtil.createPage(Constant.PAGE_SIZE, total, 0); 56 | total=studentService.getByKeyCount(key); 57 | List stuList=studentService.getByKey(key,page); 58 | session.setAttribute("stuKey", ""); 59 | session.setAttribute("stuList", stuList); 60 | session.setAttribute("stuPage", page); 61 | return "management/student/scan"; 62 | } 63 | 64 | @RequestMapping("scan/page/{pageNo}") 65 | public String scan(HttpSession session,@PathVariable(value="pageNo") int pageNo,String key) { 66 | Integer total =0; 67 | if(key==null||"".equals(key)) 68 | key = (String) session.getAttribute("stuKey"); 69 | total=studentService.getByKeyCount(key); 70 | Page page = new Page(); 71 | page=PageUtil.createPage(Constant.PAGE_SIZE, total, pageNo); 72 | total=studentService.getByKeyCount(key); 73 | List stuList=studentService.getByKey(key,page); 74 | session.setAttribute("stuKey", ""); 75 | session.setAttribute("stuList", stuList); 76 | session.setAttribute("stuPage", page); 77 | return "management/student/scan"; 78 | } 79 | 80 | @ResponseBody 81 | @RequestMapping("update") 82 | public Result update(Student student) { 83 | Result result = new Result(); 84 | result.setMessage("更新失败"); 85 | result.setStatusCode("0"); 86 | int res=studentService.update(student); 87 | if(res!=0) 88 | { 89 | result.setMessage("更新成功"); 90 | result.setStatusCode("1"); 91 | } 92 | return result; 93 | } 94 | 95 | 96 | } -------------------------------------------------------------------------------- /src/main/java/com/imu/controller/TeacherController.java: -------------------------------------------------------------------------------- 1 | package com.imu.controller; 2 | 3 | import java.util.List; 4 | 5 | import javax.annotation.Resource; 6 | import javax.servlet.http.HttpSession; 7 | 8 | import org.springframework.stereotype.Controller; 9 | import org.springframework.web.bind.annotation.PathVariable; 10 | import org.springframework.web.bind.annotation.RequestMapping; 11 | import org.springframework.web.bind.annotation.ResponseBody; 12 | 13 | import com.imu.constant.Constant; 14 | import com.imu.dto.Result; 15 | import com.imu.entity.Page; 16 | import com.imu.entity.Teacher; 17 | import com.imu.service.TeacherService; 18 | import com.imu.service.TopicService; 19 | import com.imu.util.MD5Util; 20 | import com.imu.util.PageUtil; 21 | 22 | @Controller 23 | @RequestMapping("teacher") 24 | public class TeacherController { 25 | 26 | @Resource 27 | private TeacherService teacherService; 28 | 29 | @Resource 30 | private TopicService topicService; 31 | 32 | @ResponseBody 33 | @RequestMapping("add") 34 | public Result add(Teacher teacher) { 35 | if(teacher.getPassword()==null||"".equals(teacher.getPassword())) 36 | teacher.setPassword(MD5Util.md5(teacher.getId())); 37 | else 38 | teacher.setPassword(MD5Util.md5(teacher.getPassword())); 39 | int res=teacherService.add(teacher); 40 | Result result = new Result(); 41 | result.setMessage("添加失败"); 42 | result.setStatusCode("0"); 43 | if(res==1){ 44 | result.setMessage("添加成功"); 45 | result.setStatusCode("1"); 46 | } 47 | return result; 48 | } 49 | 50 | @RequestMapping("scan") 51 | public String scan(HttpSession session) { 52 | String key=""; 53 | Integer total =0; 54 | total=teacherService.getByKeyCount(key); 55 | Page page = new Page(); 56 | page=PageUtil.createPage(Constant.PAGE_SIZE, total, 0); 57 | total=teacherService.getByKeyCount(key); 58 | List teaList=teacherService.getByKey(key,page); 59 | session.setAttribute("teaKey", ""); 60 | session.setAttribute("teaList", teaList); 61 | session.setAttribute("teaPage", page); 62 | return "management/teacher/scan"; 63 | } 64 | 65 | @RequestMapping("scan/page/{pageNo}") 66 | public String scan(HttpSession session,@PathVariable(value="pageNo") int pageNo,String key) { 67 | Integer total =0; 68 | if(null==key||"".equals(key)) 69 | key = (String) session.getAttribute("teaKey"); 70 | total=teacherService.getByKeyCount(key); 71 | Page page = new Page(); 72 | page=PageUtil.createPage(Constant.PAGE_SIZE, total, pageNo); 73 | total=teacherService.getByKeyCount(key); 74 | List teaList=teacherService.getByKey(key,page); 75 | session.setAttribute("teaKey", ""); 76 | session.setAttribute("teaList", teaList); 77 | session.setAttribute("teaPage", page); 78 | return "management/teacher/scan"; 79 | } 80 | 81 | @ResponseBody 82 | @RequestMapping("update") 83 | public Result update(Teacher teacher) { 84 | Result result = new Result(); 85 | result.setMessage("更新失败"); 86 | result.setStatusCode("0"); 87 | int res=teacherService.update(teacher,1); 88 | if(res!=0) 89 | { 90 | result.setMessage("更新成功"); 91 | result.setStatusCode("1"); 92 | } 93 | return result; 94 | } 95 | 96 | 97 | } -------------------------------------------------------------------------------- /src/main/java/com/imu/controller/UploadController.java: -------------------------------------------------------------------------------- 1 | package com.imu.controller; 2 | 3 | import java.io.File; 4 | 5 | import javax.servlet.http.HttpServletRequest; 6 | 7 | import org.slf4j.Logger; 8 | import org.slf4j.LoggerFactory; 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.multipart.MultipartFile; 15 | 16 | import com.imu.constant.Constant; 17 | import com.imu.dto.Result; 18 | import com.imu.util.TimeUtil; 19 | 20 | @Controller 21 | public class UploadController { 22 | private static Logger logger = LoggerFactory.getLogger(UploadController.class); 23 | @ResponseBody 24 | @RequestMapping(value = "/upload", method = RequestMethod.POST) 25 | public Result upload(HttpServletRequest request, @RequestParam("file") MultipartFile file) { 26 | Result res = new Result(); 27 | res.setMessage("文件上传失败"); 28 | res.setStatusCode("0"); 29 | String time = TimeUtil.getTimeWithoutMilliSecond(TimeUtil.currentTime()); 30 | String path = Constant.FILE_LOCATION+"/"+time+"/"; 31 | String fileName = file.getOriginalFilename(); 32 | System.out.println(path); 33 | logger.info("文件保存路径为:"+path); 34 | File targetFile = new File(path, fileName); 35 | if (!targetFile.exists()) { 36 | targetFile.mkdirs(); 37 | } 38 | try { 39 | file.transferTo(targetFile); 40 | } catch (Exception e) { 41 | e.printStackTrace(); 42 | } 43 | res.setMessage("上传文件成功"); 44 | res.setStatusCode("1"); 45 | return res; 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /src/main/java/com/imu/controller/UserController.java: -------------------------------------------------------------------------------- 1 | package com.imu.controller; 2 | 3 | import javax.annotation.Resource; 4 | import javax.servlet.http.HttpServletRequest; 5 | import javax.servlet.http.HttpSession; 6 | 7 | import org.springframework.stereotype.Controller; 8 | import org.springframework.web.bind.annotation.PathVariable; 9 | import org.springframework.web.bind.annotation.RequestMapping; 10 | import org.springframework.web.bind.annotation.ResponseBody; 11 | 12 | import com.imu.dto.Result; 13 | import com.imu.entity.Admin; 14 | import com.imu.entity.Student; 15 | import com.imu.entity.Teacher; 16 | import com.imu.entity.User; 17 | import com.imu.enums.UserTypeEnum; 18 | import com.imu.service.AdminService; 19 | import com.imu.service.StudentService; 20 | import com.imu.service.TeacherService; 21 | import com.imu.service.TopicService; 22 | import com.imu.service.UserService; 23 | import com.imu.util.MD5Util; 24 | 25 | 26 | @Controller 27 | @RequestMapping("user") 28 | public class UserController { 29 | 30 | @Resource 31 | private UserService userService; 32 | 33 | @Resource 34 | private StudentService studentService; 35 | 36 | @Resource 37 | private AdminService adminService; 38 | 39 | @Resource 40 | private TeacherService teacherService; 41 | 42 | @Resource 43 | private TopicService topicService; 44 | 45 | @ResponseBody 46 | @RequestMapping("login/{id}/{pwd}") 47 | public Result loginAll(@PathVariable(value="id") String id,@PathVariable(value="pwd") String pwd,HttpSession session){ 48 | int totalTea = teacherService.getByKeyCount(""); 49 | int totalStu = studentService.getByKeyCount(""); 50 | int totalTopic = topicService.getByKeyCount(""); 51 | int totalCStu = studentService.getStatusCount(0); 52 | double percent = (totalStu-totalCStu)/(double)totalStu; 53 | session.setAttribute("totalTea", totalTea); 54 | session.setAttribute("totalStu", totalStu); 55 | session.setAttribute("totalTopic", totalTopic); 56 | session.setAttribute("percent", String.format("%.2f", percent)); 57 | User user= new User(); 58 | if(null!=id&&null!=pwd) 59 | { 60 | user.setId(id); 61 | user.setPassword(pwd); 62 | return userService.login(user); 63 | } 64 | else { 65 | Result res= new Result(); 66 | res.setMessage("用户名或密码不能为空"); 67 | res.setStatusCode("0"); 68 | return res; 69 | } 70 | } 71 | 72 | @RequestMapping("/index") 73 | public String index() { 74 | return "index"; 75 | } 76 | 77 | @RequestMapping("logout") 78 | public String logout(HttpSession session) { 79 | session.removeAttribute("user"); 80 | session.removeAttribute("stuStatus"); 81 | return "redirect:/"; 82 | } 83 | 84 | @ResponseBody 85 | @RequestMapping("checkPwd") 86 | public Result checkPwd(User user) 87 | { 88 | Result res = new Result(); 89 | if("".equals(user.getId())||null==user.getId()||user.getPassword()==null||"".equals(user.getPassword())) 90 | { 91 | res.setMessage("密码不正确"); 92 | res.setStatusCode("0"); 93 | } 94 | else 95 | res = userService.login(user); 96 | return res; 97 | } 98 | 99 | @ResponseBody 100 | @RequestMapping("resetPwd") 101 | public Result resetPwd(User user) 102 | { 103 | Result res = userService.resetPwd(user); 104 | return res; 105 | } 106 | 107 | @ResponseBody 108 | @RequestMapping("delete/{id}") 109 | public Result deleteUser(@PathVariable(value="id") String id) 110 | { 111 | Result res = new Result(); 112 | res.setStatusCode("0"); 113 | res.setMessage("删除失败"); 114 | int type=userService.getUserType(id); 115 | User user= new User(); 116 | user.setId(id); 117 | user.setType(type); 118 | if(type>=4) 119 | return res; 120 | res = userService.deleteUser(user); 121 | return res; 122 | } 123 | 124 | @ResponseBody 125 | @RequestMapping("modifyPwd") 126 | public Result modifyPwd(String newpwd,String newpwd1,HttpSession session) { 127 | Result res = new Result(); 128 | if(newpwd.equals(newpwd1)) 129 | { 130 | User user = (User) session.getAttribute("user"); 131 | user.setPassword(MD5Util.md5(newpwd)); 132 | res = userService.modifyPwd(user); 133 | }else 134 | { 135 | res.setMessage("修改失败"); 136 | res.setStatusCode("0"); 137 | } 138 | return res; 139 | } 140 | 141 | @ResponseBody 142 | @RequestMapping("checkExist") 143 | public Result checkExist(String id) { 144 | Result result = new Result(); 145 | int res=0; 146 | Student stu=studentService.getStuInfoById(id); 147 | if(stu==null) 148 | { 149 | Teacher teahcer = teacherService.getTeacherById(id); 150 | if(teahcer==null) 151 | { 152 | Admin admin = adminService.getAdminById(id); 153 | if(admin!=null) 154 | { 155 | res=1; 156 | } 157 | } 158 | else 159 | { 160 | res=1; 161 | } 162 | } 163 | else 164 | { 165 | res=1; 166 | } 167 | if(res==1) 168 | { 169 | result.setMessage("账号已存在:"+id); 170 | result.setStatusCode("1"); 171 | } 172 | else 173 | { 174 | result.setStatusCode("0"); 175 | result.setMessage("账号不存在"); 176 | } 177 | return result; 178 | } 179 | @RequestMapping("/info/{type}/{id}") 180 | public String userInfo(HttpSession session,HttpServletRequest request,@PathVariable(value="id") String id,@PathVariable(value="type") int type) { 181 | User user=(User) session.getAttribute("user"); 182 | if(user==null) 183 | return "405"; 184 | if(type==UserTypeEnum.SECRETARY.getCode() || type==UserTypeEnum.TEACHER.getCode()) { 185 | Teacher teacher=teacherService.getTeacherById(id); 186 | request.setAttribute("teacher", teacher); 187 | return "/public/info/teainfo"; 188 | } 189 | if(type==UserTypeEnum.STUDENT.getCode()) { 190 | Student student=studentService.getStuInfoById(id); 191 | request.setAttribute("student", student); 192 | return "/public/info/stuinfo"; 193 | } 194 | else 195 | return "404"; 196 | } 197 | } 198 | -------------------------------------------------------------------------------- /src/main/java/com/imu/dao/AdminDAO.java: -------------------------------------------------------------------------------- 1 | package com.imu.dao; 2 | 3 | import java.util.List; 4 | 5 | import org.apache.ibatis.annotations.Param; 6 | 7 | import com.imu.entity.Admin; 8 | import com.imu.entity.Page; 9 | import com.imu.entity.User; 10 | 11 | public interface AdminDAO { 12 | 13 | User login(@Param("u") User user); 14 | 15 | Admin getAdminById(String id); 16 | 17 | Integer add(@Param("u") Admin admin); 18 | 19 | Integer getByKeyCount(@Param("key") String key); 20 | 21 | List getByKey(@Param("key") String key,@Param("page") Page page); 22 | 23 | Integer resetPwd(@Param("u") User user); 24 | 25 | Integer delete(@Param("id") String id); 26 | } 27 | -------------------------------------------------------------------------------- /src/main/java/com/imu/dao/FileDAO.java: -------------------------------------------------------------------------------- 1 | package com.imu.dao; 2 | 3 | import org.apache.ibatis.annotations.Param; 4 | 5 | import com.imu.entity.File; 6 | 7 | public interface FileDAO { 8 | 9 | int add(@Param("file") File file); 10 | 11 | File getFileById(@Param("id") int id); 12 | } 13 | -------------------------------------------------------------------------------- /src/main/java/com/imu/dao/MessageDAO.java: -------------------------------------------------------------------------------- 1 | package com.imu.dao; 2 | 3 | import java.util.List; 4 | 5 | import org.apache.ibatis.annotations.Param; 6 | 7 | import com.imu.entity.Message; 8 | import com.imu.param.MessageParam; 9 | 10 | public interface MessageDAO { 11 | 12 | Integer add(@Param("msg") Message msg); 13 | 14 | List getMessageList(@Param("param") MessageParam param); 15 | } 16 | -------------------------------------------------------------------------------- /src/main/java/com/imu/dao/StudentDAO.java: -------------------------------------------------------------------------------- 1 | package com.imu.dao; 2 | 3 | import java.util.List; 4 | 5 | import org.apache.ibatis.annotations.Param; 6 | 7 | import com.imu.entity.Page; 8 | import com.imu.entity.Student; 9 | import com.imu.entity.User; 10 | 11 | public interface StudentDAO { 12 | 13 | User login(User user); 14 | 15 | Integer update(@Param("u") Student student); 16 | 17 | Student get(String id); 18 | 19 | Integer add(@Param("u") Student student); 20 | 21 | List getByKey(@Param("key") String key,@Param("page") Page page); 22 | 23 | Integer getByKeyCount(@Param("key") String key); 24 | 25 | Integer resetPwd(@Param("u") User user); 26 | 27 | Integer getStatusCount(@Param("status") int status); 28 | 29 | Integer delete(@Param("id") String id); 30 | 31 | List test(); 32 | 33 | Integer updateStatus(@Param("u") Student student); 34 | 35 | Integer updateStatusAddOne(@Param("id") String id); 36 | } 37 | -------------------------------------------------------------------------------- /src/main/java/com/imu/dao/TeacherDAO.java: -------------------------------------------------------------------------------- 1 | package com.imu.dao; 2 | 3 | import java.util.List; 4 | 5 | import org.apache.ibatis.annotations.Param; 6 | 7 | import com.imu.entity.Page; 8 | import com.imu.entity.Teacher; 9 | import com.imu.entity.User; 10 | 11 | public interface TeacherDAO { 12 | 13 | User login(@Param("u")User teacher); 14 | 15 | Teacher isTeacher(String id); 16 | 17 | Integer update(@Param("u") Teacher teacher,@Param("a") int a); 18 | 19 | Teacher getTeacherById(String id); 20 | 21 | Teacher getSecretaryById(@Param("id") String id); 22 | 23 | Integer add(@Param("u") Teacher teacher); 24 | 25 | Integer getByKeyCount(@Param("key") String key); 26 | 27 | List getByKey(@Param("key") String key,@Param("page") Page page); 28 | 29 | Integer resetPwd(@Param("u") User user); 30 | 31 | Integer delete(@Param("id") String id); 32 | } 33 | -------------------------------------------------------------------------------- /src/main/java/com/imu/dao/TopicDAO.java: -------------------------------------------------------------------------------- 1 | package com.imu.dao; 2 | 3 | import java.util.List; 4 | 5 | import org.apache.ibatis.annotations.Param; 6 | 7 | import com.imu.entity.Page; 8 | import com.imu.entity.Topic; 9 | 10 | public interface TopicDAO { 11 | 12 | Integer getByKeyCount(@Param("key") String key); 13 | 14 | List getByKey(@Param("key") String key,@Param("page") Page page); 15 | 16 | Integer getSecretaryCount(@Param("id") String id); 17 | 18 | List getSecretaryTopic(@Param("id") String id,@Param("page") Page page); 19 | 20 | Integer getTeacherCount(@Param("id") String id); 21 | 22 | Integer getStudentCount(@Param("id") String id); 23 | 24 | Integer add(@Param("t") Topic topic); 25 | 26 | Integer getMyTopicCount(@Param("id") String id); 27 | 28 | List getMyTopic(@Param("id") String id,@Param("page") Page page); 29 | 30 | Topic get(@Param("id") int id); 31 | 32 | Integer update(@Param("t") Topic topic); 33 | 34 | Integer endStage(@Param("id") int id); 35 | } 36 | -------------------------------------------------------------------------------- /src/main/java/com/imu/dao/TopicMapDAO.java: -------------------------------------------------------------------------------- 1 | package com.imu.dao; 2 | 3 | import java.util.List; 4 | 5 | import org.apache.ibatis.annotations.Param; 6 | 7 | import com.imu.entity.Page; 8 | import com.imu.entity.TopicMap; 9 | 10 | public interface TopicMapDAO { 11 | 12 | Integer getTeacherCount(@Param("id") String id); 13 | 14 | List getTeacherList(@Param("id") String id,@Param("page") Page page); 15 | 16 | Integer getStudentCount(@Param("id") String id); 17 | 18 | List getStudentList(@Param("id") String id,@Param("page") Page page); 19 | 20 | Integer add(@Param("m") TopicMap topicMap); 21 | 22 | TopicMap get(@Param("id") int id); 23 | 24 | List check(@Param("id") int id,@Param("studentId") String studentId); 25 | 26 | Integer update(@Param("map") TopicMap topicMap); 27 | 28 | List getTopicList(@Param("id") int id); 29 | 30 | List getStudentAllList(@Param("id") String id); 31 | } 32 | -------------------------------------------------------------------------------- /src/main/java/com/imu/dto/Result.java: -------------------------------------------------------------------------------- 1 | package com.imu.dto; 2 | 3 | public class Result { 4 | private String message; 5 | private String statusCode; 6 | private Object data; 7 | public String getMessage() { 8 | return message; 9 | } 10 | public void setMessage(String message) { 11 | this.message = message; 12 | } 13 | public String getStatusCode() { 14 | return statusCode; 15 | } 16 | public void setStatusCode(String statusCode) { 17 | this.statusCode = statusCode; 18 | } 19 | public Object getData() { 20 | return data; 21 | } 22 | public void setData(Object data) { 23 | this.data = data; 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /src/main/java/com/imu/entity/Admin.java: -------------------------------------------------------------------------------- 1 | package com.imu.entity; 2 | 3 | public class Admin extends User{ 4 | 5 | @Override 6 | public String toString() { 7 | return "Admin [getId()=" + getId() + ", getName()=" + getName() + ", getPassword()=" + getPassword() + "]"; 8 | } 9 | 10 | } 11 | -------------------------------------------------------------------------------- /src/main/java/com/imu/entity/File.java: -------------------------------------------------------------------------------- 1 | package com.imu.entity; 2 | 3 | import java.sql.Timestamp; 4 | 5 | public class File { 6 | 7 | private int id; 8 | private String title; 9 | private String fileName; 10 | private String location; 11 | private Timestamp time; 12 | public int getId() { 13 | return id; 14 | } 15 | public void setId(int id) { 16 | this.id = id; 17 | } 18 | public String getTitle() { 19 | return title; 20 | } 21 | public void setTitle(String title) { 22 | this.title = title; 23 | } 24 | public String getLocation() { 25 | return location; 26 | } 27 | public void setLocation(String location) { 28 | this.location = location; 29 | } 30 | public Timestamp getTime() { 31 | return time; 32 | } 33 | public void setTime(Timestamp time) { 34 | this.time = time; 35 | } 36 | public String getFileName() { 37 | return fileName; 38 | } 39 | public void setFileName(String fileName) { 40 | this.fileName = fileName; 41 | } 42 | 43 | 44 | } 45 | -------------------------------------------------------------------------------- /src/main/java/com/imu/entity/Message.java: -------------------------------------------------------------------------------- 1 | package com.imu.entity; 2 | 3 | import java.sql.Timestamp; 4 | 5 | public class Message { 6 | 7 | private int id; 8 | private String title; 9 | private int topicId; 10 | private int type; 11 | private int stage; 12 | private String description; 13 | private String content; 14 | private String receiveId; 15 | private String sendId; 16 | private Timestamp time; 17 | public int getId() { 18 | return id; 19 | } 20 | public void setId(int id) { 21 | this.id = id; 22 | } 23 | public String getTitle() { 24 | return title; 25 | } 26 | public void setTitle(String title) { 27 | this.title = title; 28 | } 29 | public int getType() { 30 | return type; 31 | } 32 | public void setType(int type) { 33 | this.type = type; 34 | } 35 | public int getStage() { 36 | return stage; 37 | } 38 | public void setStage(int stage) { 39 | this.stage = stage; 40 | } 41 | public String getDescription() { 42 | return description; 43 | } 44 | public void setDescription(String description) { 45 | this.description = description; 46 | } 47 | public String getContent() { 48 | return content; 49 | } 50 | public void setContent(String content) { 51 | this.content = content; 52 | } 53 | public String getReceiveId() { 54 | return receiveId; 55 | } 56 | public void setReceiveId(String receiveId) { 57 | this.receiveId = receiveId; 58 | } 59 | public String getSendId() { 60 | return sendId; 61 | } 62 | public void setSendId(String sendId) { 63 | this.sendId = sendId; 64 | } 65 | public Timestamp getTime() { 66 | return time; 67 | } 68 | public void setTime(Timestamp time) { 69 | this.time = time; 70 | } 71 | public int getTopicId() { 72 | return topicId; 73 | } 74 | public void setTopicId(int topicId) { 75 | this.topicId = topicId; 76 | } 77 | 78 | 79 | } 80 | -------------------------------------------------------------------------------- /src/main/java/com/imu/entity/Page.java: -------------------------------------------------------------------------------- 1 | package com.imu.entity; 2 | 3 | public class Page { 4 | 5 | private int pageSize; 6 | private int totalCount; 7 | private int totalPage; 8 | private int currentPage; 9 | private int beginIndex; 10 | private int endIndex; 11 | private boolean hasPrePage; 12 | private boolean hasNextPage; 13 | 14 | public int getBeginIndex() { 15 | return beginIndex; 16 | } 17 | 18 | public void setBeginIndex(int beginIndex) { 19 | this.beginIndex = beginIndex; 20 | } 21 | 22 | public Page(int pageSize, int totalCount, int totalPage, int currentPage, 23 | int beginIndex, int endIndex,boolean hasPrePage, boolean hasNextPage) { 24 | this.pageSize = pageSize; 25 | this.totalCount = totalCount; 26 | this.totalPage = totalPage; 27 | this.currentPage = currentPage; 28 | this.beginIndex = beginIndex; 29 | this.endIndex = endIndex; 30 | this.hasPrePage = hasPrePage; 31 | this.hasNextPage = hasNextPage; 32 | } 33 | 34 | public Page(){} 35 | 36 | public int getPageSize() { 37 | return pageSize; 38 | } 39 | 40 | public void setPageSize(int pageSize) { 41 | this.pageSize = pageSize; 42 | } 43 | 44 | public int getTotalCount() { 45 | return totalCount; 46 | } 47 | 48 | public void setTotalCount(int totalCount) { 49 | this.totalCount = totalCount; 50 | } 51 | 52 | public int getTotalPage() { 53 | return totalPage; 54 | } 55 | 56 | public void setTotalPage(int totalPage) { 57 | this.totalPage = totalPage; 58 | } 59 | 60 | public int getCurrentPage() { 61 | return currentPage; 62 | } 63 | 64 | public void setCurrentPage(int currentPage) { 65 | this.currentPage = currentPage; 66 | } 67 | 68 | 69 | public boolean isHasPrePage() { 70 | return hasPrePage; 71 | } 72 | 73 | public void setHasPrePage(boolean hasPrePage) { 74 | this.hasPrePage = hasPrePage; 75 | } 76 | 77 | public boolean isHasNextPage() { 78 | return hasNextPage; 79 | } 80 | 81 | public void setHasNextPage(boolean hasNextPage) { 82 | this.hasNextPage = hasNextPage; 83 | } 84 | 85 | public int getEndIndex() { 86 | return endIndex; 87 | } 88 | 89 | public void setEndIndex(int endIndex) { 90 | this.endIndex = endIndex; 91 | } 92 | 93 | 94 | } 95 | -------------------------------------------------------------------------------- /src/main/java/com/imu/entity/Student.java: -------------------------------------------------------------------------------- 1 | package com.imu.entity; 2 | 3 | import java.sql.Timestamp; 4 | 5 | public class Student extends User{ 6 | 7 | private int gender; //0:- 1:男 2:女 8 | private String email; 9 | private String phone; 10 | private String major; 11 | private String dept; 12 | private int status; //状态:0:可选、1:已确定、2:开题报告、3、论文或程序指导、4:中期答辩、5论文或程序指导、6:答辩、7:结题 13 | private Timestamp lastLoginTime; 14 | public int getGender() { 15 | return gender; 16 | } 17 | public void setGender(int gender) { 18 | this.gender = gender; 19 | } 20 | public String getEmail() { 21 | return email; 22 | } 23 | public void setEmail(String email) { 24 | this.email = email; 25 | } 26 | public String getPhone() { 27 | return phone; 28 | } 29 | public void setPhone(String phone) { 30 | this.phone = phone; 31 | } 32 | public String getMajor() { 33 | return major; 34 | } 35 | public void setMajor(String major) { 36 | this.major = major; 37 | } 38 | public String getDept() { 39 | return dept; 40 | } 41 | public void setDept(String dept) { 42 | this.dept = dept; 43 | } 44 | public int getStatus() { 45 | return status; 46 | } 47 | public void setStatus(int status) { 48 | this.status = status; 49 | } 50 | public Timestamp getLastLoginTime() { 51 | return lastLoginTime; 52 | } 53 | public void setLastLoginTime(Timestamp lastLoginTime) { 54 | this.lastLoginTime = lastLoginTime; 55 | } 56 | @Override 57 | public String toString() { 58 | return "Student [gender=" + gender + ", email=" + email + ", phone=" + phone + ", major=" + major + ", dept=" 59 | + dept + ", status=" + status + ", lastLoginTime=" + lastLoginTime + ", getId()=" + getId() 60 | + ", getName()=" + getName() + ", getPassword()=" + getPassword() + "]"; 61 | } 62 | 63 | 64 | 65 | 66 | } 67 | -------------------------------------------------------------------------------- /src/main/java/com/imu/entity/Teacher.java: -------------------------------------------------------------------------------- 1 | package com.imu.entity; 2 | 3 | import java.sql.Timestamp; 4 | 5 | public class Teacher extends User{ 6 | 7 | private int gender; //0:- 1:男 2:女 8 | private String email; 9 | private String phone; 10 | private int type; //0:教师1:答辩秘书 11 | private Timestamp lastLoginTime; 12 | 13 | public int getGender() { 14 | return gender; 15 | } 16 | public void setGender(int gender) { 17 | this.gender = gender; 18 | } 19 | public String getEmail() { 20 | return email; 21 | } 22 | public void setEmail(String email) { 23 | this.email = email; 24 | } 25 | public String getPhone() { 26 | return phone; 27 | } 28 | public void setPhone(String phone) { 29 | this.phone = phone; 30 | } 31 | public int getType() { 32 | return type; 33 | } 34 | public void setType(int type) { 35 | this.type = type; 36 | } 37 | public Timestamp getLastLoginTime() { 38 | return lastLoginTime; 39 | } 40 | public void setLastLoginTime(Timestamp lastLoginTime) { 41 | this.lastLoginTime = lastLoginTime; 42 | } 43 | @Override 44 | public String toString() { 45 | return "Teacher [gender=" + gender + ", email=" + email + ", phone=" + phone + ", type=" + type 46 | + ", lastLoginTime=" + lastLoginTime + ", getId()=" + getId() + ", getName()=" + getName() 47 | + ", getPassword()=" + getPassword() + "]"; 48 | } 49 | 50 | 51 | } 52 | -------------------------------------------------------------------------------- /src/main/java/com/imu/entity/Topic.java: -------------------------------------------------------------------------------- 1 | package com.imu.entity; 2 | 3 | import java.sql.Timestamp; 4 | 5 | public class Topic { 6 | 7 | private int id; 8 | private String title; 9 | private String content; 10 | private String description; 11 | private String teacherId; 12 | private String teacherName; 13 | private String studentId; 14 | private String studentName; 15 | private String secretaryId; 16 | private String secretaryName; 17 | private int valid;// 0:无效 1:有效 18 | private int status;//状态:0:可选、1:已确定、2:开题报告、3、论文或程序指导、4:中期答辩、5论文或程序指导、6:答辩、7:结题 19 | private int isOpen; 20 | private int isFinished; 21 | private int attachment; 22 | private int proposal; 23 | private int mediumDefense; 24 | private int thesis; 25 | private int code; 26 | private String record; 27 | private Timestamp time; 28 | public int getId() { 29 | return id; 30 | } 31 | public void setId(int id) { 32 | this.id = id; 33 | } 34 | public String getTitle() { 35 | return title; 36 | } 37 | public void setTitle(String title) { 38 | this.title = title; 39 | } 40 | public String getContent() { 41 | return content; 42 | } 43 | public void setContent(String content) { 44 | this.content = content; 45 | } 46 | public String getDescription() { 47 | return description; 48 | } 49 | public void setDescription(String description) { 50 | this.description = description; 51 | } 52 | public int getValid() { 53 | return valid; 54 | } 55 | public void setValid(int valid) { 56 | this.valid = valid; 57 | } 58 | public int getStatus() { 59 | return status; 60 | } 61 | public void setStatus(int status) { 62 | this.status = status; 63 | } 64 | public int getProposal() { 65 | return proposal; 66 | } 67 | public void setProposal(int proposal) { 68 | this.proposal = proposal; 69 | } 70 | public int getThesis() { 71 | return thesis; 72 | } 73 | public void setThesis(int thesis) { 74 | this.thesis = thesis; 75 | } 76 | public int getCode() { 77 | return code; 78 | } 79 | public void setCode(int code) { 80 | this.code = code; 81 | } 82 | public Timestamp getTime() { 83 | return time; 84 | } 85 | public void setTime(Timestamp time) { 86 | this.time = time; 87 | } 88 | public String getTeacherId() { 89 | return teacherId; 90 | } 91 | public void setTeacherId(String teacherId) { 92 | this.teacherId = teacherId; 93 | } 94 | public String getStudentId() { 95 | return studentId; 96 | } 97 | public void setStudentId(String studentId) { 98 | this.studentId = studentId; 99 | } 100 | public String getSecretaryId() { 101 | return secretaryId; 102 | } 103 | public void setSecretaryId(String secretaryId) { 104 | this.secretaryId = secretaryId; 105 | } 106 | public int getIsOpen() { 107 | return isOpen; 108 | } 109 | public void setIsOpen(int isOpen) { 110 | this.isOpen = isOpen; 111 | } 112 | public int getIsFinished() { 113 | return isFinished; 114 | } 115 | public void setIsFinished(int isFinished) { 116 | this.isFinished = isFinished; 117 | } 118 | public int getMediumDefense() { 119 | return mediumDefense; 120 | } 121 | public void setMediumDefense(int mediumDefense) { 122 | this.mediumDefense = mediumDefense; 123 | } 124 | public int getAttachment() { 125 | return attachment; 126 | } 127 | public void setAttachment(int attachment) { 128 | this.attachment = attachment; 129 | } 130 | public String getTeacherName() { 131 | return teacherName; 132 | } 133 | public void setTeacherName(String teacherName) { 134 | this.teacherName = teacherName; 135 | } 136 | public String getStudentName() { 137 | return studentName; 138 | } 139 | public void setStudentName(String studentName) { 140 | this.studentName = studentName; 141 | } 142 | public String getSecretaryName() { 143 | return secretaryName; 144 | } 145 | public void setSecretaryName(String secretaryName) { 146 | this.secretaryName = secretaryName; 147 | } 148 | public String getRecord() { 149 | return record; 150 | } 151 | public void setRecord(String record) { 152 | this.record = record; 153 | } 154 | 155 | 156 | } 157 | -------------------------------------------------------------------------------- /src/main/java/com/imu/entity/TopicMap.java: -------------------------------------------------------------------------------- 1 | package com.imu.entity; 2 | 3 | import java.sql.Timestamp; 4 | /** 5 | * 6 | * @author 7 | * //0:待审核 1:选题成功2:被拒绝3:已放弃 8 | */ 9 | public class TopicMap { 10 | 11 | private int id; 12 | private String studentId; 13 | private String studentName; 14 | private String teacherId; 15 | private String teacherName; 16 | private int topicId; 17 | private String topicTitle; 18 | private Timestamp time; 19 | private int status; //0:待审核 1:选题成功2:被拒绝3:已放弃 20 | 21 | private String secretaryId; 22 | private String secretaryName; 23 | 24 | public int getId() { 25 | return id; 26 | } 27 | public void setId(int id) { 28 | this.id = id; 29 | } 30 | public String getStudentId() { 31 | return studentId; 32 | } 33 | public void setStudentId(String studentId) { 34 | this.studentId = studentId; 35 | } 36 | public String getStudentName() { 37 | return studentName; 38 | } 39 | public void setStudentName(String studentName) { 40 | this.studentName = studentName; 41 | } 42 | public int getTopicId() { 43 | return topicId; 44 | } 45 | public void setTopicId(int topicId) { 46 | this.topicId = topicId; 47 | } 48 | public String getTopicTitle() { 49 | return topicTitle; 50 | } 51 | public void setTopicTitle(String topicTitle) { 52 | this.topicTitle = topicTitle; 53 | } 54 | public Timestamp getTime() { 55 | return time; 56 | } 57 | public void setTime(Timestamp time) { 58 | this.time = time; 59 | } 60 | public int getStatus() { 61 | return status; 62 | } 63 | public void setStatus(int status) { 64 | this.status = status; 65 | } 66 | public String getTeacherId() { 67 | return teacherId; 68 | } 69 | public void setTeacherId(String teacherId) { 70 | this.teacherId = teacherId; 71 | } 72 | public String getTeacherName() { 73 | return teacherName; 74 | } 75 | public void setTeacherName(String teacherName) { 76 | this.teacherName = teacherName; 77 | } 78 | public String getSecretaryId() { 79 | return secretaryId; 80 | } 81 | public void setSecretaryId(String secretaryId) { 82 | this.secretaryId = secretaryId; 83 | } 84 | public String getSecretaryName() { 85 | return secretaryName; 86 | } 87 | public void setSecretaryName(String secretaryName) { 88 | this.secretaryName = secretaryName; 89 | } 90 | 91 | 92 | } 93 | -------------------------------------------------------------------------------- /src/main/java/com/imu/entity/User.java: -------------------------------------------------------------------------------- 1 | package com.imu.entity; 2 | 3 | /** 4 | * //0:学生,1:教师,2:答辩秘书,3:管理员 5 | * 6 | * 7 | */ 8 | public class User { 9 | 10 | private String id; 11 | private String name; 12 | private String password; 13 | private int type; //0:学生,1:教师,2:答辩秘书,3:管理员 14 | public String getId() { 15 | return id; 16 | } 17 | public void setId(String id) { 18 | this.id = id; 19 | } 20 | public String getName() { 21 | return name; 22 | } 23 | public void setName(String name) { 24 | this.name = name; 25 | } 26 | public String getPassword() { 27 | return password; 28 | } 29 | public void setPassword(String password) { 30 | this.password = password; 31 | } 32 | public int getType() { 33 | return type; 34 | } 35 | public void setType(int type) { 36 | this.type = type; 37 | } 38 | @Override 39 | public String toString() { 40 | return "User [id=" + id + ", name=" + name + ", password=" + password + "]"; 41 | } 42 | 43 | 44 | } 45 | -------------------------------------------------------------------------------- /src/main/java/com/imu/enums/StatusEnum.java: -------------------------------------------------------------------------------- 1 | package com.imu.enums; 2 | 3 | public enum StatusEnum { 4 | 5 | UNCONFIRM(0,"未确定"), 6 | CONFIRM(1, "已确定"), 7 | OPEN(2, "开题"), 8 | DIRECT1(3,"前期指导"), 9 | MEDIUM(4,"中期答辩"), 10 | DIRECT2(5,"后期指导"), 11 | REPLY(6,"答辩"), 12 | FINISHED(7,"结题"); 13 | 14 | 15 | private Integer code; 16 | 17 | private String value; 18 | 19 | private StatusEnum(Integer code, String value) { 20 | this.code = code; 21 | this.value = value; 22 | } 23 | 24 | public static String getValue(Integer code) { 25 | if (code == null) { 26 | return ""; 27 | } 28 | for (StatusEnum statusEnum : StatusEnum.values()) { 29 | if (statusEnum.code == code) { 30 | return statusEnum.value; 31 | } 32 | } 33 | return ""; 34 | } 35 | 36 | public Integer getCode() { 37 | return code; 38 | } 39 | 40 | public String getValue() { 41 | return value; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/main/java/com/imu/enums/UserTypeEnum.java: -------------------------------------------------------------------------------- 1 | package com.imu.enums; 2 | 3 | /** 4 | * 5 | * @author 6 | * 0:学生 7 | * 1:教师 8 | * 2:答辩秘书 9 | * 3:管理员 10 | */ 11 | public enum UserTypeEnum { 12 | STUDENT(0,"student"), 13 | TEACHER(1, "teacher"), 14 | SECRETARY(2, "secretary"), 15 | ADMIN(3,"admin"); 16 | 17 | private Integer code; 18 | 19 | private String value; 20 | 21 | private UserTypeEnum(Integer code, String value) { 22 | this.code = code; 23 | this.value = value; 24 | } 25 | 26 | public static String getValue(Integer code) { 27 | if (code == null) { 28 | return ""; 29 | } 30 | for (UserTypeEnum userTypeEnum : UserTypeEnum.values()) { 31 | if (userTypeEnum.code == code) { 32 | return userTypeEnum.value; 33 | } 34 | } 35 | return ""; 36 | } 37 | 38 | public Integer getCode() { 39 | return code; 40 | } 41 | 42 | public String getValue() { 43 | return value; 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /src/main/java/com/imu/interceptor/LoginInterceptor.java: -------------------------------------------------------------------------------- 1 | package com.imu.interceptor; 2 | 3 | import javax.servlet.http.HttpServletRequest; 4 | import javax.servlet.http.HttpServletResponse; 5 | import javax.servlet.http.HttpSession; 6 | 7 | import org.springframework.web.servlet.HandlerInterceptor; 8 | import org.springframework.web.servlet.ModelAndView; 9 | 10 | import com.imu.entity.User; 11 | /** 12 | * 登录认证的拦截器 13 | */ 14 | public class LoginInterceptor implements HandlerInterceptor{ 15 | 16 | /** 17 | * Handler执行完成之后调用这个方法 18 | */ 19 | public void afterCompletion(HttpServletRequest request, 20 | HttpServletResponse response, Object handler, Exception exc) 21 | throws Exception { 22 | 23 | } 24 | 25 | /** 26 | * Handler执行之后,ModelAndView返回之前调用这个方法 27 | */ 28 | public void postHandle(HttpServletRequest request, HttpServletResponse response, 29 | Object handler, ModelAndView modelAndView) throws Exception { 30 | } 31 | 32 | /** 33 | * Handler执行之前调用这个方法 34 | */ 35 | public boolean preHandle(HttpServletRequest request, HttpServletResponse response, 36 | Object handler) throws Exception { 37 | //获取请求的URL 38 | String url = request.getRequestURI(); 39 | //URL:login.jsp是公开的;这个demo是除了login.jsp是可以公开访问的,其它的URL都进行拦截控制 40 | if(url.indexOf("login")>=0){ 41 | return true; 42 | } 43 | if(url.indexOf("assets")>=0){ 44 | return true; 45 | } 46 | if(url.indexOf("logout")>=0){ 47 | return true; 48 | } 49 | //获取Session 50 | HttpSession session = request.getSession(); 51 | User user = (User)session.getAttribute("user"); 52 | 53 | if(user != null){ 54 | return true; 55 | } 56 | //不符合条件的,跳转到登录界面 57 | request.getRequestDispatcher("/sessiontimeout.jsp").forward(request, response); 58 | 59 | return false; 60 | } 61 | 62 | } 63 | -------------------------------------------------------------------------------- /src/main/java/com/imu/mapper/AdminMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | id, name, password 16 | 17 | 23 | 31 | 32 | insert into 33 | admin 34 | ( 35 | id,name,password 36 | ) 37 | values 38 | ( 39 | #{u.id}, 40 | #{u.name}, 41 | #{u.password} 42 | ) 43 | 44 | 48 | 54 | 55 | update admin set password=#{u.password} where id=#{u.id} 56 | 57 | 58 | delete from admin where id=#{id}; 59 | 60 | -------------------------------------------------------------------------------- /src/main/java/com/imu/mapper/FileMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | id, title, file_name, location,time 13 | 14 | 15 | INSERT INTO file(title,file_name,location,time) 16 | VALUES( 17 | #{file.title}, 18 | #{file.fileName}, 19 | #{file.location}, 20 | #{file.time} 21 | ) 22 | 23 | 29 | -------------------------------------------------------------------------------- /src/main/java/com/imu/mapper/MessageMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | id, title, topic_id, type, stage, description, content, receive_id, send_id, time 18 | 19 | 20 | INSERT INTO message(title,topic_id,type, stage, description, content, receive_id, send_id, time) 21 | VALUES( 22 | #{msg.title}, 23 | #{msg.topicId}, 24 | #{msg.type}, 25 | #{msg.stage}, 26 | #{msg.description}, 27 | #{msg.content}, 28 | #{msg.receiveId}, 29 | #{msg.sendId}, 30 | #{msg.time} 31 | ) 32 | 33 | 55 | -------------------------------------------------------------------------------- /src/main/java/com/imu/mapper/StudentMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | id, name, password,gender,email,phone,major,dept,status,last_login_time 23 | 24 | 30 | 31 | update student set id=#{u.id} 32 | ,gender=#{u.gender} 33 | ,last_login_time=#{u.lastLoginTime,jdbcType=TIMESTAMP} 34 | ,name=#{u.name} 35 | ,password=#{u.password} 36 | ,phone=#{u.phone} 37 | ,email=#{u.email} 38 | ,major=#{u.major} 39 | ,dept=#{u.dept} 40 | ,status=#{u.status} 41 | where id=#{u.id} 42 | 43 | 44 | update student set status = status+1 45 | where id =#{id} 46 | 47 | 53 | 54 | insert into 55 | student 56 | ( 57 | id,name,password 58 | ) 59 | values 60 | ( 61 | #{u.id}, 62 | #{u.name}, 63 | #{u.password} 64 | ) 65 | 66 | 70 | 76 | 77 | update student set password=#{u.password} where id=#{u.id} 78 | 79 | 83 | 84 | delete from student where id=#{id}; 85 | 86 | 87 | update student set status=#{u.status} 88 | where id = #{u.id} 89 | 90 | -------------------------------------------------------------------------------- /src/main/java/com/imu/mapper/TeacherMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | id, name, password,gender,email,phone,type,last_login_time 21 | 22 | 28 | 34 | 35 | update teacher set 36 | id=#{u.id} 37 | 38 | ,gender=#{u.gender} 39 | 40 | 41 | ,name=#{u.name} 42 | 43 | 44 | ,password=#{u.password} 45 | 46 | 47 | ,phone=#{u.phone} 48 | 49 | 50 | ,email=#{u.email} 51 | 52 | 53 | ,type=#{u.type} 54 | 55 | 56 | ,last_login_time=#{u.lastLoginTime} 57 | 58 | WHERE 59 | id=#{u.id} 60 | 61 | 69 | 77 | 78 | insert into 79 | teacher 80 | ( 81 | id,name,password 82 | ) 83 | values 84 | ( 85 | #{u.id}, 86 | #{u.name}, 87 | #{u.password} 88 | ) 89 | 90 | 94 | 100 | 101 | update teacher set password=#{u.password} where id=#{u.id} 102 | 103 | 104 | delete from teacher where id=#{id}; 105 | 106 | -------------------------------------------------------------------------------- /src/main/java/com/imu/mapper/TopicMapMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | id, student_id, student_name,teacher_id,teacher_name, 17 | topic_id,topic_title,time,status 18 | 19 | 23 | 28 | 33 | 37 | 41 | 46 | 47 | INSERT INTO 48 | topic_map 49 | ( 50 | id, student_id, student_name,teacher_id,teacher_name, 51 | topic_id,topic_title,time,status 52 | ) 53 | VALUES 54 | ( 55 | #{m.id}, #{m.studentId}, #{m.studentName},#{m.teacherId}, #{m.teacherName}, 56 | #{m.topicId},#{m.topicTitle},#{m.time},#{m.status} 57 | ) 58 | 59 | 64 | 65 | 70 | 71 | UPDATE topic_map 72 | SET 73 | status = #{map.status} 74 | WHERE id= #{map.id} 75 | 76 | -------------------------------------------------------------------------------- /src/main/java/com/imu/mapper/TopicMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | id, title, content,description, 26 | teacher_id,student_id,secretary_id,valid, 27 | status,is_open,is_finished,proposal,attachment, 28 | medium_defense,thesis,code,record,time 29 | 30 | 34 | 38 | 44 | 48 | 52 | 58 | 64 | 68 | 69 | INSERT INTO 70 | topic 71 | ( 72 | title,content,description, 73 | teacher_id,student_id,secretary_id, 74 | valid,status,is_open,is_finished, 75 | attachment,proposal,medium_defense, 76 | thesis,code,record,time 77 | ) 78 | VALUES 79 | ( 80 | #{t.title},#{t.content},#{t.description}, 81 | #{t.teacherId},#{t.studentId},#{t.secretaryId}, 82 | #{t.valid},#{t.status},#{t.isOpen},#{t.isFinished}, 83 | #{t.attachment},#{t.proposal},#{t.mediumDefense}, 84 | #{t.thesis},#{t.code},#{t.record},#{t.time} 85 | ) 86 | 87 | 92 | 93 | update topic 94 | set id=#{t.id} 95 | ,title=#{t.title} 96 | ,content=#{t.content} 97 | ,description=#{t.description} 98 | ,student_id=#{t.studentId} 99 | ,secretary_id=#{t.secretaryId} 100 | ,status=#{t.status} 101 | ,is_open=#{t.isOpen} 102 | ,is_finished=#{t.isFinished} 103 | ,attachment=#{t.attachment} 104 | ,proposal=#{t.proposal} 105 | ,medium_defense=#{t.mediumDefense} 106 | ,thesis=#{t.thesis} 107 | ,code=#{t.code} 108 | ,record=#{t.record} 109 | where id = #{t.id} 110 | 111 | 112 | update topic 113 | set status = status+1 114 | where id = #{id} 115 | 116 | 117 | -------------------------------------------------------------------------------- /src/main/java/com/imu/param/MessageParam.java: -------------------------------------------------------------------------------- 1 | package com.imu.param; 2 | 3 | import com.imu.entity.Message; 4 | 5 | public class MessageParam { 6 | 7 | private int type; 8 | private int stage; 9 | private int topicId; 10 | private String receiveId; 11 | private String sendId; 12 | 13 | public MessageParam(int type,int stage,int topicId) { 14 | this.type=type; 15 | this.stage=stage; 16 | this.topicId=topicId; 17 | this.receiveId=""; 18 | this.sendId=""; 19 | } 20 | public MessageParam(int type,int stage,int topicId,String receiveId,String sendId) { 21 | this.type=type; 22 | this.stage=stage; 23 | this.topicId=topicId; 24 | this.receiveId=receiveId; 25 | this.sendId=sendId; 26 | } 27 | public int getType() { 28 | return type; 29 | } 30 | public void setType(int type) { 31 | this.type = type; 32 | } 33 | public int getStage() { 34 | return stage; 35 | } 36 | public void setStage(int stage) { 37 | this.stage = stage; 38 | } 39 | public String getReceiveId() { 40 | return receiveId; 41 | } 42 | public void setReceiveId(String receiveId) { 43 | this.receiveId = receiveId; 44 | } 45 | public String getSendId() { 46 | return sendId; 47 | } 48 | public void setSendId(String sendId) { 49 | this.sendId = sendId; 50 | } 51 | public int getTopicId() { 52 | return topicId; 53 | } 54 | public void setTopicId(int topicId) { 55 | this.topicId = topicId; 56 | } 57 | 58 | 59 | } 60 | -------------------------------------------------------------------------------- /src/main/java/com/imu/service/AdminService.java: -------------------------------------------------------------------------------- 1 | package com.imu.service; 2 | 3 | import java.util.List; 4 | 5 | import com.imu.entity.Admin; 6 | import com.imu.entity.Page; 7 | import com.imu.entity.User; 8 | 9 | public interface AdminService { 10 | 11 | User login(User user); 12 | 13 | Admin getAdminById(String id); 14 | 15 | Integer add(Admin admin); 16 | 17 | Integer getByKeyCount(String key); 18 | 19 | List getByKey(String key,Page page); 20 | 21 | Integer resetPwd(User user); 22 | } 23 | -------------------------------------------------------------------------------- /src/main/java/com/imu/service/FileService.java: -------------------------------------------------------------------------------- 1 | package com.imu.service; 2 | 3 | import com.imu.entity.File; 4 | 5 | public interface FileService { 6 | 7 | int add(File file); 8 | File getFileById(int id); 9 | } 10 | -------------------------------------------------------------------------------- /src/main/java/com/imu/service/MessageService.java: -------------------------------------------------------------------------------- 1 | package com.imu.service; 2 | 3 | import java.util.List; 4 | 5 | import com.imu.entity.Message; 6 | import com.imu.param.MessageParam; 7 | 8 | public interface MessageService { 9 | Integer add(Message msg); 10 | 11 | List getMessageList(MessageParam param); 12 | } 13 | -------------------------------------------------------------------------------- /src/main/java/com/imu/service/StudentService.java: -------------------------------------------------------------------------------- 1 | package com.imu.service; 2 | 3 | import java.util.List; 4 | 5 | import com.imu.entity.Page; 6 | import com.imu.entity.Student; 7 | import com.imu.entity.User; 8 | 9 | public interface StudentService { 10 | 11 | User login(User user); 12 | 13 | Integer add(Student student); 14 | 15 | Student getStuInfoById(String id); 16 | 17 | List getByKey(String key,Page page); 18 | 19 | Integer getByKeyCount(String key); 20 | 21 | Integer resetPwd(User user); 22 | 23 | Integer getStatusCount(int status); 24 | 25 | Integer update(Student student); 26 | 27 | Integer updateStatus(Student student); 28 | 29 | Integer updateStatusAddOne(String id); 30 | } 31 | -------------------------------------------------------------------------------- /src/main/java/com/imu/service/TeacherService.java: -------------------------------------------------------------------------------- 1 | package com.imu.service; 2 | 3 | import java.util.List; 4 | 5 | import com.imu.entity.Page; 6 | import com.imu.entity.Teacher; 7 | import com.imu.entity.User; 8 | 9 | public interface TeacherService { 10 | 11 | User login(User user); 12 | 13 | Teacher isTeacher(String id); 14 | 15 | Teacher getTeacherById(String id); 16 | 17 | Integer add(Teacher teacher); 18 | 19 | Integer getByKeyCount(String key); 20 | 21 | List getByKey(String key,Page page); 22 | 23 | Integer resetPwd(User user); 24 | 25 | Integer update(Teacher teacher,int a); 26 | 27 | Teacher getSecretaryById(String id); 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/com/imu/service/TopicMapService.java: -------------------------------------------------------------------------------- 1 | package com.imu.service; 2 | 3 | import java.util.List; 4 | 5 | import com.imu.entity.Page; 6 | import com.imu.entity.TopicMap; 7 | 8 | public interface TopicMapService { 9 | 10 | Integer getTeacherCount(String id); 11 | 12 | List getTeacherList(String id, Page page); 13 | 14 | Integer getStudentCount(String id); 15 | 16 | List getStudentList(String id, Page page); 17 | 18 | Integer add(TopicMap topicMap); 19 | 20 | TopicMap get(int id); 21 | 22 | List check(int id,String studentId); 23 | 24 | Integer update(TopicMap topicMap); 25 | 26 | List getTopicList(int id); 27 | 28 | List getStudentAllList(String id); 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/com/imu/service/TopicService.java: -------------------------------------------------------------------------------- 1 | package com.imu.service; 2 | 3 | import java.util.List; 4 | 5 | import com.imu.entity.Page; 6 | import com.imu.entity.Topic; 7 | 8 | public interface TopicService { 9 | 10 | Integer getByKeyCount(String key); 11 | 12 | List getByKey(String key,Page page); 13 | 14 | Integer getSecretaryCount(String id); 15 | 16 | List getSecretaryTopic(String id,Page page); 17 | 18 | Integer getTeacherCount(String id); 19 | 20 | Integer getStudentCount(String id); 21 | 22 | Integer add(Topic topic); 23 | 24 | List getMyTopic(String id,Page page); 25 | 26 | Integer getMyTopicCount(String id); 27 | 28 | Topic get(int id); 29 | 30 | Integer update(Topic topic); 31 | 32 | Integer endStage(int id); 33 | } 34 | -------------------------------------------------------------------------------- /src/main/java/com/imu/service/UserService.java: -------------------------------------------------------------------------------- 1 | package com.imu.service; 2 | 3 | import com.imu.dto.Result; 4 | import com.imu.entity.User; 5 | 6 | public interface UserService { 7 | 8 | Result login(User user); 9 | 10 | Result resetPwd(User user); 11 | 12 | Result modifyPwd(User user); 13 | 14 | Integer getUserType(String id); 15 | 16 | Result deleteUser(User user); 17 | } 18 | -------------------------------------------------------------------------------- /src/main/java/com/imu/service/impl/AdminServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.imu.service.impl; 2 | 3 | import java.util.List; 4 | 5 | import javax.annotation.Resource; 6 | 7 | import org.springframework.stereotype.Service; 8 | 9 | import com.imu.dao.AdminDAO; 10 | import com.imu.entity.Admin; 11 | import com.imu.entity.Page; 12 | import com.imu.entity.User; 13 | import com.imu.service.AdminService; 14 | 15 | @Service 16 | public class AdminServiceImpl implements AdminService{ 17 | 18 | @Resource 19 | private AdminDAO adminDAO; 20 | @Override 21 | public User login(User user) { 22 | return this.adminDAO.login(user); 23 | } 24 | @Override 25 | public Admin getAdminById(String id) { 26 | return this.adminDAO.getAdminById(id); 27 | } 28 | @Override 29 | public Integer add(Admin admin) { 30 | return this.adminDAO.add(admin); 31 | } 32 | @Override 33 | public Integer getByKeyCount(String key) { 34 | return this.adminDAO.getByKeyCount(key); 35 | } 36 | @Override 37 | public List getByKey(String key, Page page) { 38 | return this.adminDAO.getByKey(key, page); 39 | } 40 | @Override 41 | public Integer resetPwd(User user) { 42 | return this.adminDAO.resetPwd(user); 43 | } 44 | 45 | 46 | } 47 | -------------------------------------------------------------------------------- /src/main/java/com/imu/service/impl/FileServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.imu.service.impl; 2 | 3 | import javax.annotation.Resource; 4 | 5 | import org.springframework.stereotype.Service; 6 | 7 | import com.imu.dao.FileDAO; 8 | import com.imu.entity.File; 9 | import com.imu.service.FileService; 10 | 11 | @Service 12 | public class FileServiceImpl implements FileService{ 13 | 14 | @Resource 15 | private FileDAO fileDAO; 16 | @Override 17 | public int add(File file) { 18 | return this.fileDAO.add(file); 19 | } 20 | @Override 21 | public File getFileById(int id) { 22 | return this.fileDAO.getFileById(id); 23 | } 24 | 25 | 26 | } 27 | -------------------------------------------------------------------------------- /src/main/java/com/imu/service/impl/MessageServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.imu.service.impl; 2 | 3 | import java.util.List; 4 | 5 | import javax.annotation.Resource; 6 | 7 | import org.springframework.stereotype.Service; 8 | 9 | import com.imu.dao.MessageDAO; 10 | import com.imu.entity.Message; 11 | import com.imu.param.MessageParam; 12 | import com.imu.service.MessageService; 13 | 14 | @Service 15 | public class MessageServiceImpl implements MessageService{ 16 | 17 | @Resource 18 | private MessageDAO messageDAO; 19 | @Override 20 | public Integer add(Message msg) { 21 | return this.messageDAO.add(msg); 22 | } 23 | @Override 24 | public List getMessageList(MessageParam param) { 25 | return this.messageDAO.getMessageList(param); 26 | } 27 | 28 | 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/com/imu/service/impl/StudentServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.imu.service.impl; 2 | 3 | import java.util.List; 4 | 5 | import javax.annotation.Resource; 6 | 7 | import org.springframework.stereotype.Service; 8 | 9 | import com.imu.dao.StudentDAO; 10 | import com.imu.entity.Page; 11 | import com.imu.entity.Student; 12 | import com.imu.entity.User; 13 | import com.imu.service.StudentService; 14 | 15 | @Service 16 | public class StudentServiceImpl implements StudentService{ 17 | 18 | @Resource 19 | private StudentDAO studentDAO; 20 | 21 | 22 | @Override 23 | public User login(User user) { 24 | return this.studentDAO.login(user); 25 | } 26 | @Override 27 | public Integer add(Student student) { 28 | return this.studentDAO.add(student); 29 | } 30 | @Override 31 | public Student getStuInfoById(String id) { 32 | return this.studentDAO.get(id); 33 | } 34 | @Override 35 | public List getByKey(String key,Page page) { 36 | return this.studentDAO.getByKey(key,page); 37 | } 38 | @Override 39 | public Integer getByKeyCount(String key) { 40 | return this.studentDAO.getByKeyCount(key); 41 | } 42 | @Override 43 | public Integer resetPwd(User user) { 44 | return this.studentDAO.resetPwd(user); 45 | } 46 | @Override 47 | public Integer getStatusCount(int status) { 48 | return this.studentDAO.getStatusCount(status); 49 | } 50 | @Override 51 | public Integer update(Student student) { 52 | return this.studentDAO.update(student); 53 | } 54 | @Override 55 | public Integer updateStatus(Student student) { 56 | return this.studentDAO.updateStatus(student); 57 | } 58 | @Override 59 | public Integer updateStatusAddOne(String id) { 60 | return this.studentDAO.updateStatusAddOne(id); 61 | } 62 | 63 | 64 | } 65 | -------------------------------------------------------------------------------- /src/main/java/com/imu/service/impl/TeacherServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.imu.service.impl; 2 | 3 | import java.util.List; 4 | 5 | import javax.annotation.Resource; 6 | 7 | import org.springframework.stereotype.Service; 8 | 9 | import com.imu.dao.TeacherDAO; 10 | import com.imu.entity.Page; 11 | import com.imu.entity.Teacher; 12 | import com.imu.entity.User; 13 | import com.imu.service.TeacherService; 14 | 15 | @Service 16 | public class TeacherServiceImpl implements TeacherService{ 17 | 18 | @Resource 19 | private TeacherDAO teacherDAO; 20 | @Override 21 | public User login(User user) { 22 | return this.teacherDAO.login(user); 23 | } 24 | @Override 25 | public Teacher isTeacher(String id) { 26 | return teacherDAO.isTeacher(id); 27 | } 28 | @Override 29 | public Teacher getTeacherById(String id) { 30 | return this.teacherDAO.getTeacherById(id); 31 | } 32 | @Override 33 | public Integer add(Teacher teacher) { 34 | return this.teacherDAO.add(teacher); 35 | } 36 | @Override 37 | public Integer getByKeyCount(String key) { 38 | return this.teacherDAO.getByKeyCount(key); 39 | } 40 | @Override 41 | public List getByKey(String key, Page page) { 42 | return this.teacherDAO.getByKey(key, page); 43 | } 44 | @Override 45 | public Integer resetPwd(User user) { 46 | return this.teacherDAO.resetPwd(user); 47 | } 48 | @Override 49 | public Integer update(Teacher teacher,int a) { 50 | return this.teacherDAO.update(teacher,a); 51 | } 52 | @Override 53 | public Teacher getSecretaryById(String id) { 54 | return this.teacherDAO.getSecretaryById(id); 55 | } 56 | 57 | } 58 | -------------------------------------------------------------------------------- /src/main/java/com/imu/service/impl/TopicMapServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.imu.service.impl; 2 | 3 | import java.util.List; 4 | 5 | import javax.annotation.Resource; 6 | 7 | import org.springframework.stereotype.Service; 8 | 9 | import com.imu.dao.TopicMapDAO; 10 | import com.imu.entity.Page; 11 | import com.imu.entity.TopicMap; 12 | import com.imu.service.TopicMapService; 13 | 14 | @Service 15 | public class TopicMapServiceImpl implements TopicMapService{ 16 | 17 | @Resource 18 | private TopicMapDAO topicMapDAO; 19 | 20 | @Override 21 | public Integer getTeacherCount(String id) { 22 | return this.topicMapDAO.getTeacherCount(id); 23 | } 24 | 25 | @Override 26 | public List getTeacherList(String id, Page page) { 27 | return this.topicMapDAO.getTeacherList(id, page); 28 | } 29 | 30 | @Override 31 | public Integer getStudentCount(String id) { 32 | return this.topicMapDAO.getStudentCount(id); 33 | } 34 | 35 | @Override 36 | public List getStudentList(String id, Page page) { 37 | return this.topicMapDAO.getStudentList(id, page); 38 | } 39 | 40 | @Override 41 | public Integer add(TopicMap topicMap) { 42 | return this.topicMapDAO.add(topicMap); 43 | } 44 | 45 | @Override 46 | public TopicMap get(int id) { 47 | return this.topicMapDAO.get(id); 48 | } 49 | 50 | @Override 51 | public List check(int id, String studentId) { 52 | return this.topicMapDAO.check(id, studentId); 53 | } 54 | 55 | @Override 56 | public Integer update(TopicMap topicMap) { 57 | return this.topicMapDAO.update(topicMap); 58 | } 59 | 60 | @Override 61 | public List getTopicList(int id) { 62 | return this.topicMapDAO.getTopicList(id); 63 | } 64 | 65 | @Override 66 | public List getStudentAllList(String id) { 67 | return this.topicMapDAO.getStudentAllList(id); 68 | } 69 | 70 | 71 | } 72 | -------------------------------------------------------------------------------- /src/main/java/com/imu/service/impl/TopicServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.imu.service.impl; 2 | 3 | import java.util.List; 4 | 5 | import javax.annotation.Resource; 6 | 7 | import org.springframework.stereotype.Service; 8 | 9 | import com.imu.dao.TopicDAO; 10 | import com.imu.entity.Page; 11 | import com.imu.entity.Topic; 12 | import com.imu.service.TopicService; 13 | 14 | @Service 15 | public class TopicServiceImpl implements TopicService{ 16 | 17 | @Resource 18 | private TopicDAO topicDAO; 19 | @Override 20 | public Integer getByKeyCount(String key) { 21 | return this.topicDAO.getByKeyCount(key); 22 | } 23 | 24 | @Override 25 | public List getByKey(String key, Page page) { 26 | return this.topicDAO.getByKey(key, page); 27 | } 28 | 29 | @Override 30 | public Integer getSecretaryCount(String id) { 31 | return this.topicDAO.getSecretaryCount(id); 32 | } 33 | 34 | @Override 35 | public Integer getTeacherCount(String id) { 36 | return this.topicDAO.getTeacherCount(id); 37 | } 38 | 39 | @Override 40 | public Integer getStudentCount(String id) { 41 | return this.topicDAO.getStudentCount(id); 42 | } 43 | 44 | @Override 45 | public Integer add(Topic topic) { 46 | return this.topicDAO.add(topic); 47 | } 48 | 49 | @Override 50 | public List getMyTopic(String id, Page page) { 51 | return this.topicDAO.getMyTopic(id, page); 52 | } 53 | 54 | @Override 55 | public Integer getMyTopicCount(String id) { 56 | return this.topicDAO.getMyTopicCount(id); 57 | } 58 | 59 | @Override 60 | public Topic get(int id) { 61 | return this.topicDAO.get(id); 62 | } 63 | 64 | @Override 65 | public Integer update(Topic topic) { 66 | return this.topicDAO.update(topic); 67 | } 68 | 69 | @Override 70 | public Integer endStage(int id) { 71 | return this.topicDAO.endStage(id); 72 | } 73 | 74 | @Override 75 | public List getSecretaryTopic(String id, Page page) { 76 | return this.topicDAO.getSecretaryTopic(id, page); 77 | } 78 | 79 | 80 | } 81 | -------------------------------------------------------------------------------- /src/main/java/com/imu/service/impl/UserServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.imu.service.impl; 2 | 3 | import javax.annotation.Resource; 4 | import javax.servlet.http.HttpServletRequest; 5 | import javax.servlet.http.HttpSession; 6 | 7 | import org.springframework.stereotype.Service; 8 | import org.springframework.web.context.request.RequestContextHolder; 9 | import org.springframework.web.context.request.ServletRequestAttributes; 10 | 11 | import com.imu.dao.AdminDAO; 12 | import com.imu.dao.StudentDAO; 13 | import com.imu.dao.TeacherDAO; 14 | import com.imu.dao.TopicDAO; 15 | import com.imu.dto.Result; 16 | import com.imu.entity.Admin; 17 | import com.imu.entity.Student; 18 | import com.imu.entity.Teacher; 19 | import com.imu.entity.User; 20 | import com.imu.enums.UserTypeEnum; 21 | import com.imu.service.UserService; 22 | import com.imu.util.MD5Util; 23 | import com.imu.util.TimeUtil; 24 | 25 | @Service 26 | public class UserServiceImpl implements UserService{ 27 | 28 | @Resource 29 | private StudentDAO studentDAO; 30 | @Resource 31 | private TeacherDAO teacherDAO; 32 | @Resource 33 | private AdminDAO adminDAO; 34 | @Resource 35 | private TopicDAO topicDAO; 36 | protected HttpServletRequest getServletRequest() { 37 | return ((ServletRequestAttributes)RequestContextHolder.getRequestAttributes()).getRequest(); 38 | } 39 | 40 | @Override 41 | public Result login(User user) { 42 | HttpServletRequest request = getServletRequest(); 43 | HttpSession session = request.getSession(); 44 | user.setPassword(MD5Util.md5(user.getPassword())); 45 | Result res= new Result(); 46 | User loginSt = studentDAO.login(user); 47 | if (loginSt != null) { 48 | loginSt.setType(0); 49 | Student st =studentDAO.get(loginSt.getId()); 50 | st.setLastLoginTime(TimeUtil.currentTime()); 51 | studentDAO.update(st); 52 | session.setAttribute("stuStatus", st.getStatus()); 53 | session.setAttribute("user", loginSt); 54 | res.setMessage("登录成功,马上转到系统..."); 55 | res.setStatusCode("1"); 56 | return res; 57 | } else { 58 | User loginTeacher = teacherDAO.login(user); 59 | if (loginTeacher != null) { 60 | loginTeacher.setType(1); 61 | Teacher tea=teacherDAO.getTeacherById(loginTeacher.getId()); 62 | tea.setLastLoginTime(TimeUtil.currentTime()); 63 | teacherDAO.update(tea,0); 64 | loginTeacher.setType(tea.getType()+1); 65 | session.setAttribute("user", loginTeacher); 66 | res.setMessage("登录成功,马上转到系统..."); 67 | res.setStatusCode("1"); 68 | return res; 69 | } else { 70 | User loginAdmin = adminDAO.login(user); 71 | if (loginAdmin != null) { 72 | loginAdmin.setType(3); 73 | session.setAttribute("user", loginAdmin); 74 | res.setMessage("登录成功,马上转到系统..."); 75 | res.setStatusCode("1"); 76 | return res; 77 | } else { 78 | res.setStatusCode("0"); 79 | res.setMessage("登录失败,用户名或密码有误。"); 80 | return res; 81 | } 82 | } 83 | } 84 | } 85 | 86 | @Override 87 | public Result resetPwd(User user) { 88 | int res=0; 89 | Result result = new Result(); 90 | user.setPassword(MD5Util.md5(user.getId())); 91 | if(user.getType()==UserTypeEnum.ADMIN.getCode()) 92 | { 93 | res=adminDAO.resetPwd(user); 94 | } 95 | if(user.getType()==UserTypeEnum.SECRETARY.getCode()) 96 | { 97 | res=teacherDAO.resetPwd(user); 98 | } 99 | if(user.getType()==UserTypeEnum.STUDENT.getCode()) 100 | { 101 | res=studentDAO.resetPwd(user); 102 | } 103 | if(user.getType()==UserTypeEnum.TEACHER.getCode()) 104 | { 105 | res=teacherDAO.resetPwd(user); 106 | } 107 | if(res!=0) { 108 | result.setMessage("重置成功"); 109 | result.setStatusCode("1"); 110 | } 111 | else 112 | { 113 | result.setMessage("重置失败"); 114 | result.setStatusCode("0"); 115 | } 116 | return result; 117 | } 118 | 119 | @Override 120 | public Result modifyPwd(User user) { 121 | int res=0; 122 | Result result = new Result(); 123 | if(user.getType()==UserTypeEnum.ADMIN.getCode()) 124 | { 125 | res=adminDAO.resetPwd(user); 126 | } 127 | if(user.getType()==UserTypeEnum.SECRETARY.getCode()) 128 | { 129 | res=teacherDAO.resetPwd(user); 130 | } 131 | if(user.getType()==UserTypeEnum.STUDENT.getCode()) 132 | { 133 | res=studentDAO.resetPwd(user); 134 | } 135 | if(user.getType()==UserTypeEnum.TEACHER.getCode()) 136 | { 137 | res=teacherDAO.resetPwd(user); 138 | } 139 | if(res!=0) { 140 | result.setMessage("修改成功"); 141 | result.setStatusCode("1"); 142 | } 143 | else 144 | { 145 | result.setMessage("修改失败"); 146 | result.setStatusCode("0"); 147 | } 148 | return result; 149 | } 150 | 151 | @Override 152 | public Integer getUserType(String id) { 153 | int res= 4; 154 | Student student=studentDAO.get(id); 155 | if(student!=null) 156 | { 157 | res=UserTypeEnum.STUDENT.getCode(); 158 | return res; 159 | } 160 | Teacher teacher = teacherDAO.getTeacherById(id); 161 | if(teacher!=null) 162 | { 163 | if(teacher.getType()==0) 164 | res=UserTypeEnum.TEACHER.getCode(); 165 | else 166 | res=UserTypeEnum.SECRETARY.getCode(); 167 | return res; 168 | } 169 | Admin admin = adminDAO.getAdminById(id); 170 | if(admin!=null) 171 | { 172 | res=UserTypeEnum.ADMIN.getCode(); 173 | return res; 174 | } 175 | return res; 176 | } 177 | 178 | @Override 179 | public Result deleteUser(User user) { 180 | int res=0; 181 | Result result = new Result(); 182 | if(user.getType()==UserTypeEnum.ADMIN.getCode()) 183 | { 184 | res=adminDAO.delete(user.getId()); 185 | } 186 | if(user.getType()==UserTypeEnum.SECRETARY.getCode()) 187 | { 188 | int total = topicDAO.getSecretaryCount(user.getId()); 189 | if(total>0) 190 | { 191 | result.setMessage("删除失败"); 192 | result.setStatusCode("0"); 193 | return result; 194 | } 195 | res=teacherDAO.delete(user.getId()); 196 | } 197 | if(user.getType()==UserTypeEnum.STUDENT.getCode()) 198 | { 199 | int total = topicDAO.getStudentCount(user.getId()); 200 | if(total>0) 201 | { 202 | result.setMessage("删除失败"); 203 | result.setStatusCode("0"); 204 | return result; 205 | } 206 | res=studentDAO.delete(user.getId()); 207 | } 208 | if(user.getType()==UserTypeEnum.TEACHER.getCode()) 209 | { 210 | int total = topicDAO.getTeacherCount(user.getId()); 211 | if(total>0) 212 | { 213 | result.setMessage("删除失败"); 214 | result.setStatusCode("0"); 215 | return result; 216 | } 217 | res=teacherDAO.delete(user.getId()); 218 | } 219 | if(res!=0) { 220 | result.setMessage("删除成功"); 221 | result.setStatusCode("1"); 222 | } 223 | else 224 | { 225 | result.setMessage("删除失败"); 226 | result.setStatusCode("0"); 227 | } 228 | return result; 229 | } 230 | 231 | } 232 | -------------------------------------------------------------------------------- /src/main/java/com/imu/util/MD5Util.java: -------------------------------------------------------------------------------- 1 | package com.imu.util; 2 | 3 | import java.security.MessageDigest; 4 | 5 | public class MD5Util { 6 | 7 | public final static String md5(String password){ 8 | String md5Password; 9 | if(password.equals("")||password==null) 10 | { 11 | md5Password=""; 12 | } 13 | else 14 | md5Password=password; 15 | char hexDigits[]={ 16 | '0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f' 17 | }; 18 | try{ 19 | byte[] strTemp=md5Password.getBytes(); 20 | MessageDigest mdTemp=MessageDigest.getInstance("MD5"); 21 | mdTemp.update(strTemp); 22 | byte[] md= mdTemp.digest(); 23 | int j=md.length; 24 | char str[] = new char[j*2]; 25 | int k=0; 26 | for(int i=0;i>> 4 & 0xf]; 29 | str[k++] = hexDigits[byte0 &0xf]; 30 | } 31 | return new String(str); 32 | } 33 | catch(Exception e){ 34 | return null; 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/main/java/com/imu/util/PageUtil.java: -------------------------------------------------------------------------------- 1 | package com.imu.util; 2 | 3 | import com.imu.entity.Page; 4 | 5 | public class PageUtil { 6 | public static Page createPage(int pageSize,int totalCount,int currentPage) { 7 | pageSize = getPageSize(pageSize); 8 | currentPage = getCurrentPage(currentPage); 9 | int totalPage = getTotalPage(pageSize, totalCount); 10 | int beginIndex = getBeginIndex(pageSize, currentPage); 11 | int endIndex = beginIndex+pageSize; 12 | boolean hasPrePage = getHasPrePage(currentPage); 13 | boolean hasNextPage = getHasNextPage(totalPage, currentPage); 14 | return new Page(pageSize, totalCount, totalPage, currentPage, 15 | beginIndex, endIndex, hasPrePage, hasNextPage); 16 | } 17 | 18 | public static Page createPage(Page page,int totalCount) { 19 | int pageSize = getPageSize(page.getPageSize()); 20 | int currentPage = getCurrentPage(page.getCurrentPage()); 21 | int totalPage = getTotalPage(pageSize, totalCount); 22 | int beginIndex = getBeginIndex(pageSize, currentPage); 23 | int endIndex = beginIndex+pageSize; 24 | boolean hasPrePage = getHasPrePage(currentPage); 25 | boolean hasNextPage = getHasNextPage(totalPage, currentPage); 26 | return new Page(pageSize, totalCount, totalPage, currentPage, 27 | beginIndex, endIndex,hasPrePage, hasNextPage); 28 | } 29 | 30 | //设置每页显示记录数 31 | public static int getPageSize(int pageSize) { 32 | return pageSize == 0 ? 10 : pageSize; 33 | } 34 | 35 | //设置当前页 36 | public static int getCurrentPage(int currentPage) { 37 | return currentPage == 0 ? 1 : currentPage; 38 | } 39 | 40 | //设置总页数,需要总记录数,每页显示多少 41 | public static int getTotalPage(int pageSize,int totalCount) { 42 | int totalPage = 0; 43 | if(totalCount % pageSize == 0) { 44 | totalPage = totalCount / pageSize; 45 | } else { 46 | totalPage = totalCount / pageSize + 1; 47 | } 48 | return totalPage; 49 | } 50 | 51 | //设置起始点,需要每页显示多少,当前页 52 | public static int getBeginIndex(int pageSize,int currentPage) { 53 | return (currentPage - 1) * pageSize; 54 | } 55 | 56 | //设置是否有上一页,需要当前页 57 | public static boolean getHasPrePage(int currentPage) { 58 | return currentPage == 1 ? false : true; 59 | } 60 | 61 | //设置是否有下一个,需要总页数和当前页 62 | public static boolean getHasNextPage(int totalPage, int currentPage) { 63 | return currentPage == totalPage || totalPage == 0 ? false : true; 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /src/main/java/com/imu/util/TimeUtil.java: -------------------------------------------------------------------------------- 1 | package com.imu.util; 2 | 3 | import java.sql.Timestamp; 4 | import java.text.DateFormat; 5 | import java.text.SimpleDateFormat; 6 | import java.util.Date; 7 | 8 | public class TimeUtil { 9 | public static SimpleDateFormat dateformatAll= new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); 10 | public static Timestamp currentTime(){ 11 | return new Timestamp(System.currentTimeMillis()); 12 | } 13 | public static String getTimeWithoutMilliSecond(Timestamp time){ 14 | return dateformatAll.format(time); 15 | }; 16 | 17 | public static String formatTime(Date time) { 18 | return dateformatAll.format(time); 19 | } 20 | 21 | public static String miniuiTime(Date time) { 22 | String str=dateformatAll.format(time); 23 | String[] temp=str.split(" "); 24 | return temp[0]+"T"+temp[1]; 25 | } 26 | 27 | public static String getTimeFilePath() { 28 | Date date = new Date(); 29 | return "/"+(date.getYear()+1900)+"/"+ 30 | ((date.getMonth()+1)<10 ?"0"+(date.getMonth()+1): (date.getMonth()+1) )+"/"+ 31 | (date.getDate()<10 ?"0"+date.getDate():date.getDate())+"/"+ 32 | (date.getHours()<10?"0"+date.getHours():date.getHours())+ 33 | (date.getMinutes()<10?"0"+date.getMinutes():date.getMinutes())+ 34 | (date.getSeconds()<10?"0"+date.getSeconds():date.getSeconds()); 35 | } 36 | public static Timestamp ToDate(Object o){ 37 | try{ 38 | if(o.getClass() == String.class){ 39 | 40 | 41 | DateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); 42 | o = format.parse(o.toString()); 43 | return new java.sql.Timestamp(((Date)o).getTime()); 44 | } 45 | return o != null ? new java.sql.Timestamp(((Date)o).getTime()) : null; 46 | }catch(Exception ex){ 47 | return null; 48 | } 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /src/main/resources/jdbc.properties: -------------------------------------------------------------------------------- 1 | driver=com.mysql.jdbc.Driver 2 | url=jdbc:mysql://localhost:3306/gss 3 | username=root 4 | password=123456 5 | #\u5B9A\u4E49\u521D\u59CB\u8FDE\u63A5\u6570 6 | initialSize=0 7 | #\u5B9A\u4E49\u6700\u5927\u8FDE\u63A5\u6570 8 | maxActive=20 9 | #\u5B9A\u4E49\u6700\u5927\u7A7A\u95F2 10 | maxIdle=20 11 | #\u5B9A\u4E49\u6700\u5C0F\u7A7A\u95F2 12 | minIdle=1 13 | #\u5B9A\u4E49\u6700\u957F\u7B49\u5F85\u65F6\u95F4 14 | maxWait=60000 -------------------------------------------------------------------------------- /src/main/resources/log4j.properties: -------------------------------------------------------------------------------- 1 | log4j.rootLogger=INFO,Console,File 2 | #\u5B9A\u4E49\u65E5\u5FD7\u8F93\u51FA\u76EE\u7684\u5730\u4E3A\u63A7\u5236\u53F0 3 | log4j.appender.Console=org.apache.log4j.ConsoleAppender 4 | log4j.appender.Console.Target=System.out 5 | #\u53EF\u4EE5\u7075\u6D3B\u5730\u6307\u5B9A\u65E5\u5FD7\u8F93\u51FA\u683C\u5F0F\uFF0C\u4E0B\u9762\u4E00\u884C\u662F\u6307\u5B9A\u5177\u4F53\u7684\u683C\u5F0F 6 | log4j.appender.Console.layout = org.apache.log4j.PatternLayout 7 | log4j.appender.Console.layout.ConversionPattern=[%c] - %m%n 8 | 9 | #\u6587\u4EF6\u5927\u5C0F\u5230\u8FBE\u6307\u5B9A\u5C3A\u5BF8\u7684\u65F6\u5019\u4EA7\u751F\u4E00\u4E2A\u65B0\u7684\u6587\u4EF6 10 | log4j.appender.File = org.apache.log4j.RollingFileAppender 11 | #\u6307\u5B9A\u8F93\u51FA\u76EE\u5F55 12 | log4j.appender.File.File = logs/ssm.log 13 | #\u5B9A\u4E49\u6587\u4EF6\u6700\u5927\u5927\u5C0F 14 | log4j.appender.File.MaxFileSize = 10MB 15 | # \u8F93\u51FA\u6240\u4EE5\u65E5\u5FD7\uFF0C\u5982\u679C\u6362\u6210DEBUG\u8868\u793A\u8F93\u51FADEBUG\u4EE5\u4E0A\u7EA7\u522B\u65E5\u5FD7 16 | log4j.appender.File.Threshold = ALL 17 | log4j.appender.File.layout = org.apache.log4j.PatternLayout 18 | log4j.appender.File.layout.ConversionPattern =[%p] [%d{yyyy-MM-dd HH\:mm\:ss}][%c]%m%n -------------------------------------------------------------------------------- /src/main/resources/spring-mvc.xml: -------------------------------------------------------------------------------- 1 | 2 | 12 | 13 | 14 | 15 | 16 | 18 | 19 | 20 | text/html;charset=UTF-8 21 | 22 | 23 | 24 | 25 | 26 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /src/main/resources/spring-mybatis.xml: -------------------------------------------------------------------------------- 1 | 2 | 12 | 13 | 14 | 15 | 17 | 18 | 19 | 20 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 54 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /src/main/webapp/404.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> 2 | 3 | 4 | 5 | 6 | 404 | 选题系统 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 |
29 |
30 |
31 |
32 |

404

33 | 34 |
35 |

ERROR:404

36 |
37 |
38 | 转跳到主页 39 |
40 |
41 |
42 |
43 |
44 |
45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /src/main/webapp/405.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> 2 | 3 | 4 | 5 | 6 | 405 | 选题系统 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 |
29 |
30 |
31 |
32 |

405

33 | 34 |
35 |

ERROR:405

36 |
37 |
38 | 转跳到主页 39 |
40 |
41 |
42 |
43 |
44 |
45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/web.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | Archetype Created Web Application 7 | 8 | 9 | contextConfigLocation 10 | classpath:spring-mybatis.xml 11 | 12 | 13 | 14 | encodingFilter 15 | org.springframework.web.filter.CharacterEncodingFilter 16 | true 17 | 18 | encoding 19 | UTF-8 20 | 21 | 22 | 23 | encodingFilter 24 | /* 25 | 26 | 27 | 28 | org.springframework.web.context.ContextLoaderListener 29 | 30 | 31 | 32 | org.springframework.web.util.IntrospectorCleanupListener 33 | 34 | 35 | 36 | 37 | SpringMVC 38 | org.springframework.web.servlet.DispatcherServlet 39 | 40 | contextConfigLocation 41 | classpath:spring-mvc.xml 42 | 43 | 1 44 | true 45 | 46 | 47 | SpringMVC 48 | 49 | / 50 | 51 | 52 | /login.jsp 53 | 54 | 55 | -------------------------------------------------------------------------------- /src/main/webapp/assets/css/btu.css: -------------------------------------------------------------------------------- 1 | .pagenav{ 2 | padding-top: 9px; 3 | text-align: center; 4 | padding-bottom: 4px; 5 | } 6 | .pagenav ul li{ 7 | display: inline-block; 8 | } 9 | .btu{ 10 | display: inline-block; 11 | padding: 4px 12px; 12 | margin-bottom: 0; 13 | font-size: 13px; 14 | line-height: 22px; 15 | text-align: center; 16 | vertical-align: middle; 17 | cursor: pointer; 18 | color: #333333; 19 | text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75); 20 | background-color: whitesmoke; 21 | background-image: -moz-linear-gradient(top, white, #e6e6e6); 22 | background-image: -webkit-gradient(linear, 0 0, 0 100%, from(white), to(#e6e6e6)); 23 | background-image: -webkit-linear-gradient(top, white, #e6e6e6); 24 | background-image: -o-linear-gradient(top, white, #e6e6e6); 25 | background-image: linear-gradient(to bottom, #ffffff, #e6e6e6); 26 | background-repeat: repeat-x; 27 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFE6E6E6', GradientType=0); 28 | border-color: #e6e6e6 #e6e6e6 #bfbfbf; 29 | border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); 30 | filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); 31 | border: 1px solid #bbbbbb; 32 | border-bottom-color: #a2a2a2; 33 | -webkit-border-radius: 4px; 34 | -moz-border-radius: 4px; 35 | border-radius: 4px; 36 | -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); 37 | -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); 38 | box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); 39 | } 40 | .btu.active, .btu:active { 41 | background-image: none; 42 | outline: 0; 43 | background: #8A8A8A; 44 | -webkit-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05); 45 | -moz-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05); 46 | box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05); 47 | } -------------------------------------------------------------------------------- /src/main/webapp/assets/css/demo.css: -------------------------------------------------------------------------------- 1 | /* All styles created for demo purposes only, you may not need this for your project */ 2 | .demo-button button { 3 | margin-bottom: 5px; } 4 | 5 | .demo-icons li { 6 | margin-bottom: 50px; 7 | text-align: center; } 8 | 9 | .demo-icons .lnr, 10 | .demo-icons .fa { 11 | font-size: 28px; } 12 | 13 | .demo-icons .cssclass { 14 | display: block; 15 | margin-top: 5px; 16 | margin-left: 5px; } 17 | 18 | /*# sourceMappingURL=demo.css.map */ -------------------------------------------------------------------------------- /src/main/webapp/assets/css/demo.css.map: -------------------------------------------------------------------------------- 1 | { 2 | "version": 3, 3 | "file": "demo.css", 4 | "sources": [ 5 | "../../sass/demo.scss", 6 | "../../sass/mixins/_css3.scss" 7 | ], 8 | "names": [], 9 | "mappings": "AAAA,uFAAuF;AAGvF,AACC,YADW,CACX,MAAM,CAAC;EACN,aAAa,EAAE,GAAG,GAClB;;AAGF,AACC,WADU,CACV,EAAE,CAAC;EACF,aAAa,EAAE,IAAI;EACnB,UAAU,EAAE,MAAM,GAClB;;AAJF,AAMC,WANU,CAMV,IAAI;AANL,AAOC,WAPU,CAOV,GAAG,CAAC;EACH,SAAS,EAAE,IAAI,GACf;;AATF,AAWC,WAXU,CAWV,SAAS,CAAC;EACT,OAAO,EAAE,KAAK;EACd,UAAU,EAAE,GAAG;EACf,WAAW,EAAE,GAAG,GAChB" 10 | } -------------------------------------------------------------------------------- /src/main/webapp/assets/img/apple-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/songyaxu/gss/c0cf44128564097e61041dbe2825ece3e2db7071/src/main/webapp/assets/img/apple-icon.png -------------------------------------------------------------------------------- /src/main/webapp/assets/img/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/songyaxu/gss/c0cf44128564097e61041dbe2825ece3e2db7071/src/main/webapp/assets/img/favicon.png -------------------------------------------------------------------------------- /src/main/webapp/assets/img/login-bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/songyaxu/gss/c0cf44128564097e61041dbe2825ece3e2db7071/src/main/webapp/assets/img/login-bg.jpg -------------------------------------------------------------------------------- /src/main/webapp/assets/img/logo-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/songyaxu/gss/c0cf44128564097e61041dbe2825ece3e2db7071/src/main/webapp/assets/img/logo-dark.png -------------------------------------------------------------------------------- /src/main/webapp/assets/img/profile-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/songyaxu/gss/c0cf44128564097e61041dbe2825ece3e2db7071/src/main/webapp/assets/img/profile-bg.png -------------------------------------------------------------------------------- /src/main/webapp/assets/img/user-medium.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/songyaxu/gss/c0cf44128564097e61041dbe2825ece3e2db7071/src/main/webapp/assets/img/user-medium.png -------------------------------------------------------------------------------- /src/main/webapp/assets/img/user.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/songyaxu/gss/c0cf44128564097e61041dbe2825ece3e2db7071/src/main/webapp/assets/img/user.png -------------------------------------------------------------------------------- /src/main/webapp/assets/img/user1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/songyaxu/gss/c0cf44128564097e61041dbe2825ece3e2db7071/src/main/webapp/assets/img/user1.png -------------------------------------------------------------------------------- /src/main/webapp/assets/img/user2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/songyaxu/gss/c0cf44128564097e61041dbe2825ece3e2db7071/src/main/webapp/assets/img/user2.png -------------------------------------------------------------------------------- /src/main/webapp/assets/img/user3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/songyaxu/gss/c0cf44128564097e61041dbe2825ece3e2db7071/src/main/webapp/assets/img/user3.png -------------------------------------------------------------------------------- /src/main/webapp/assets/img/user4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/songyaxu/gss/c0cf44128564097e61041dbe2825ece3e2db7071/src/main/webapp/assets/img/user4.png -------------------------------------------------------------------------------- /src/main/webapp/assets/img/user5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/songyaxu/gss/c0cf44128564097e61041dbe2825ece3e2db7071/src/main/webapp/assets/img/user5.png -------------------------------------------------------------------------------- /src/main/webapp/assets/layer/mobile/layer.js: -------------------------------------------------------------------------------- 1 | /*! layer mobile-v2.0.0 Web弹层组件 MIT License http://layer.layui.com/mobile By 贤心 */ 2 | ;!function(e){"use strict";var t=document,n="querySelectorAll",i="getElementsByClassName",a=function(e){return t[n](e)},s={type:0,shade:!0,shadeClose:!0,fixed:!0,anim:"scale"},l={extend:function(e){var t=JSON.parse(JSON.stringify(s));for(var n in e)t[n]=e[n];return t},timer:{},end:{}};l.touch=function(e,t){e.addEventListener("click",function(e){t.call(this,e)},!1)};var r=0,o=["layui-m-layer"],c=function(e){var t=this;t.config=l.extend(e),t.view()};c.prototype.view=function(){var e=this,n=e.config,s=t.createElement("div");e.id=s.id=o[0]+r,s.setAttribute("class",o[0]+" "+o[0]+(n.type||0)),s.setAttribute("index",r);var l=function(){var e="object"==typeof n.title;return n.title?'

'+(e?n.title[0]:n.title)+"

":""}(),c=function(){"string"==typeof n.btn&&(n.btn=[n.btn]);var e,t=(n.btn||[]).length;return 0!==t&&n.btn?(e=''+n.btn[0]+"",2===t&&(e=''+n.btn[1]+""+e),'
'+e+"
"):""}();if(n.fixed||(n.top=n.hasOwnProperty("top")?n.top:100,n.style=n.style||"",n.style+=" top:"+(t.body.scrollTop+n.top)+"px"),2===n.type&&(n.content='

'+(n.content||"")+"

"),n.skin&&(n.anim="up"),"msg"===n.skin&&(n.shade=!1),s.innerHTML=(n.shade?"
':"")+'
"+l+'
'+n.content+"
"+c+"
",!n.type||2===n.type){var d=t[i](o[0]+n.type),y=d.length;y>=1&&layer.close(d[0].getAttribute("index"))}document.body.appendChild(s);var u=e.elem=a("#"+e.id)[0];n.success&&n.success(u),e.index=r++,e.action(n,u)},c.prototype.action=function(e,t){var n=this;e.time&&(l.timer[n.index]=setTimeout(function(){layer.close(n.index)},1e3*e.time));var a=function(){var t=this.getAttribute("type");0==t?(e.no&&e.no(),layer.close(n.index)):e.yes?e.yes(n.index):layer.close(n.index)};if(e.btn)for(var s=t[i]("layui-m-layerbtn")[0].children,r=s.length,o=0;odiv{line-height:22px;padding-top:7px;margin-bottom:20px;font-size:14px}.layui-m-layerbtn{display:box;display:-moz-box;display:-webkit-box;width:100%;height:50px;line-height:50px;font-size:0;border-top:1px solid #D0D0D0;background-color:#F2F2F2}.layui-m-layerbtn span{display:block;-moz-box-flex:1;box-flex:1;-webkit-box-flex:1;font-size:14px;cursor:pointer}.layui-m-layerbtn span[yes]{color:#40AFFE}.layui-m-layerbtn span[no]{border-right:1px solid #D0D0D0;border-radius:0 0 0 5px}.layui-m-layerbtn span:active{background-color:#F6F6F6}.layui-m-layerend{position:absolute;right:7px;top:10px;width:30px;height:30px;border:0;font-weight:400;background:0 0;cursor:pointer;-webkit-appearance:none;font-size:30px}.layui-m-layerend::after,.layui-m-layerend::before{position:absolute;left:5px;top:15px;content:'';width:18px;height:1px;background-color:#999;transform:rotate(45deg);-webkit-transform:rotate(45deg);border-radius:3px}.layui-m-layerend::after{transform:rotate(-45deg);-webkit-transform:rotate(-45deg)}body .layui-m-layer .layui-m-layer-footer{position:fixed;width:95%;max-width:100%;margin:0 auto;left:0;right:0;bottom:10px;background:0 0}.layui-m-layer-footer .layui-m-layercont{padding:20px;border-radius:5px 5px 0 0;background-color:rgba(255,255,255,.8)}.layui-m-layer-footer .layui-m-layerbtn{display:block;height:auto;background:0 0;border-top:none}.layui-m-layer-footer .layui-m-layerbtn span{background-color:rgba(255,255,255,.8)}.layui-m-layer-footer .layui-m-layerbtn span[no]{color:#FD482C;border-top:1px solid #c2c2c2;border-radius:0 0 5px 5px}.layui-m-layer-footer .layui-m-layerbtn span[yes]{margin-top:10px;border-radius:5px}body .layui-m-layer .layui-m-layer-msg{width:auto;max-width:90%;margin:0 auto;bottom:-150px;background-color:rgba(0,0,0,.7);color:#fff}.layui-m-layer-msg .layui-m-layercont{padding:10px 20px} -------------------------------------------------------------------------------- /src/main/webapp/assets/layer/theme/default/icon-ext.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/songyaxu/gss/c0cf44128564097e61041dbe2825ece3e2db7071/src/main/webapp/assets/layer/theme/default/icon-ext.png -------------------------------------------------------------------------------- /src/main/webapp/assets/layer/theme/default/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/songyaxu/gss/c0cf44128564097e61041dbe2825ece3e2db7071/src/main/webapp/assets/layer/theme/default/icon.png -------------------------------------------------------------------------------- /src/main/webapp/assets/layer/theme/default/loading-0.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/songyaxu/gss/c0cf44128564097e61041dbe2825ece3e2db7071/src/main/webapp/assets/layer/theme/default/loading-0.gif -------------------------------------------------------------------------------- /src/main/webapp/assets/layer/theme/default/loading-1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/songyaxu/gss/c0cf44128564097e61041dbe2825ece3e2db7071/src/main/webapp/assets/layer/theme/default/loading-1.gif -------------------------------------------------------------------------------- /src/main/webapp/assets/layer/theme/default/loading-2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/songyaxu/gss/c0cf44128564097e61041dbe2825ece3e2db7071/src/main/webapp/assets/layer/theme/default/loading-2.gif -------------------------------------------------------------------------------- /src/main/webapp/assets/scripts/gss.js: -------------------------------------------------------------------------------- 1 | $('input[id=attachment]').change( 2 | function() { 3 | var name=$(this).val(); 4 | var realname=name.split("\\"); 5 | $('#photoCover').val(realname[realname.length-1]); 6 | }); 7 | function up(type,id){ 8 | var formData = new FormData($( "#upForm" )[0]); 9 | $.ajax({ 10 | url: '/topic/upload/topic='+id+'/'+type, 11 | type: 'POST', 12 | data: formData, 13 | async: false, 14 | cache: false, 15 | contentType: false, 16 | processData: false, 17 | success: function (data) { 18 | if(data.statusCode=="1") 19 | { 20 | layer.msg(data.message, {icon: 1}); 21 | setTimeout(function () { 22 | window.location.reload(); 23 | }, 1500); 24 | } 25 | else{ 26 | layer.msg(data.message, {icon: 5}); 27 | } 28 | }, 29 | error: function (returndata) { 30 | layer.msg(data.message, {icon: 5}); 31 | } 32 | }); 33 | } 34 | 35 | function recordit(id){ 36 | var record = $("#record").val(); 37 | $.get("/topic/record/"+id,{ record:record}, 38 | function(data){ 39 | if(data.statusCode=="1"){ 40 | layer.msg(data.message, {icon: 1}); 41 | setTimeout(function () { 42 | window.location.reload(); 43 | }, 1500); 44 | } 45 | else{ 46 | layer.msg(data.message, {icon: 5}); 47 | } 48 | }); 49 | } -------------------------------------------------------------------------------- /src/main/webapp/assets/scripts/klorofil-common.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function() { 2 | 3 | /*-----------------------------------/ 4 | /* TOP NAVIGATION AND LAYOUT 5 | /*----------------------------------*/ 6 | 7 | $('.btn-toggle-fullwidth').on('click', function() { 8 | if(!$('body').hasClass('layout-fullwidth')) { 9 | $('body').addClass('layout-fullwidth'); 10 | 11 | } else { 12 | $('body').removeClass('layout-fullwidth'); 13 | $('body').removeClass('layout-default'); // also remove default behaviour if set 14 | } 15 | 16 | $(this).find('.lnr').toggleClass('lnr-arrow-left-circle lnr-arrow-right-circle'); 17 | 18 | if($(window).innerWidth() < 1025) { 19 | if(!$('body').hasClass('offcanvas-active')) { 20 | $('body').addClass('offcanvas-active'); 21 | } else { 22 | $('body').removeClass('offcanvas-active'); 23 | } 24 | } 25 | }); 26 | 27 | $(window).on('load', function() { 28 | if($(window).innerWidth() < 1025) { 29 | $('.btn-toggle-fullwidth').find('.icon-arrows') 30 | .removeClass('icon-arrows-move-left') 31 | .addClass('icon-arrows-move-right'); 32 | } 33 | 34 | // adjust right sidebar top position 35 | $('.right-sidebar').css('top', $('.navbar').innerHeight()); 36 | 37 | // if page has content-menu, set top padding of main-content 38 | if($('.has-content-menu').length > 0) { 39 | $('.navbar + .main-content').css('padding-top', $('.navbar').innerHeight()); 40 | } 41 | 42 | // for shorter main content 43 | if($('.main').height() < $('#sidebar-nav').height()) { 44 | $('.main').css('min-height', $('#sidebar-nav').height()); 45 | } 46 | }); 47 | 48 | 49 | /*-----------------------------------/ 50 | /* SIDEBAR NAVIGATION 51 | /*----------------------------------*/ 52 | 53 | $('.sidebar a[data-toggle="collapse"]').on('click', function() { 54 | if($(this).hasClass('collapsed')) { 55 | $(this).addClass('active'); 56 | } else { 57 | $(this).removeClass('active'); 58 | } 59 | }); 60 | 61 | if( $('.sidebar-scroll').length > 0 ) { 62 | $('.sidebar-scroll').slimScroll({ 63 | height: '95%', 64 | wheelStep: 2, 65 | }); 66 | } 67 | 68 | 69 | /*-----------------------------------/ 70 | /* PANEL FUNCTIONS 71 | /*----------------------------------*/ 72 | 73 | // panel remove 74 | $('.panel .btn-remove').click(function(e){ 75 | 76 | e.preventDefault(); 77 | $(this).parents('.panel').fadeOut(300, function(){ 78 | $(this).remove(); 79 | }); 80 | }); 81 | 82 | // panel collapse/expand 83 | var affectedElement = $('.panel-body'); 84 | 85 | $('.panel .btn-toggle-collapse').clickToggle( 86 | function(e) { 87 | e.preventDefault(); 88 | 89 | // if has scroll 90 | if( $(this).parents('.panel').find('.slimScrollDiv').length > 0 ) { 91 | affectedElement = $('.slimScrollDiv'); 92 | } 93 | 94 | $(this).parents('.panel').find(affectedElement).slideUp(300); 95 | $(this).find('i.lnr-chevron-up').toggleClass('lnr-chevron-down'); 96 | }, 97 | function(e) { 98 | e.preventDefault(); 99 | 100 | // if has scroll 101 | if( $(this).parents('.panel').find('.slimScrollDiv').length > 0 ) { 102 | affectedElement = $('.slimScrollDiv'); 103 | } 104 | 105 | $(this).parents('.panel').find(affectedElement).slideDown(300); 106 | $(this).find('i.lnr-chevron-up').toggleClass('lnr-chevron-down'); 107 | } 108 | ); 109 | 110 | 111 | /*-----------------------------------/ 112 | /* PANEL SCROLLING 113 | /*----------------------------------*/ 114 | 115 | if( $('.panel-scrolling').length > 0) { 116 | $('.panel-scrolling .panel-body').slimScroll({ 117 | height: '430px', 118 | wheelStep: 2, 119 | }); 120 | } 121 | 122 | if( $('#panel-scrolling-demo').length > 0) { 123 | $('#panel-scrolling-demo .panel-body').slimScroll({ 124 | height: '175px', 125 | wheelStep: 2, 126 | }); 127 | } 128 | 129 | /*-----------------------------------/ 130 | /* TODO LIST 131 | /*----------------------------------*/ 132 | 133 | $('.todo-list input').change( function() { 134 | if( $(this).prop('checked') ) { 135 | $(this).parents('li').addClass('completed'); 136 | }else { 137 | $(this).parents('li').removeClass('completed'); 138 | } 139 | }); 140 | 141 | 142 | /*-----------------------------------/ 143 | /* TOASTR NOTIFICATION 144 | /*----------------------------------*/ 145 | 146 | if($('#toastr-demo').length > 0) { 147 | toastr.options.timeOut = "false"; 148 | toastr.options.closeButton = true; 149 | toastr['info']('Hi there, this is notification demo with HTML support. So, you can add HTML elements like this link'); 150 | 151 | $('.btn-toastr').on('click', function() { 152 | $context = $(this).data('context'); 153 | $message = $(this).data('message'); 154 | $position = $(this).data('position'); 155 | 156 | if($context == '') { 157 | $context = 'info'; 158 | } 159 | 160 | if($position == '') { 161 | $positionClass = 'toast-left-top'; 162 | } else { 163 | $positionClass = 'toast-' + $position; 164 | } 165 | 166 | toastr.remove(); 167 | toastr[$context]($message, '' , { positionClass: $positionClass }); 168 | }); 169 | 170 | $('#toastr-callback1').on('click', function() { 171 | $message = $(this).data('message'); 172 | 173 | toastr.options = { 174 | "timeOut": "300", 175 | "onShown": function() { alert('onShown callback'); }, 176 | "onHidden": function() { alert('onHidden callback'); } 177 | } 178 | 179 | toastr['info']($message); 180 | }); 181 | 182 | $('#toastr-callback2').on('click', function() { 183 | $message = $(this).data('message'); 184 | 185 | toastr.options = { 186 | "timeOut": "10000", 187 | "onclick": function() { alert('onclick callback'); }, 188 | } 189 | 190 | toastr['info']($message); 191 | 192 | }); 193 | 194 | $('#toastr-callback3').on('click', function() { 195 | $message = $(this).data('message'); 196 | 197 | toastr.options = { 198 | "timeOut": "10000", 199 | "closeButton": true, 200 | "onCloseClick": function() { alert('onCloseClick callback'); } 201 | } 202 | 203 | toastr['info']($message); 204 | }); 205 | } 206 | }); 207 | 208 | // toggle function 209 | $.fn.clickToggle = function( f1, f2 ) { 210 | return this.each( function() { 211 | var clicked = false; 212 | $(this).bind('click', function() { 213 | if(clicked) { 214 | clicked = false; 215 | return f2.apply(this, arguments); 216 | } 217 | 218 | clicked = true; 219 | return f1.apply(this, arguments); 220 | }); 221 | }); 222 | 223 | } 224 | 225 | 226 | -------------------------------------------------------------------------------- /src/main/webapp/assets/vendor/bootstrap/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/songyaxu/gss/c0cf44128564097e61041dbe2825ece3e2db7071/src/main/webapp/assets/vendor/bootstrap/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /src/main/webapp/assets/vendor/bootstrap/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/songyaxu/gss/c0cf44128564097e61041dbe2825ece3e2db7071/src/main/webapp/assets/vendor/bootstrap/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /src/main/webapp/assets/vendor/bootstrap/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/songyaxu/gss/c0cf44128564097e61041dbe2825ece3e2db7071/src/main/webapp/assets/vendor/bootstrap/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /src/main/webapp/assets/vendor/bootstrap/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/songyaxu/gss/c0cf44128564097e61041dbe2825ece3e2db7071/src/main/webapp/assets/vendor/bootstrap/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /src/main/webapp/assets/vendor/bootstrap/js/npm.js: -------------------------------------------------------------------------------- 1 | // This file is autogenerated via the `commonjs` Grunt task. You can require() this file in a CommonJS environment. 2 | require('../../js/transition.js') 3 | require('../../js/alert.js') 4 | require('../../js/button.js') 5 | require('../../js/carousel.js') 6 | require('../../js/collapse.js') 7 | require('../../js/dropdown.js') 8 | require('../../js/modal.js') 9 | require('../../js/tooltip.js') 10 | require('../../js/popover.js') 11 | require('../../js/scrollspy.js') 12 | require('../../js/tab.js') 13 | require('../../js/affix.js') -------------------------------------------------------------------------------- /src/main/webapp/assets/vendor/font-awesome/fonts/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/songyaxu/gss/c0cf44128564097e61041dbe2825ece3e2db7071/src/main/webapp/assets/vendor/font-awesome/fonts/FontAwesome.otf -------------------------------------------------------------------------------- /src/main/webapp/assets/vendor/font-awesome/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/songyaxu/gss/c0cf44128564097e61041dbe2825ece3e2db7071/src/main/webapp/assets/vendor/font-awesome/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /src/main/webapp/assets/vendor/font-awesome/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/songyaxu/gss/c0cf44128564097e61041dbe2825ece3e2db7071/src/main/webapp/assets/vendor/font-awesome/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /src/main/webapp/assets/vendor/font-awesome/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/songyaxu/gss/c0cf44128564097e61041dbe2825ece3e2db7071/src/main/webapp/assets/vendor/font-awesome/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /src/main/webapp/assets/vendor/font-awesome/fonts/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/songyaxu/gss/c0cf44128564097e61041dbe2825ece3e2db7071/src/main/webapp/assets/vendor/font-awesome/fonts/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /src/main/webapp/assets/vendor/jquery-slimscroll/jquery.slimscroll.min.js: -------------------------------------------------------------------------------- 1 | /*! Copyright (c) 2011 Piotr Rochala (http://rocha.la) 2 | * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) 3 | * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses. 4 | * 5 | * Version: 1.3.0 6 | * 7 | */ 8 | (function(f){jQuery.fn.extend({slimScroll:function(h){var a=f.extend({width:"auto",height:"250px",size:"7px",color:"#000",position:"right",distance:"1px",start:"top",opacity:0.4,alwaysVisible:!1,disableFadeOut:!1,railVisible:!1,railColor:"#333",railOpacity:0.2,railDraggable:!0,railClass:"slimScrollRail",barClass:"slimScrollBar",wrapperClass:"slimScrollDiv",allowPageScroll:!1,wheelStep:20,touchScrollStep:200,borderRadius:"7px",railBorderRadius:"7px"},h);this.each(function(){function r(d){if(s){d=d|| 9 | window.event;var c=0;d.wheelDelta&&(c=-d.wheelDelta/120);d.detail&&(c=d.detail/3);f(d.target||d.srcTarget||d.srcElement).closest("."+a.wrapperClass).is(b.parent())&&m(c,!0);d.preventDefault&&!k&&d.preventDefault();k||(d.returnValue=!1)}}function m(d,f,h){k=!1;var e=d,g=b.outerHeight()-c.outerHeight();f&&(e=parseInt(c.css("top"))+d*parseInt(a.wheelStep)/100*c.outerHeight(),e=Math.min(Math.max(e,0),g),e=0=b.outerHeight()?k=!0:(c.stop(!0,!0).fadeIn("fast"),a.railVisible&&g.stop(!0,!0).fadeIn("fast"))}function p(){a.alwaysVisible||(A=setTimeout(function(){a.disableFadeOut&&s||(x||y)||(c.fadeOut("slow"),g.fadeOut("slow"))},1E3))}var s,x,y,A,z,u,l,B,D=30,k=!1,b=f(this);if(b.parent().hasClass(a.wrapperClass)){var n=b.scrollTop(), 12 | c=b.parent().find("."+a.barClass),g=b.parent().find("."+a.railClass);w();if(f.isPlainObject(h)){if("height"in h&&"auto"==h.height){b.parent().css("height","auto");b.css("height","auto");var q=b.parent().parent().height();b.parent().css("height",q);b.css("height",q)}if("scrollTo"in h)n=parseInt(a.scrollTo);else if("scrollBy"in h)n+=parseInt(a.scrollBy);else if("destroy"in h){c.remove();g.remove();b.unwrap();return}m(n,!1,!0)}}else{a.height="auto"==a.height?b.parent().height():a.height;n=f("
").addClass(a.wrapperClass).css({position:"relative", 13 | overflow:"hidden",width:a.width,height:a.height});b.css({overflow:"hidden",width:a.width,height:a.height});var g=f("
").addClass(a.railClass).css({width:a.size,height:"100%",position:"absolute",top:0,display:a.alwaysVisible&&a.railVisible?"block":"none","border-radius":a.railBorderRadius,background:a.railColor,opacity:a.railOpacity,zIndex:90}),c=f("
").addClass(a.barClass).css({background:a.color,width:a.size,position:"absolute",top:0,opacity:a.opacity,display:a.alwaysVisible? 14 | "block":"none","border-radius":a.borderRadius,BorderRadius:a.borderRadius,MozBorderRadius:a.borderRadius,WebkitBorderRadius:a.borderRadius,zIndex:99}),q="right"==a.position?{right:a.distance}:{left:a.distance};g.css(q);c.css(q);b.wrap(n);b.parent().append(c);b.parent().append(g);a.railDraggable&&c.bind("mousedown",function(a){var b=f(document);y=!0;t=parseFloat(c.css("top"));pageY=a.pageY;b.bind("mousemove.slimscroll",function(a){currTop=t+a.pageY-pageY;c.css("top",currTop);m(0,c.position().top,!1)}); 15 | b.bind("mouseup.slimscroll",function(a){y=!1;p();b.unbind(".slimscroll")});return!1}).bind("selectstart.slimscroll",function(a){a.stopPropagation();a.preventDefault();return!1});g.hover(function(){v()},function(){p()});c.hover(function(){x=!0},function(){x=!1});b.hover(function(){s=!0;v();p()},function(){s=!1;p()});b.bind("touchstart",function(a,b){a.originalEvent.touches.length&&(z=a.originalEvent.touches[0].pageY)});b.bind("touchmove",function(b){k||b.originalEvent.preventDefault();b.originalEvent.touches.length&& 16 | (m((z-b.originalEvent.touches[0].pageY)/a.touchScrollStep,!0),z=b.originalEvent.touches[0].pageY)});w();"bottom"===a.start?(c.css({top:b.outerHeight()-c.outerHeight()}),m(0,!0)):"top"!==a.start&&(m(f(a.start).position().top,null,!0),a.alwaysVisible||c.hide());C()}});return this}});jQuery.fn.extend({slimscroll:jQuery.fn.slimScroll})})(jQuery); -------------------------------------------------------------------------------- /src/main/webapp/assets/vendor/jquery.easy-pie-chart/angular.easypiechart.min.js: -------------------------------------------------------------------------------- 1 | /**! 2 | * easyPieChart 3 | * Lightweight plugin to render simple, animated and retina optimized pie charts 4 | * 5 | * @license 6 | * @author Robert Fleischmann (http://robert-fleischmann.de) 7 | * @version 2.1.6 8 | **/ 9 | !function(a,b){"object"==typeof exports?module.exports=b(require("angular")):"function"==typeof define&&define.amd?define(["angular"],b):b(a.angular)}(this,function(a){!function(a){"use strict";return a.module("easypiechart",[]).directive("easypiechart",[function(){return{restrict:"A",require:"?ngModel",scope:{percent:"=",options:"="},link:function(b,d){b.percent=b.percent||0;var e={barColor:"#ef1e25",trackColor:"#f9f9f9",scaleColor:"#dfe0e0",scaleLength:5,lineCap:"round",lineWidth:3,size:110,rotate:0,animate:{duration:1e3,enabled:!0}};b.options=a.extend(e,b.options);var f=new c(d[0],e);b.$watch("percent",function(a){f.update(a)})}}}])}(a);var b=function(a,b){var c,d=document.createElement("canvas");a.appendChild(d),"undefined"!=typeof G_vmlCanvasManager&&G_vmlCanvasManager.initElement(d);var e=d.getContext("2d");d.width=d.height=b.size;var f=1;window.devicePixelRatio>1&&(f=window.devicePixelRatio,d.style.width=d.style.height=[b.size,"px"].join(""),d.width=d.height=b.size*f,e.scale(f,f)),e.translate(b.size/2,b.size/2),e.rotate((-0.5+b.rotate/180)*Math.PI);var g=(b.size-b.lineWidth)/2;b.scaleColor&&b.scaleLength&&(g-=b.scaleLength+2),Date.now=Date.now||function(){return+new Date};var h=function(a,b,c){c=Math.min(Math.max(-1,c||0),1);var d=0>=c?!0:!1;e.beginPath(),e.arc(0,0,g,0,2*Math.PI*c,d),e.strokeStyle=a,e.lineWidth=b,e.stroke()},i=function(){var a,c;e.lineWidth=1,e.fillStyle=b.scaleColor,e.save();for(var d=24;d>0;--d)d%6===0?(c=b.scaleLength,a=0):(c=.6*b.scaleLength,a=b.scaleLength-c),e.fillRect(-b.size/2+a,0,c,1),e.rotate(Math.PI/12);e.restore()},j=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(a){window.setTimeout(a,1e3/60)}}(),k=function(){b.scaleColor&&i(),b.trackColor&&h(b.trackColor,b.trackWidth||b.lineWidth,1)};this.getCanvas=function(){return d},this.getCtx=function(){return e},this.clear=function(){e.clearRect(b.size/-2,b.size/-2,b.size,b.size)},this.draw=function(a){b.scaleColor||b.trackColor?e.getImageData&&e.putImageData?c?e.putImageData(c,0,0):(k(),c=e.getImageData(0,0,b.size*f,b.size*f)):(this.clear(),k()):this.clear(),e.lineCap=b.lineCap;var d;d="function"==typeof b.barColor?b.barColor(a):b.barColor,h(d,b.lineWidth,a/100)}.bind(this),this.animate=function(a,c){var d=Date.now();b.onStart(a,c);var e=function(){var f=Math.min(Date.now()-d,b.animate.duration),g=b.easing(this,f,a,c-a,b.animate.duration);this.draw(g),b.onStep(a,c,g),f>=b.animate.duration?b.onStop(a,c):j(e)}.bind(this);j(e)}.bind(this)},c=function(a,c){var d={barColor:"#ef1e25",trackColor:"#f9f9f9",scaleColor:"#dfe0e0",scaleLength:5,lineCap:"round",lineWidth:3,trackWidth:void 0,size:110,rotate:0,animate:{duration:1e3,enabled:!0},easing:function(a,b,c,d,e){return b/=e/2,1>b?d/2*b*b+c:-d/2*(--b*(b-2)-1)+c},onStart:function(){},onStep:function(){},onStop:function(){}};if("undefined"!=typeof b)d.renderer=b;else{if("undefined"==typeof SVGRenderer)throw new Error("Please load either the SVG- or the CanvasRenderer");d.renderer=SVGRenderer}var e={},f=0,g=function(){this.el=a,this.options=e;for(var b in d)d.hasOwnProperty(b)&&(e[b]=c&&"undefined"!=typeof c[b]?c[b]:d[b],"function"==typeof e[b]&&(e[b]=e[b].bind(this)));e.easing="string"==typeof e.easing&&"undefined"!=typeof jQuery&&jQuery.isFunction(jQuery.easing[e.easing])?jQuery.easing[e.easing]:d.easing,"number"==typeof e.animate&&(e.animate={duration:e.animate,enabled:!0}),"boolean"!=typeof e.animate||e.animate||(e.animate={duration:1e3,enabled:e.animate}),this.renderer=new e.renderer(a,e),this.renderer.draw(f),a.dataset&&a.dataset.percent?this.update(parseFloat(a.dataset.percent)):a.getAttribute&&a.getAttribute("data-percent")&&this.update(parseFloat(a.getAttribute("data-percent")))}.bind(this);this.update=function(a){return a=parseFloat(a),e.animate.enabled?this.renderer.animate(f,a):this.renderer.draw(a),f=a,this}.bind(this),this.disableAnimation=function(){return e.animate.enabled=!1,this},this.enableAnimation=function(){return e.animate.enabled=!0,this},g()}}); -------------------------------------------------------------------------------- /src/main/webapp/assets/vendor/jquery.easy-pie-chart/easypiechart.min.js: -------------------------------------------------------------------------------- 1 | /**! 2 | * easyPieChart 3 | * Lightweight plugin to render simple, animated and retina optimized pie charts 4 | * 5 | * @license 6 | * @author Robert Fleischmann (http://robert-fleischmann.de) 7 | * @version 2.1.6 8 | **/ 9 | !function(a,b){"object"==typeof exports?module.exports=b():"function"==typeof define&&define.amd?define([],b):a.EasyPieChart=b()}(this,function(){var a=function(a,b){var c,d=document.createElement("canvas");a.appendChild(d),"undefined"!=typeof G_vmlCanvasManager&&G_vmlCanvasManager.initElement(d);var e=d.getContext("2d");d.width=d.height=b.size;var f=1;window.devicePixelRatio>1&&(f=window.devicePixelRatio,d.style.width=d.style.height=[b.size,"px"].join(""),d.width=d.height=b.size*f,e.scale(f,f)),e.translate(b.size/2,b.size/2),e.rotate((-0.5+b.rotate/180)*Math.PI);var g=(b.size-b.lineWidth)/2;b.scaleColor&&b.scaleLength&&(g-=b.scaleLength+2),Date.now=Date.now||function(){return+new Date};var h=function(a,b,c){c=Math.min(Math.max(-1,c||0),1);var d=0>=c?!0:!1;e.beginPath(),e.arc(0,0,g,0,2*Math.PI*c,d),e.strokeStyle=a,e.lineWidth=b,e.stroke()},i=function(){var a,c;e.lineWidth=1,e.fillStyle=b.scaleColor,e.save();for(var d=24;d>0;--d)d%6===0?(c=b.scaleLength,a=0):(c=.6*b.scaleLength,a=b.scaleLength-c),e.fillRect(-b.size/2+a,0,c,1),e.rotate(Math.PI/12);e.restore()},j=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(a){window.setTimeout(a,1e3/60)}}(),k=function(){b.scaleColor&&i(),b.trackColor&&h(b.trackColor,b.trackWidth||b.lineWidth,1)};this.getCanvas=function(){return d},this.getCtx=function(){return e},this.clear=function(){e.clearRect(b.size/-2,b.size/-2,b.size,b.size)},this.draw=function(a){b.scaleColor||b.trackColor?e.getImageData&&e.putImageData?c?e.putImageData(c,0,0):(k(),c=e.getImageData(0,0,b.size*f,b.size*f)):(this.clear(),k()):this.clear(),e.lineCap=b.lineCap;var d;d="function"==typeof b.barColor?b.barColor(a):b.barColor,h(d,b.lineWidth,a/100)}.bind(this),this.animate=function(a,c){var d=Date.now();b.onStart(a,c);var e=function(){var f=Math.min(Date.now()-d,b.animate.duration),g=b.easing(this,f,a,c-a,b.animate.duration);this.draw(g),b.onStep(a,c,g),f>=b.animate.duration?b.onStop(a,c):j(e)}.bind(this);j(e)}.bind(this)},b=function(b,c){var d={barColor:"#ef1e25",trackColor:"#f9f9f9",scaleColor:"#dfe0e0",scaleLength:5,lineCap:"round",lineWidth:3,trackWidth:void 0,size:110,rotate:0,animate:{duration:1e3,enabled:!0},easing:function(a,b,c,d,e){return b/=e/2,1>b?d/2*b*b+c:-d/2*(--b*(b-2)-1)+c},onStart:function(){},onStep:function(){},onStop:function(){}};if("undefined"!=typeof a)d.renderer=a;else{if("undefined"==typeof SVGRenderer)throw new Error("Please load either the SVG- or the CanvasRenderer");d.renderer=SVGRenderer}var e={},f=0,g=function(){this.el=b,this.options=e;for(var a in d)d.hasOwnProperty(a)&&(e[a]=c&&"undefined"!=typeof c[a]?c[a]:d[a],"function"==typeof e[a]&&(e[a]=e[a].bind(this)));e.easing="string"==typeof e.easing&&"undefined"!=typeof jQuery&&jQuery.isFunction(jQuery.easing[e.easing])?jQuery.easing[e.easing]:d.easing,"number"==typeof e.animate&&(e.animate={duration:e.animate,enabled:!0}),"boolean"!=typeof e.animate||e.animate||(e.animate={duration:1e3,enabled:e.animate}),this.renderer=new e.renderer(b,e),this.renderer.draw(f),b.dataset&&b.dataset.percent?this.update(parseFloat(b.dataset.percent)):b.getAttribute&&b.getAttribute("data-percent")&&this.update(parseFloat(b.getAttribute("data-percent")))}.bind(this);this.update=function(a){return a=parseFloat(a),e.animate.enabled?this.renderer.animate(f,a):this.renderer.draw(a),f=a,this}.bind(this),this.disableAnimation=function(){return e.animate.enabled=!1,this},this.enableAnimation=function(){return e.animate.enabled=!0,this},g()};return b}); -------------------------------------------------------------------------------- /src/main/webapp/assets/vendor/jquery.easy-pie-chart/jquery.easypiechart.min.js: -------------------------------------------------------------------------------- 1 | /**! 2 | * easyPieChart 3 | * Lightweight plugin to render simple, animated and retina optimized pie charts 4 | * 5 | * @license 6 | * @author Robert Fleischmann (http://robert-fleischmann.de) 7 | * @version 2.1.6 8 | **/ 9 | !function(a,b){"object"==typeof exports?module.exports=b(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],b):b(a.jQuery)}(this,function(a){var b=function(a,b){var c,d=document.createElement("canvas");a.appendChild(d),"undefined"!=typeof G_vmlCanvasManager&&G_vmlCanvasManager.initElement(d);var e=d.getContext("2d");d.width=d.height=b.size;var f=1;window.devicePixelRatio>1&&(f=window.devicePixelRatio,d.style.width=d.style.height=[b.size,"px"].join(""),d.width=d.height=b.size*f,e.scale(f,f)),e.translate(b.size/2,b.size/2),e.rotate((-0.5+b.rotate/180)*Math.PI);var g=(b.size-b.lineWidth)/2;b.scaleColor&&b.scaleLength&&(g-=b.scaleLength+2),Date.now=Date.now||function(){return+new Date};var h=function(a,b,c){c=Math.min(Math.max(-1,c||0),1);var d=0>=c?!0:!1;e.beginPath(),e.arc(0,0,g,0,2*Math.PI*c,d),e.strokeStyle=a,e.lineWidth=b,e.stroke()},i=function(){var a,c;e.lineWidth=1,e.fillStyle=b.scaleColor,e.save();for(var d=24;d>0;--d)d%6===0?(c=b.scaleLength,a=0):(c=.6*b.scaleLength,a=b.scaleLength-c),e.fillRect(-b.size/2+a,0,c,1),e.rotate(Math.PI/12);e.restore()},j=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(a){window.setTimeout(a,1e3/60)}}(),k=function(){b.scaleColor&&i(),b.trackColor&&h(b.trackColor,b.trackWidth||b.lineWidth,1)};this.getCanvas=function(){return d},this.getCtx=function(){return e},this.clear=function(){e.clearRect(b.size/-2,b.size/-2,b.size,b.size)},this.draw=function(a){b.scaleColor||b.trackColor?e.getImageData&&e.putImageData?c?e.putImageData(c,0,0):(k(),c=e.getImageData(0,0,b.size*f,b.size*f)):(this.clear(),k()):this.clear(),e.lineCap=b.lineCap;var d;d="function"==typeof b.barColor?b.barColor(a):b.barColor,h(d,b.lineWidth,a/100)}.bind(this),this.animate=function(a,c){var d=Date.now();b.onStart(a,c);var e=function(){var f=Math.min(Date.now()-d,b.animate.duration),g=b.easing(this,f,a,c-a,b.animate.duration);this.draw(g),b.onStep(a,c,g),f>=b.animate.duration?b.onStop(a,c):j(e)}.bind(this);j(e)}.bind(this)},c=function(a,c){var d={barColor:"#ef1e25",trackColor:"#f9f9f9",scaleColor:"#dfe0e0",scaleLength:5,lineCap:"round",lineWidth:3,trackWidth:void 0,size:110,rotate:0,animate:{duration:1e3,enabled:!0},easing:function(a,b,c,d,e){return b/=e/2,1>b?d/2*b*b+c:-d/2*(--b*(b-2)-1)+c},onStart:function(){},onStep:function(){},onStop:function(){}};if("undefined"!=typeof b)d.renderer=b;else{if("undefined"==typeof SVGRenderer)throw new Error("Please load either the SVG- or the CanvasRenderer");d.renderer=SVGRenderer}var e={},f=0,g=function(){this.el=a,this.options=e;for(var b in d)d.hasOwnProperty(b)&&(e[b]=c&&"undefined"!=typeof c[b]?c[b]:d[b],"function"==typeof e[b]&&(e[b]=e[b].bind(this)));e.easing="string"==typeof e.easing&&"undefined"!=typeof jQuery&&jQuery.isFunction(jQuery.easing[e.easing])?jQuery.easing[e.easing]:d.easing,"number"==typeof e.animate&&(e.animate={duration:e.animate,enabled:!0}),"boolean"!=typeof e.animate||e.animate||(e.animate={duration:1e3,enabled:e.animate}),this.renderer=new e.renderer(a,e),this.renderer.draw(f),a.dataset&&a.dataset.percent?this.update(parseFloat(a.dataset.percent)):a.getAttribute&&a.getAttribute("data-percent")&&this.update(parseFloat(a.getAttribute("data-percent")))}.bind(this);this.update=function(a){return a=parseFloat(a),e.animate.enabled?this.renderer.animate(f,a):this.renderer.draw(a),f=a,this}.bind(this),this.disableAnimation=function(){return e.animate.enabled=!1,this},this.enableAnimation=function(){return e.animate.enabled=!0,this},g()};a.fn.easyPieChart=function(b){return this.each(function(){var d;a.data(this,"easyPieChart")||(d=a.extend({},b,a(this).data()),a.data(this,"easyPieChart",new c(this,d)))})}}); -------------------------------------------------------------------------------- /src/main/webapp/assets/vendor/linearicons/fonts/Linearicons-Free.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/songyaxu/gss/c0cf44128564097e61041dbe2825ece3e2db7071/src/main/webapp/assets/vendor/linearicons/fonts/Linearicons-Free.eot -------------------------------------------------------------------------------- /src/main/webapp/assets/vendor/linearicons/fonts/Linearicons-Free.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/songyaxu/gss/c0cf44128564097e61041dbe2825ece3e2db7071/src/main/webapp/assets/vendor/linearicons/fonts/Linearicons-Free.ttf -------------------------------------------------------------------------------- /src/main/webapp/assets/vendor/linearicons/fonts/Linearicons-Free.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/songyaxu/gss/c0cf44128564097e61041dbe2825ece3e2db7071/src/main/webapp/assets/vendor/linearicons/fonts/Linearicons-Free.woff -------------------------------------------------------------------------------- /src/main/webapp/assets/vendor/linearicons/fonts/Linearicons-Free.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/songyaxu/gss/c0cf44128564097e61041dbe2825ece3e2db7071/src/main/webapp/assets/vendor/linearicons/fonts/Linearicons-Free.woff2 -------------------------------------------------------------------------------- /src/main/webapp/assets/vendor/toastr/toastr.min.css: -------------------------------------------------------------------------------- 1 | .toast-title{font-weight:700}.toast-message{-ms-word-wrap:break-word;word-wrap:break-word}.toast-message a,.toast-message label{color:#FFF}.toast-message a:hover{color:#CCC;text-decoration:none}.toast-close-button{position:relative;right:-.3em;top:-.3em;float:right;font-size:20px;font-weight:700;color:#FFF;-webkit-text-shadow:0 1px 0 #fff;text-shadow:0 1px 0 #fff;opacity:.8;-ms-filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=80);filter:alpha(opacity=80);line-height:1}.toast-close-button:focus,.toast-close-button:hover{color:#000;text-decoration:none;cursor:pointer;opacity:.4;-ms-filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=40);filter:alpha(opacity=40)}.rtl .toast-close-button{left:-.3em;float:left;right:.3em}button.toast-close-button{padding:0;cursor:pointer;background:0 0;border:0;-webkit-appearance:none}.toast-top-center{top:0;right:0;width:100%}.toast-bottom-center{bottom:0;right:0;width:100%}.toast-top-full-width{top:0;right:0;width:100%}.toast-bottom-full-width{bottom:0;right:0;width:100%}.toast-top-left{top:12px;left:12px}.toast-top-right{top:12px;right:12px}.toast-bottom-right{right:12px;bottom:12px}.toast-bottom-left{bottom:12px;left:12px}#toast-container{position:fixed;z-index:999999;pointer-events:none}#toast-container *{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}#toast-container>div{position:relative;pointer-events:auto;overflow:hidden;margin:0 0 6px;padding:15px 15px 15px 50px;width:300px;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;background-position:15px center;background-repeat:no-repeat;-moz-box-shadow:0 0 12px #999;-webkit-box-shadow:0 0 12px #999;box-shadow:0 0 12px #999;color:#FFF;opacity:.8;-ms-filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=80);filter:alpha(opacity=80)}#toast-container>div.rtl{direction:rtl;padding:15px 50px 15px 15px;background-position:right 15px center}#toast-container>div:hover{-moz-box-shadow:0 0 12px #000;-webkit-box-shadow:0 0 12px #000;box-shadow:0 0 12px #000;opacity:1;-ms-filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=100);filter:alpha(opacity=100);cursor:pointer}#toast-container>.toast-info{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAGwSURBVEhLtZa9SgNBEMc9sUxxRcoUKSzSWIhXpFMhhYWFhaBg4yPYiWCXZxBLERsLRS3EQkEfwCKdjWJAwSKCgoKCcudv4O5YLrt7EzgXhiU3/4+b2ckmwVjJSpKkQ6wAi4gwhT+z3wRBcEz0yjSseUTrcRyfsHsXmD0AmbHOC9Ii8VImnuXBPglHpQ5wwSVM7sNnTG7Za4JwDdCjxyAiH3nyA2mtaTJufiDZ5dCaqlItILh1NHatfN5skvjx9Z38m69CgzuXmZgVrPIGE763Jx9qKsRozWYw6xOHdER+nn2KkO+Bb+UV5CBN6WC6QtBgbRVozrahAbmm6HtUsgtPC19tFdxXZYBOfkbmFJ1VaHA1VAHjd0pp70oTZzvR+EVrx2Ygfdsq6eu55BHYR8hlcki+n+kERUFG8BrA0BwjeAv2M8WLQBtcy+SD6fNsmnB3AlBLrgTtVW1c2QN4bVWLATaIS60J2Du5y1TiJgjSBvFVZgTmwCU+dAZFoPxGEEs8nyHC9Bwe2GvEJv2WXZb0vjdyFT4Cxk3e/kIqlOGoVLwwPevpYHT+00T+hWwXDf4AJAOUqWcDhbwAAAAASUVORK5CYII=)!important}#toast-container>.toast-error{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAHOSURBVEhLrZa/SgNBEMZzh0WKCClSCKaIYOED+AAKeQQLG8HWztLCImBrYadgIdY+gIKNYkBFSwu7CAoqCgkkoGBI/E28PdbLZmeDLgzZzcx83/zZ2SSXC1j9fr+I1Hq93g2yxH4iwM1vkoBWAdxCmpzTxfkN2RcyZNaHFIkSo10+8kgxkXIURV5HGxTmFuc75B2RfQkpxHG8aAgaAFa0tAHqYFfQ7Iwe2yhODk8+J4C7yAoRTWI3w/4klGRgR4lO7Rpn9+gvMyWp+uxFh8+H+ARlgN1nJuJuQAYvNkEnwGFck18Er4q3egEc/oO+mhLdKgRyhdNFiacC0rlOCbhNVz4H9FnAYgDBvU3QIioZlJFLJtsoHYRDfiZoUyIxqCtRpVlANq0EU4dApjrtgezPFad5S19Wgjkc0hNVnuF4HjVA6C7QrSIbylB+oZe3aHgBsqlNqKYH48jXyJKMuAbiyVJ8KzaB3eRc0pg9VwQ4niFryI68qiOi3AbjwdsfnAtk0bCjTLJKr6mrD9g8iq/S/B81hguOMlQTnVyG40wAcjnmgsCNESDrjme7wfftP4P7SP4N3CJZdvzoNyGq2c/HWOXJGsvVg+RA/k2MC/wN6I2YA2Pt8GkAAAAASUVORK5CYII=)!important}#toast-container>.toast-success{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAADsSURBVEhLY2AYBfQMgf///3P8+/evAIgvA/FsIF+BavYDDWMBGroaSMMBiE8VC7AZDrIFaMFnii3AZTjUgsUUWUDA8OdAH6iQbQEhw4HyGsPEcKBXBIC4ARhex4G4BsjmweU1soIFaGg/WtoFZRIZdEvIMhxkCCjXIVsATV6gFGACs4Rsw0EGgIIH3QJYJgHSARQZDrWAB+jawzgs+Q2UO49D7jnRSRGoEFRILcdmEMWGI0cm0JJ2QpYA1RDvcmzJEWhABhD/pqrL0S0CWuABKgnRki9lLseS7g2AlqwHWQSKH4oKLrILpRGhEQCw2LiRUIa4lwAAAABJRU5ErkJggg==)!important}#toast-container>.toast-warning{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAGYSURBVEhL5ZSvTsNQFMbXZGICMYGYmJhAQIJAICYQPAACiSDB8AiICQQJT4CqQEwgJvYASAQCiZiYmJhAIBATCARJy+9rTsldd8sKu1M0+dLb057v6/lbq/2rK0mS/TRNj9cWNAKPYIJII7gIxCcQ51cvqID+GIEX8ASG4B1bK5gIZFeQfoJdEXOfgX4QAQg7kH2A65yQ87lyxb27sggkAzAuFhbbg1K2kgCkB1bVwyIR9m2L7PRPIhDUIXgGtyKw575yz3lTNs6X4JXnjV+LKM/m3MydnTbtOKIjtz6VhCBq4vSm3ncdrD2lk0VgUXSVKjVDJXJzijW1RQdsU7F77He8u68koNZTz8Oz5yGa6J3H3lZ0xYgXBK2QymlWWA+RWnYhskLBv2vmE+hBMCtbA7KX5drWyRT/2JsqZ2IvfB9Y4bWDNMFbJRFmC9E74SoS0CqulwjkC0+5bpcV1CZ8NMej4pjy0U+doDQsGyo1hzVJttIjhQ7GnBtRFN1UarUlH8F3xict+HY07rEzoUGPlWcjRFRr4/gChZgc3ZL2d8oAAAAASUVORK5CYII=)!important}#toast-container.toast-bottom-center>div,#toast-container.toast-top-center>div{width:300px;margin-left:auto;margin-right:auto}#toast-container.toast-bottom-full-width>div,#toast-container.toast-top-full-width>div{width:96%;margin-left:auto;margin-right:auto}.toast{background-color:#030303}.toast-success{background-color:#51A351}.toast-error{background-color:#BD362F}.toast-info{background-color:#2F96B4}.toast-warning{background-color:#F89406}.toast-progress{position:absolute;left:0;bottom:0;height:4px;background-color:#000;opacity:.4;-ms-filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=40);filter:alpha(opacity=40)}@media all and (max-width:240px){#toast-container>div{padding:8px 8px 8px 50px;width:11em}#toast-container>div.rtl{padding:8px 50px 8px 8px}#toast-container .toast-close-button{right:-.2em;top:-.2em}#toast-container .rtl .toast-close-button{left:-.2em;right:.2em}}@media all and (min-width:241px) and (max-width:480px){#toast-container>div{padding:8px 8px 8px 50px;width:18em}#toast-container>div.rtl{padding:8px 50px 8px 8px}#toast-container .toast-close-button{right:-.2em;top:-.2em}#toast-container .rtl .toast-close-button{left:-.2em;right:.2em}}@media all and (min-width:481px) and (max-width:768px){#toast-container>div{padding:15px 15px 15px 50px;width:25em}#toast-container>div.rtl{padding:15px 50px 15px 15px}} -------------------------------------------------------------------------------- /src/main/webapp/assets/vendor/toastr/toastr.min.js: -------------------------------------------------------------------------------- 1 | !function(e){e(["jquery"],function(e){return function(){function t(e,t,n){return g({type:O.error,iconClass:m().iconClasses.error,message:e,optionsOverride:n,title:t})}function n(t,n){return t||(t=m()),v=e("#"+t.containerId),v.length?v:(n&&(v=d(t)),v)}function o(e,t,n){return g({type:O.info,iconClass:m().iconClasses.info,message:e,optionsOverride:n,title:t})}function s(e){C=e}function i(e,t,n){return g({type:O.success,iconClass:m().iconClasses.success,message:e,optionsOverride:n,title:t})}function a(e,t,n){return g({type:O.warning,iconClass:m().iconClasses.warning,message:e,optionsOverride:n,title:t})}function r(e,t){var o=m();v||n(o),u(e,o,t)||l(o)}function c(t){var o=m();return v||n(o),t&&0===e(":focus",t).length?void h(t):void(v.children().length&&v.remove())}function l(t){for(var n=v.children(),o=n.length-1;o>=0;o--)u(e(n[o]),t)}function u(t,n,o){var s=!(!o||!o.force)&&o.force;return!(!t||!s&&0!==e(":focus",t).length)&&(t[n.hideMethod]({duration:n.hideDuration,easing:n.hideEasing,complete:function(){h(t)}}),!0)}function d(t){return v=e("
").attr("id",t.containerId).addClass(t.positionClass),v.appendTo(e(t.target)),v}function p(){return{tapToDismiss:!0,toastClass:"toast",containerId:"toast-container",debug:!1,showMethod:"fadeIn",showDuration:300,showEasing:"swing",onShown:void 0,hideMethod:"fadeOut",hideDuration:1e3,hideEasing:"swing",onHidden:void 0,closeMethod:!1,closeDuration:!1,closeEasing:!1,closeOnHover:!0,extendedTimeOut:1e3,iconClasses:{error:"toast-error",info:"toast-info",success:"toast-success",warning:"toast-warning"},iconClass:"toast-info",positionClass:"toast-top-right",timeOut:5e3,titleClass:"toast-title",messageClass:"toast-message",escapeHtml:!1,target:"body",closeHtml:'',closeClass:"toast-close-button",newestOnTop:!0,preventDuplicates:!1,progressBar:!1,progressClass:"toast-progress",rtl:!1}}function f(e){C&&C(e)}function g(t){function o(e){return null==e&&(e=""),e.replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(//g,">")}function s(){c(),u(),d(),p(),g(),C(),l(),i()}function i(){var e="";switch(t.iconClass){case"toast-success":case"toast-info":e="polite";break;default:e="assertive"}I.attr("aria-live",e)}function a(){E.closeOnHover&&I.hover(H,D),!E.onclick&&E.tapToDismiss&&I.click(b),E.closeButton&&j&&j.click(function(e){e.stopPropagation?e.stopPropagation():void 0!==e.cancelBubble&&e.cancelBubble!==!0&&(e.cancelBubble=!0),E.onCloseClick&&E.onCloseClick(e),b(!0)}),E.onclick&&I.click(function(e){E.onclick(e),b()})}function r(){I.hide(),I[E.showMethod]({duration:E.showDuration,easing:E.showEasing,complete:E.onShown}),E.timeOut>0&&(k=setTimeout(b,E.timeOut),F.maxHideTime=parseFloat(E.timeOut),F.hideEta=(new Date).getTime()+F.maxHideTime,E.progressBar&&(F.intervalId=setInterval(x,10)))}function c(){t.iconClass&&I.addClass(E.toastClass).addClass(y)}function l(){E.newestOnTop?v.prepend(I):v.append(I)}function u(){if(t.title){var e=t.title;E.escapeHtml&&(e=o(t.title)),M.append(e).addClass(E.titleClass),I.append(M)}}function d(){if(t.message){var e=t.message;E.escapeHtml&&(e=o(t.message)),B.append(e).addClass(E.messageClass),I.append(B)}}function p(){E.closeButton&&(j.addClass(E.closeClass).attr("role","button"),I.prepend(j))}function g(){E.progressBar&&(q.addClass(E.progressClass),I.prepend(q))}function C(){E.rtl&&I.addClass("rtl")}function O(e,t){if(e.preventDuplicates){if(t.message===w)return!0;w=t.message}return!1}function b(t){var n=t&&E.closeMethod!==!1?E.closeMethod:E.hideMethod,o=t&&E.closeDuration!==!1?E.closeDuration:E.hideDuration,s=t&&E.closeEasing!==!1?E.closeEasing:E.hideEasing;if(!e(":focus",I).length||t)return clearTimeout(F.intervalId),I[n]({duration:o,easing:s,complete:function(){h(I),clearTimeout(k),E.onHidden&&"hidden"!==P.state&&E.onHidden(),P.state="hidden",P.endTime=new Date,f(P)}})}function D(){(E.timeOut>0||E.extendedTimeOut>0)&&(k=setTimeout(b,E.extendedTimeOut),F.maxHideTime=parseFloat(E.extendedTimeOut),F.hideEta=(new Date).getTime()+F.maxHideTime)}function H(){clearTimeout(k),F.hideEta=0,I.stop(!0,!0)[E.showMethod]({duration:E.showDuration,easing:E.showEasing})}function x(){var e=(F.hideEta-(new Date).getTime())/F.maxHideTime*100;q.width(e+"%")}var E=m(),y=t.iconClass||E.iconClass;if("undefined"!=typeof t.optionsOverride&&(E=e.extend(E,t.optionsOverride),y=t.optionsOverride.iconClass||y),!O(E,t)){T++,v=n(E,!0);var k=null,I=e("
"),M=e("
"),B=e("
"),q=e("
"),j=e(E.closeHtml),F={intervalId:null,hideEta:null,maxHideTime:null},P={toastId:T,state:"visible",startTime:new Date,options:E,map:t};return s(),r(),a(),f(P),E.debug&&console&&console.log(P),I}}function m(){return e.extend({},p(),b.options)}function h(e){v||(v=n()),e.is(":visible")||(e.remove(),e=null,0===v.children().length&&(v.remove(),w=void 0))}var v,C,w,T=0,O={error:"error",info:"info",success:"success",warning:"warning"},b={clear:r,remove:c,error:t,getContainer:n,info:o,options:{},subscribe:s,success:i,version:"2.1.3",warning:a};return b}()})}("function"==typeof define&&define.amd?define:function(e,t){"undefined"!=typeof module&&module.exports?module.exports=t(require("jquery")):window.toastr=t(window.jQuery)}); 2 | //# sourceMappingURL=toastr.js.map 3 | -------------------------------------------------------------------------------- /src/main/webapp/jsp/student/info.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> 2 | <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> 3 | 4 | 5 | 6 | 个人信息 | 毕业选题 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 | 52 | 53 | 54 | 71 | 72 | 73 |
74 | 75 |
76 |
77 |

个人信息

78 |
79 |
80 |

81 |
82 | 83 | 84 |
85 | 86 | 87 |
88 | 89 |

90 | 94 | 98 |
99 |
100 |
101 | 102 | 103 |
104 | 105 | 106 |
107 | 108 | 109 |
110 | 111 | 112 |
113 | 114 |

115 |
116 |

117 | 118 |

119 |
120 |
121 |
122 |
123 | 124 |
125 | 126 |
127 |
128 |
129 | 130 |
131 |
132 |
133 | 134 | 135 | 136 | 137 | 138 | 139 | 159 | 160 | 161 | 162 | -------------------------------------------------------------------------------- /src/main/webapp/jsp/student/modpwd.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> 2 | <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> 3 | 4 | 5 | 6 | 7 | 修改密码 | 毕业选题 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 |
31 | 32 | 54 | 55 | 56 | 73 | 74 | 75 |
76 | 77 |
78 |
79 |

修改密码

80 |
81 |
82 |

83 |
84 | 85 | 86 |
87 | 88 | 89 |
90 | 91 | 92 |

93 |
94 |

95 | 96 | 97 |

98 |
99 |
100 |
101 |
102 | 103 |
104 | 105 |
106 |
107 |
108 | 109 |
110 |
111 |
112 | 113 | 114 | 115 | 116 | 117 | 118 | 170 | 171 | 172 | 173 | -------------------------------------------------------------------------------- /src/main/webapp/jsp/teacher/info.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> 2 | <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> 3 | 4 | 5 | 6 | 个人信息 | 毕业选题 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 | 52 | 53 | 54 | 73 | 74 | 75 |
76 | 77 |
78 |
79 |

个人信息

80 |
81 |
82 |

83 |
84 | 85 | 86 |
87 | 88 | 89 |
90 | 91 |

92 | 96 | 100 |
101 |
102 |
103 | 104 | 105 |
106 | 107 | 108 |
109 | 110 | 111 |

112 |
113 |

114 | 115 |

116 |
117 |
118 |
119 |
120 | 121 |
122 | 123 |
124 |
125 |
126 | 127 |
128 |
129 |
130 | 131 | 132 | 133 | 134 | 135 | 136 | 155 | 156 | 157 | 158 | -------------------------------------------------------------------------------- /src/main/webapp/jsp/teacher/modpwd.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> 2 | <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> 3 | 4 | 5 | 6 | 7 | 修改密码 | 毕业选题 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 |
31 | 32 | 54 | 55 | 56 | 75 | 76 | 77 |
78 | 79 |
80 |
81 |

修改密码

82 |
83 |
84 |

85 |
86 | 87 | 88 |
89 | 90 | 91 |
92 | 93 | 94 |

95 |
96 |

97 | 98 | 99 |

100 |
101 |
102 |
103 |
104 | 105 |
106 | 107 |
108 |
109 |
110 | 111 |
112 |
113 |
114 | 115 | 116 | 117 | 118 | 119 | 120 | 172 | 173 | 174 | 175 | -------------------------------------------------------------------------------- /src/main/webapp/login.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> 2 | 3 | 4 | 用户登录 | 选题系统 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 | 33 |

用户登录

34 |
35 |
36 |
37 | 38 |
39 |
40 | 41 |
42 | 43 | 44 | 45 |
46 |
47 |
48 |
49 |
50 |
51 |

学生选题系统

52 |

by yaxuSong

53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 | 61 | 83 | 84 | 85 | 86 | -------------------------------------------------------------------------------- /src/main/webapp/sessiontimeout.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> 2 | 3 | 4 | 5 | 6 | 会话超时 | 选题系统 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 |
29 |
30 |
31 |
32 |

会话超时

33 | 34 |
35 |

会话超时或界面已经不存在!

36 |
37 | 40 |
41 |
42 |
43 |
44 |
45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /数据库表结构.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/songyaxu/gss/c0cf44128564097e61041dbe2825ece3e2db7071/数据库表结构.xlsx --------------------------------------------------------------------------------