2020.2.17 实现了学生模块的后台CRUD以及前台所有学生信息分页展示

main
ppdxzz 5 years ago
parent 9762f91c3c
commit b70a430f5f

@ -8,23 +8,17 @@
<component name="ChangeListManager">
<list default="true" id="8033210d-c341-4f39-a328-95fe94016f00" name="Default Changelist" comment="">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/pom.xml" beforeDir="false" afterPath="$PROJECT_DIR$/pom.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/cn/ppdxzz/controller/AdminController.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/cn/ppdxzz/controller/AdminController.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/cn/ppdxzz/service/AdminService.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/cn/ppdxzz/service/AdminService.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/cn/ppdxzz/service/impl/AdminServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/cn/ppdxzz/service/impl/AdminServiceImpl.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/resources/spring-mvc.xml" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/spring-mvc.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/webapp/WEB-INF/jsp/admin-add.jsp" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/webapp/WEB-INF/jsp/admin-add.jsp" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/webapp/WEB-INF/jsp/admin-list.jsp" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/webapp/WEB-INF/jsp/admin-list.jsp" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/webapp/admin-edit.html" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/webapp/WEB-INF/jsp/main.jsp" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/webapp/WEB-INF/jsp/main.jsp" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/webapp/WEB-INF/jsp/welcome.jsp" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/webapp/WEB-INF/jsp/welcome.jsp" afterDir="false" />
<change beforePath="$PROJECT_DIR$/target/classes/cn/ppdxzz/controller/AdminController.class" beforeDir="false" afterPath="$PROJECT_DIR$/target/classes/cn/ppdxzz/controller/AdminController.class" afterDir="false" />
<change beforePath="$PROJECT_DIR$/target/classes/cn/ppdxzz/service/AdminService.class" beforeDir="false" afterPath="$PROJECT_DIR$/target/classes/cn/ppdxzz/service/AdminService.class" afterDir="false" />
<change beforePath="$PROJECT_DIR$/target/classes/cn/ppdxzz/service/impl/AdminServiceImpl.class" beforeDir="false" afterPath="$PROJECT_DIR$/target/classes/cn/ppdxzz/service/impl/AdminServiceImpl.class" afterDir="false" />
<change beforePath="$PROJECT_DIR$/target/classes/spring-mvc.xml" beforeDir="false" afterPath="$PROJECT_DIR$/target/classes/spring-mvc.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/target/hellossm/WEB-INF/classes/cn/ppdxzz/controller/AdminController.class" beforeDir="false" afterPath="$PROJECT_DIR$/target/hellossm/WEB-INF/classes/cn/ppdxzz/controller/AdminController.class" afterDir="false" />
<change beforePath="$PROJECT_DIR$/target/hellossm/WEB-INF/classes/cn/ppdxzz/service/AdminService.class" beforeDir="false" afterPath="$PROJECT_DIR$/target/hellossm/WEB-INF/classes/cn/ppdxzz/service/AdminService.class" afterDir="false" />
<change beforePath="$PROJECT_DIR$/target/hellossm/WEB-INF/classes/cn/ppdxzz/service/impl/AdminServiceImpl.class" beforeDir="false" afterPath="$PROJECT_DIR$/target/hellossm/WEB-INF/classes/cn/ppdxzz/service/impl/AdminServiceImpl.class" afterDir="false" />
<change beforePath="$PROJECT_DIR$/target/hellossm/WEB-INF/classes/spring-mvc.xml" beforeDir="false" afterPath="$PROJECT_DIR$/target/hellossm/WEB-INF/classes/spring-mvc.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/target/hellossm/WEB-INF/jsp/admin-list.jsp" beforeDir="false" afterPath="$PROJECT_DIR$/target/hellossm/WEB-INF/jsp/admin-list.jsp" afterDir="false" />
<change beforePath="$PROJECT_DIR$/target/hellossm/admin-edit.html" beforeDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
@ -34,9 +28,9 @@
<component name="FileTemplateManagerImpl">
<option name="RECENT_TEMPLATES">
<list>
<option value="Interface" />
<option value="HTML File" />
<option value="Jsp File" />
<option value="Interface" />
<option value="Class" />
</list>
</option>
@ -81,20 +75,20 @@
<property name="WebServerToolWindowFactoryState" value="false" />
<property name="aspect.path.notification.shown" value="true" />
<property name="js.last.introduce.type" value="VAR" />
<property name="last_opened_file_path" value="$PROJECT_DIR$/src/main/webapp/js" />
<property name="last_opened_file_path" value="$PROJECT_DIR$/src/main/webapp/css" />
<property name="settings.editor.selected.configurable" value="editor.preferences.gutterIcons" />
</component>
<component name="RecentsManager">
<key name="MoveFile.RECENT_KEYS">
<recent name="D:\Development tools\IDEA\IntelliJ IDEA 2019.2.4\hellossm\src\main\webapp" />
</key>
<key name="CopyFile.RECENT_KEYS">
<recent name="D:\Development tools\IDEA\IntelliJ IDEA 2019.2.4\hellossm\src\main\webapp\js" />
<recent name="D:\Development tools\IDEA\IntelliJ IDEA 2019.2.4\hellossm\src\main\webapp\images" />
<recent name="D:\Development tools\IDEA\IntelliJ IDEA 2019.2.4\hellossm\src\main\webapp\css" />
<recent name="D:\Development tools\IDEA\IntelliJ IDEA 2019.2.4\hellossm\src\main\webapp\images" />
<recent name="D:\Development tools\IDEA\IntelliJ IDEA 2019.2.4\hellossm\src\main\webapp\js" />
<recent name="D:\Development tools\IDEA\IntelliJ IDEA 2019.2.4\hellossm\src\main\webapp" />
<recent name="D:\Development tools\IDEA\IntelliJ IDEA 2019.2.4\hellossm\src\main\webapp\WEB-INF\jsp" />
</key>
<key name="MoveFile.RECENT_KEYS">
<recent name="D:\Development tools\IDEA\IntelliJ IDEA 2019.2.4\hellossm\src\main\webapp" />
</key>
</component>
<component name="RunManager" selected="Tomcat Server.Tomcat 9.0.24">
<configuration name="MD5Util" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true">
@ -199,8 +193,8 @@
</configuration>
<list>
<item itemvalue="Application.MD5Util" />
<item itemvalue="Tomcat Server.Tomcat 9.0.24" />
<item itemvalue="Application.WriteExcel" />
<item itemvalue="Tomcat Server.Tomcat 9.0.24" />
</list>
<recent_temporary>
<list>
@ -260,6 +254,7 @@
<workItem from="1581731575582" duration="47721000" />
<workItem from="1581814839916" duration="4082000" />
<workItem from="1581820499500" duration="20191000" />
<workItem from="1581913917133" duration="32750000" />
</task>
<servers />
</component>
@ -271,98 +266,114 @@
<screen x="0" y="0" width="1366" height="728" />
</state>
<state x="275" y="34" key="#HTTP_Proxy/0.0.1366.728@0.0.1366.728" timestamp="1581304199078" />
<state x="275" y="26" key="#Template_Data_Languages" timestamp="1581662542652">
<state x="275" y="26" key="#Template_Data_Languages" timestamp="1581948864401">
<screen x="0" y="0" width="1366" height="728" />
</state>
<state x="275" y="26" key="#Template_Data_Languages/0.0.1366.728@0.0.1366.728" timestamp="1581662542652" />
<state x="275" y="26" key="#Template_Data_Languages/0.0.1366.728@0.0.1366.728" timestamp="1581948864401" />
<state x="137" y="23" key="#com.intellij.execution.impl.EditConfigurationsDialog" timestamp="1581485477637">
<screen x="0" y="0" width="1366" height="728" />
</state>
<state x="137" y="23" key="#com.intellij.execution.impl.EditConfigurationsDialog/0.0.1366.728@0.0.1366.728" timestamp="1581485477637" />
<state x="488" y="84" key="#com.intellij.ide.util.MemberChooser" timestamp="1581836246308">
<state x="488" y="84" key="#com.intellij.ide.util.MemberChooser" timestamp="1581928960332">
<screen x="0" y="0" width="1366" height="728" />
</state>
<state x="488" y="84" key="#com.intellij.ide.util.MemberChooser/0.0.1366.728@0.0.1366.728" timestamp="1581928960332" />
<state width="1059" height="73" key="GridCell.Tab.0.bottom" timestamp="1581948908204">
<screen x="0" y="0" width="1366" height="728" />
</state>
<state width="1059" height="73" key="GridCell.Tab.0.bottom/0.0.1366.728@0.0.1366.728" timestamp="1581948908204" />
<state width="1059" height="73" key="GridCell.Tab.0.center" timestamp="1581948908204">
<screen x="0" y="0" width="1366" height="728" />
</state>
<state width="1059" height="73" key="GridCell.Tab.0.center/0.0.1366.728@0.0.1366.728" timestamp="1581948908204" />
<state width="1059" height="73" key="GridCell.Tab.0.left" timestamp="1581948908204">
<screen x="0" y="0" width="1366" height="728" />
</state>
<state width="1059" height="73" key="GridCell.Tab.0.left/0.0.1366.728@0.0.1366.728" timestamp="1581948908204" />
<state width="1059" height="73" key="GridCell.Tab.0.right" timestamp="1581948908204">
<screen x="0" y="0" width="1366" height="728" />
</state>
<state x="488" y="84" key="#com.intellij.ide.util.MemberChooser/0.0.1366.728@0.0.1366.728" timestamp="1581836246308" />
<state width="1059" height="127" key="GridCell.Tab.0.bottom" timestamp="1581855818900">
<state width="1059" height="73" key="GridCell.Tab.0.right/0.0.1366.728@0.0.1366.728" timestamp="1581948908204" />
<state width="1059" height="73" key="GridCell.Tab.1.bottom" timestamp="1581948908204">
<screen x="0" y="0" width="1366" height="728" />
</state>
<state width="1059" height="127" key="GridCell.Tab.0.bottom/0.0.1366.728@0.0.1366.728" timestamp="1581855818900" />
<state width="1059" height="127" key="GridCell.Tab.0.center" timestamp="1581855818900">
<state width="1059" height="73" key="GridCell.Tab.1.bottom/0.0.1366.728@0.0.1366.728" timestamp="1581948908204" />
<state width="1059" height="73" key="GridCell.Tab.1.center" timestamp="1581948908204">
<screen x="0" y="0" width="1366" height="728" />
</state>
<state width="1059" height="127" key="GridCell.Tab.0.center/0.0.1366.728@0.0.1366.728" timestamp="1581855818900" />
<state width="1059" height="127" key="GridCell.Tab.0.left" timestamp="1581855818900">
<state width="1059" height="73" key="GridCell.Tab.1.center/0.0.1366.728@0.0.1366.728" timestamp="1581948908204" />
<state width="1059" height="73" key="GridCell.Tab.1.left" timestamp="1581948908204">
<screen x="0" y="0" width="1366" height="728" />
</state>
<state width="1059" height="127" key="GridCell.Tab.0.left/0.0.1366.728@0.0.1366.728" timestamp="1581855818900" />
<state width="1059" height="127" key="GridCell.Tab.0.right" timestamp="1581855818900">
<state width="1059" height="73" key="GridCell.Tab.1.left/0.0.1366.728@0.0.1366.728" timestamp="1581948908204" />
<state width="1059" height="73" key="GridCell.Tab.1.right" timestamp="1581948908204">
<screen x="0" y="0" width="1366" height="728" />
</state>
<state width="1059" height="127" key="GridCell.Tab.0.right/0.0.1366.728@0.0.1366.728" timestamp="1581855818900" />
<state width="1059" height="127" key="GridCell.Tab.1.bottom" timestamp="1581855818900">
<state width="1059" height="73" key="GridCell.Tab.1.right/0.0.1366.728@0.0.1366.728" timestamp="1581948908204" />
<state width="1059" height="73" key="GridCell.Tab.2.bottom" timestamp="1581948908205">
<screen x="0" y="0" width="1366" height="728" />
</state>
<state width="1059" height="127" key="GridCell.Tab.1.bottom/0.0.1366.728@0.0.1366.728" timestamp="1581855818900" />
<state width="1059" height="127" key="GridCell.Tab.1.center" timestamp="1581855818900">
<state width="1059" height="73" key="GridCell.Tab.2.bottom/0.0.1366.728@0.0.1366.728" timestamp="1581948908205" />
<state width="1059" height="73" key="GridCell.Tab.2.center" timestamp="1581948908205">
<screen x="0" y="0" width="1366" height="728" />
</state>
<state width="1059" height="127" key="GridCell.Tab.1.center/0.0.1366.728@0.0.1366.728" timestamp="1581855818900" />
<state width="1059" height="127" key="GridCell.Tab.1.left" timestamp="1581855818900">
<state width="1059" height="73" key="GridCell.Tab.2.center/0.0.1366.728@0.0.1366.728" timestamp="1581948908205" />
<state width="1059" height="73" key="GridCell.Tab.2.left" timestamp="1581948908205">
<screen x="0" y="0" width="1366" height="728" />
</state>
<state width="1059" height="127" key="GridCell.Tab.1.left/0.0.1366.728@0.0.1366.728" timestamp="1581855818900" />
<state width="1059" height="127" key="GridCell.Tab.1.right" timestamp="1581855818900">
<state width="1059" height="73" key="GridCell.Tab.2.left/0.0.1366.728@0.0.1366.728" timestamp="1581948908205" />
<state width="1059" height="73" key="GridCell.Tab.2.right" timestamp="1581948908205">
<screen x="0" y="0" width="1366" height="728" />
</state>
<state width="1059" height="127" key="GridCell.Tab.1.right/0.0.1366.728@0.0.1366.728" timestamp="1581855818900" />
<state width="1059" height="127" key="GridCell.Tab.2.bottom" timestamp="1581855818901">
<state width="1059" height="73" key="GridCell.Tab.2.right/0.0.1366.728@0.0.1366.728" timestamp="1581948908205" />
<state width="1059" height="87" key="GridCell.Tab.3.bottom" timestamp="1581939640569">
<screen x="0" y="0" width="1366" height="728" />
</state>
<state width="1059" height="127" key="GridCell.Tab.2.bottom/0.0.1366.728@0.0.1366.728" timestamp="1581855818901" />
<state width="1059" height="127" key="GridCell.Tab.2.center" timestamp="1581855818901">
<state width="1059" height="87" key="GridCell.Tab.3.bottom/0.0.1366.728@0.0.1366.728" timestamp="1581939640569" />
<state width="1059" height="87" key="GridCell.Tab.3.center" timestamp="1581939640569">
<screen x="0" y="0" width="1366" height="728" />
</state>
<state width="1059" height="127" key="GridCell.Tab.2.center/0.0.1366.728@0.0.1366.728" timestamp="1581855818901" />
<state width="1059" height="127" key="GridCell.Tab.2.left" timestamp="1581855818901">
<state width="1059" height="87" key="GridCell.Tab.3.center/0.0.1366.728@0.0.1366.728" timestamp="1581939640569" />
<state width="1059" height="87" key="GridCell.Tab.3.left" timestamp="1581939640569">
<screen x="0" y="0" width="1366" height="728" />
</state>
<state width="1059" height="127" key="GridCell.Tab.2.left/0.0.1366.728@0.0.1366.728" timestamp="1581855818901" />
<state width="1059" height="127" key="GridCell.Tab.2.right" timestamp="1581855818901">
<state width="1059" height="87" key="GridCell.Tab.3.left/0.0.1366.728@0.0.1366.728" timestamp="1581939640569" />
<state width="1059" height="87" key="GridCell.Tab.3.right" timestamp="1581939640569">
<screen x="0" y="0" width="1366" height="728" />
</state>
<state width="1059" height="127" key="GridCell.Tab.2.right/0.0.1366.728@0.0.1366.728" timestamp="1581855818901" />
<state width="1059" height="2" key="GridCell.Tab.3.bottom" timestamp="1581775851407">
<state width="1059" height="87" key="GridCell.Tab.3.right/0.0.1366.728@0.0.1366.728" timestamp="1581939640569" />
<state width="1059" height="87" key="GridCell.Tab.4.bottom" timestamp="1581939640569">
<screen x="0" y="0" width="1366" height="728" />
</state>
<state width="1059" height="2" key="GridCell.Tab.3.bottom/0.0.1366.728@0.0.1366.728" timestamp="1581775851407" />
<state width="1059" height="2" key="GridCell.Tab.3.center" timestamp="1581775851407">
<state width="1059" height="87" key="GridCell.Tab.4.bottom/0.0.1366.728@0.0.1366.728" timestamp="1581939640569" />
<state width="1059" height="87" key="GridCell.Tab.4.center" timestamp="1581939640569">
<screen x="0" y="0" width="1366" height="728" />
</state>
<state width="1059" height="2" key="GridCell.Tab.3.center/0.0.1366.728@0.0.1366.728" timestamp="1581775851407" />
<state width="1059" height="2" key="GridCell.Tab.3.left" timestamp="1581775851407">
<state width="1059" height="87" key="GridCell.Tab.4.center/0.0.1366.728@0.0.1366.728" timestamp="1581939640569" />
<state width="1059" height="87" key="GridCell.Tab.4.left" timestamp="1581939640569">
<screen x="0" y="0" width="1366" height="728" />
</state>
<state width="1059" height="2" key="GridCell.Tab.3.left/0.0.1366.728@0.0.1366.728" timestamp="1581775851407" />
<state width="1059" height="2" key="GridCell.Tab.3.right" timestamp="1581775851407">
<state width="1059" height="87" key="GridCell.Tab.4.left/0.0.1366.728@0.0.1366.728" timestamp="1581939640569" />
<state width="1059" height="87" key="GridCell.Tab.4.right" timestamp="1581939640569">
<screen x="0" y="0" width="1366" height="728" />
</state>
<state width="1059" height="2" key="GridCell.Tab.3.right/0.0.1366.728@0.0.1366.728" timestamp="1581775851407" />
<state width="1059" height="2" key="GridCell.Tab.4.bottom" timestamp="1581775851407">
<state width="1059" height="87" key="GridCell.Tab.4.right/0.0.1366.728@0.0.1366.728" timestamp="1581939640569" />
<state width="1059" height="415" key="GridCell.Tab.5.bottom" timestamp="1581939297473">
<screen x="0" y="0" width="1366" height="728" />
</state>
<state width="1059" height="2" key="GridCell.Tab.4.bottom/0.0.1366.728@0.0.1366.728" timestamp="1581775851407" />
<state width="1059" height="2" key="GridCell.Tab.4.center" timestamp="1581775851407">
<state width="1059" height="415" key="GridCell.Tab.5.bottom/0.0.1366.728@0.0.1366.728" timestamp="1581939297473" />
<state width="1059" height="415" key="GridCell.Tab.5.center" timestamp="1581939297473">
<screen x="0" y="0" width="1366" height="728" />
</state>
<state width="1059" height="2" key="GridCell.Tab.4.center/0.0.1366.728@0.0.1366.728" timestamp="1581775851407" />
<state width="1059" height="2" key="GridCell.Tab.4.left" timestamp="1581775851407">
<state width="1059" height="415" key="GridCell.Tab.5.center/0.0.1366.728@0.0.1366.728" timestamp="1581939297473" />
<state width="1059" height="415" key="GridCell.Tab.5.left" timestamp="1581939297473">
<screen x="0" y="0" width="1366" height="728" />
</state>
<state width="1059" height="2" key="GridCell.Tab.4.left/0.0.1366.728@0.0.1366.728" timestamp="1581775851407" />
<state width="1059" height="2" key="GridCell.Tab.4.right" timestamp="1581775851407">
<state width="1059" height="415" key="GridCell.Tab.5.left/0.0.1366.728@0.0.1366.728" timestamp="1581939297473" />
<state width="1059" height="415" key="GridCell.Tab.5.right" timestamp="1581939297473">
<screen x="0" y="0" width="1366" height="728" />
</state>
<state width="1059" height="2" key="GridCell.Tab.4.right/0.0.1366.728@0.0.1366.728" timestamp="1581775851407" />
<state width="1059" height="415" key="GridCell.Tab.5.right/0.0.1366.728@0.0.1366.728" timestamp="1581939297473" />
<state x="213" y="23" key="Maven.ArtifactSearchDialog" timestamp="1581325031095">
<screen x="0" y="0" width="1366" height="728" />
</state>

@ -72,6 +72,7 @@ public class AdminController {
public String Login() {
return "login";
}
/**
* 退
n */

@ -0,0 +1,178 @@
package cn.ppdxzz.controller;
import cn.ppdxzz.domain.Student;
import cn.ppdxzz.service.StudentService;
import com.github.pagehelper.PageInfo;
import org.apache.commons.io.IOUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.servlet.ModelAndView;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.List;
/**
* Description:
*
* @Date: 2020/2/17 14:17
* @Author: PeiChen
*/
@Controller
@RequestMapping("/student")
public class StudentController {
private StudentService studentService;
@Autowired
public void setStudentService(StudentService studentService) {
this.studentService = studentService;
}
/**
*
* @param page
* @param size
* @param request
* @param response
* @return
* @throws Exception
*/
@RequestMapping("/findAll")
public ModelAndView findAll(@RequestParam(name = "page", required = true, defaultValue = "1") int page, @RequestParam(name = "size", required = true, defaultValue = "4") int size, HttpServletRequest request, HttpServletResponse response) throws Exception {
request.setCharacterEncoding("utf-8");
response.setCharacterEncoding("utf-8");
ModelAndView mv = new ModelAndView();
List<Student> list = null;
String keyword = request.getParameter("keyword");
if (keyword == null || keyword.trim().equals("") || keyword.length() == 0) {
list = studentService.findAll(page, size);
}else {
list = studentService.search(page,size,keyword);
}
//PageInfo就是一个封装了分页数据的bean
PageInfo pageInfo = new PageInfo(list);
mv.addObject("pageInfo",pageInfo);
mv.setViewName("student-list");
return mv;
}
/**
*
* @param request
* @param response
* @throws Exception
*/
@RequestMapping("/delete")
public void delete(HttpServletRequest request,HttpServletResponse response) throws Exception {
response.setCharacterEncoding("utf-8");
PrintWriter writer = response.getWriter();
String sno = request.getParameter("sno");
if (sno == null || "".equals(sno) || sno.length() == 0) {
writer.write("false");
return;
}
studentService.delete(sno);
writer.write("true");
}
/**
*
* @param request
* @param response
* @throws Exception
*/
@RequestMapping("/isExist")
public void isSnoExist(HttpServletRequest request,HttpServletResponse response) throws Exception {
request.setCharacterEncoding("utf-8");
response.setCharacterEncoding("utf-8");
PrintWriter writer = response.getWriter();
String sno = request.getParameter("sno");
Student isExist = studentService.findBySno(sno);
if (isExist == null) {
return;
}
//如果isExist不为空说明学号已被注册
writer.write("true");
}
@RequestMapping("/addStudent")
public String addStudent() {
return "student-add";
}
/**
*
* @param student
* @param response
* @throws Exception
*/
@RequestMapping("/add")
public void add(Student student,HttpServletResponse response) throws Exception {
PrintWriter writer = response.getWriter();
if (student == null || studentService.findBySno(student.getSno()) != null) {
writer.write("false");
return;
}
boolean isAdd = studentService.add(student);
if (isAdd) {
writer.write("true");
}else {
writer.write("false");
}
}
/**
*
* @param student
* @param response
* @throws Exception
*/
@RequestMapping("/update")
public void update(Student student,HttpServletResponse response) throws Exception {
response.setCharacterEncoding("utf-8");
PrintWriter writer = response.getWriter();
if (student == null || student.getId() == null) {
return;
}
if (student.getName() == null || "".equals(student.getName()) || student.getName().length() == 0
|| student.getSex() == null || student.getSex().length() == 0 || "".equals(student.getSex())
|| student.getSno() == null || "".equals(student.getSno()) || student.getSno().length() == 0
|| student.getPhone() == null || "".equals(student.getPhone()) || student.getPhone().length() == 0
|| student.getStu_class() == null || "".equals(student.getStu_class()) || student.getStu_class().length() == 0
|| student.getPlace() == null || "".equals(student.getPlace()) || student.getPlace().length() == 0
|| student.getDorm_id() == null || "".equals(student.getDorm_id()) || student.getDorm_id().length() == 0
|| student.getTeacher() == null || "".equals(student.getTeacher()) || student.getTeacher().length() == 0 ) {
return;
}
studentService.update(student);
writer.write("true");
}
/**
* Excel
* @param response
* @throws Exception
*/
@RequestMapping("/export")
public void export(HttpServletResponse response) throws Exception {
InputStream is = studentService.getInputStream();
response.setContentType("application/vnd.ms-excel");
response.setHeader("contentDisposition", "attachment;filename=studentsInfo.xls");
ServletOutputStream outputStream = response.getOutputStream();
IOUtils.copy(is,outputStream);
}
}

@ -0,0 +1,70 @@
package cn.ppdxzz.dao;
import cn.ppdxzz.domain.Student;
import org.apache.ibatis.annotations.*;
import org.springframework.stereotype.Repository;
import java.util.List;
/**
* Description:
*
* @Date: 2020/2/17 14:19
* @Author: PeiChen
*/
@Repository
public interface StudentDao {
/**
*
* @return
* @throws Exception
*/
@Select("select * from students")
List<Student> findAll() throws Exception;
/**
* sno
* @return
* @throws Exception
*/
@Select("select * from students where sno = #{sno}")
Student findBySno(String sno) throws Exception;
/**
*
* @return
* @throws Exception
*/
@Select("select * from students where name like '%${keyword}%' or sex like '%${keyword}%' or sno like '%${keyword}%' or stu_class like '%${keyword}%' or phone like '%${keyword}%' or place like '%${keyword}%' or dorm_id like '%${keyword}%' or teacher like '%${keyword}%' ")
List<Student> search(@Param(value = "keyword") String keyword) throws Exception;
/**
*
* @param student
* @throws Exception
*/
@Insert("insert into students(name, sex, sno, stu_class, phone, place, dorm_id, teacher) values(#{name},#{sex},#{sno},#{stu_class},#{phone},#{place},#{dorm_id},#{teacher})")
void add(Student student) throws Exception;
/**
* id
* @param sno
* @throws Exception
*/
@Delete("delete from students where sno = #{sno}")
void delete(String sno) throws Exception;
/**
*
* @param student
* @throws Exception
*/
@Update("update students set name = #{name},sex = #{sex},sno = #{sno},stu_class = #{stu_class},phone = #{phone},place = #{place},dorm_id = #{dorm_id},teacher = #{teacher} where id = #{id}")
void update(Student student) throws Exception;
}

@ -0,0 +1,123 @@
package cn.ppdxzz.domain;
import java.io.Serializable;
/**
* Description:
*
* @Date: 2020/2/17 14:08
* @Author: PeiChen
*/
public class Student implements Serializable {
private Integer id;
private String name;//姓名
private String sex;//性别
private String sno;//学号
private String stu_class;//班级
private String phone;//联系方式
private String place;//家庭住址
private String dorm_id;//宿舍号
private String teacher;//育人导师
public Student() {
}
public Student(Integer id, String name, String sex, String sno, String stu_class, String phone, String place, String dorm_id, String teacher) {
this.id = id;
this.name = name;
this.sex = sex;
this.sno = sno;
this.stu_class = stu_class;
this.phone = phone;
this.place = place;
this.dorm_id = dorm_id;
this.teacher = teacher;
}
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getSex() {
return sex;
}
public void setSex(String sex) {
this.sex = sex;
}
public String getSno() {
return sno;
}
public void setSno(String sno) {
this.sno = sno;
}
public String getStu_class() {
return stu_class;
}
public void setStu_class(String stu_class) {
this.stu_class = stu_class;
}
public String getPhone() {
return phone;
}
public void setPhone(String phone) {
this.phone = phone;
}
public String getPlace() {
return place;
}
public void setPlace(String place) {
this.place = place;
}
public String getDorm_id() {
return dorm_id;
}
public void setDorm_id(String dorm_id) {
this.dorm_id = dorm_id;
}
public String getTeacher() {
return teacher;
}
public void setTeacher(String teacher) {
this.teacher = teacher;
}
@Override
public String toString() {
return "Student{" +
"id=" + id +
", name='" + name + '\'' +
", sex='" + sex + '\'' +
", sno='" + sno + '\'' +
", stu_class='" + stu_class + '\'' +
", phone='" + phone + '\'' +
", place='" + place + '\'' +
", dorm_id='" + dorm_id + '\'' +
", teacher='" + teacher + '\'' +
'}';
}
}

@ -0,0 +1,31 @@
package cn.ppdxzz.service;
import cn.ppdxzz.domain.Student;
import java.io.InputStream;
import java.util.List;
/**
* Description:
*
* @Date: 2020/2/17 14:21
* @Author: PeiChen
*/
public interface StudentService {
List<Student> findAll(int page,int size) throws Exception;
Student findBySno(String sno) throws Exception;
List<Student> search(int page, int size, String keyword) throws Exception;
boolean add(Student student) throws Exception;
void delete(String sno) throws Exception;
void update(Student student) throws Exception;
//返回一个携带所有学生信息数据的InputStream输入流
InputStream getInputStream() throws Exception;
}

@ -139,7 +139,6 @@ public class AdminServiceImpl implements AdminService {
Object[] obj = new Object[7];
obj[0] = admins.get(i).getId();
obj[1] = admins.get(i).getUsername();
//可在此处设置密码是否MD5解密成普通可见密码
obj[2] = admins.get(i).getPassword();
obj[3] = admins.get(i).getName();
obj[4] = admins.get(i).getPhone();

@ -0,0 +1,126 @@
package cn.ppdxzz.service.impl;
import cn.ppdxzz.dao.StudentDao;
import cn.ppdxzz.domain.Student;
import cn.ppdxzz.poi.WriteExcel;
import cn.ppdxzz.service.StudentService;
import com.github.pagehelper.PageHelper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.List;
/**
* Description:
*
* @Date: 2020/2/17 14:22
* @Author: PeiChen
*/
@Service("studentService")
public class StudentServiceImpl implements StudentService {
private StudentDao studentDao;
@Autowired
public void setStudentDao(StudentDao studentDao) {
this.studentDao = studentDao;
}
/**
*
* @return
* @throws Exception
*/
@Override
public List<Student> findAll(int page,int size) throws Exception {
PageHelper.startPage(page,size);
return studentDao.findAll();
}
/**
* sno
* @return
* @throws Exception
*/
@Override
public Student findBySno(String sno) throws Exception {
return studentDao.findBySno(sno);
}
/**
*
* @return
* @throws Exception
*/
@Override
public List<Student> search(int page, int size, String keyword) throws Exception {
PageHelper.startPage(page,size);
return studentDao.search(keyword);
}
/**
*
* @param student
* @throws Exception
*/
@Override
public boolean add(Student student) throws Exception {
if (student == null || student.getName() == null || student.getSex() == null || student.getSno() == null
|| student.getPhone() == null || student.getPlace() == null || student.getDorm_id() == null
|| student.getTeacher() == null || student.getStu_class() == null) {
return false;
}
studentDao.add(student);
return true;
}
/**
*
* @param sno
* @throws Exception
*/
@Override
public void delete(String sno) throws Exception {
studentDao.delete(sno);
}
/**
*
* @param student
* @throws Exception
*/
@Override
public void update(Student student) throws Exception {
studentDao.update(student);
}
/**
*
* @return
* @throws Exception
*/
@Override
public InputStream getInputStream() throws Exception {
//Excel中的每列列名依次对应数据库的字段
String[] title = new String[]{"姓名","性别","学号","班级","联系方式","家庭住址","宿舍号","育人导师"};
List<Student> students = studentDao.findAll();
List<Object[]> datalist = new ArrayList<>();
for (int i = 0; i < students.size(); i++) {
Object[] obj = new Object[8];
obj[0] = students.get(i).getName();
obj[1] = students.get(i).getSex();
obj[2] = students.get(i).getSno();
obj[3] = students.get(i).getStu_class();
obj[4] = students.get(i).getPhone();
obj[5] = students.get(i).getPlace();
obj[6] = students.get(i).getDorm_id();
obj[7] = students.get(i).getTeacher();
datalist.add(obj);
}
WriteExcel excel = new WriteExcel(title,datalist);
return excel.export();
}
}

@ -60,8 +60,8 @@
</div>
<div class="row">
<div class="form-group btn-group col-md-offset-5">
<button class="btn btn-success" onclick="toValidate()">确认添加</button>
<a type="button" class="btn btn-primary" href="${pageContext.request.contextPath}/findAllAdmin">返回列表</a>
<button class="btn btn-primary" onclick="toValidate()">确认添加</button>
<a type="button" class="btn btn-default" href="${pageContext.request.contextPath}/findAllAdmin">返回列表</a>
</div>
</div>

@ -72,7 +72,7 @@
</div>
<xblock>
<a href="${pageContext.request.contextPath}/adminAdd" class="layui-btn layui-btn-normal"><i class="layui-icon">&#xe654;</i>添加</a>
<a onclick="exportInfo()" class="layui-btn layui-btn-warm" href="javascript:;"><i class="layui-icon">&#xe67c;</i>导出</a>
<a onclick="exportInfo(${sessionScope.adminInfo.power})" class="layui-btn layui-btn-warm" href="javascript:;"><i class="layui-icon">&#xe67c;</i>导出</a>
<span class="x-right" style="line-height:40px">共有数据:${pageInfo.total} 条</span>
</xblock>
<div class="layui-card-body">
@ -243,9 +243,14 @@
});
}
//导出Excel操作
function exportInfo() {
function exportInfo(power) {
if (power < 2) {
layer.msg('对不起,您权限不足!');
return false;
}
layer.confirm('确定导出管理员数据吗?',function (index) {
location.href="${pageContext.request.contextPath}/exportAdminInfo";
layer.close(index);
});
}
</script>

@ -30,6 +30,21 @@
<a><i title="展开左侧栏" class="iconfont">&#xe699;</i></a>
</div>
<ul class="layui-nav right" lay-filter="">
<li class="layui-nav-item">
<a href="javascript:;">我的消息</a>
<dl class="layui-nav-child">
<!-- 二级菜单 -->
<dd>
<a onclick="xadmin.add_tab('消息','http://www.baidu.com')">消息</a>
</dd>
<dd>
<a href="${pageContext.request.contextPath}">XXX</a>
</dd>
<dd>
<a href="${pageContext.request.contextPath}">XXX</a>
</dd>
</dl>
</li>
<li class="layui-nav-item">
<a href="javascript:;">${sessionScope.adminInfo.name}</a>
<dl class="layui-nav-child">
@ -43,7 +58,8 @@
</dl>
</li>
<li class="layui-nav-item to-index">
<a href="/">前台首页</a></li>
<a href="/">前台首页</a>
</li>
</ul>
</div>
<!-- 顶部结束 -->
@ -60,7 +76,7 @@
</a>
<ul class="sub-menu">
<li>
<a onclick="xadmin.add_tab('学生信息','welcome1.html')">
<a onclick="xadmin.add_tab('学生信息','${pageContext.request.contextPath}/student/findAll?page=1&size=4')">
<i class="iconfont">&#xe6a7;</i>
<cite>学生信息</cite></a>
</li>
@ -166,30 +182,9 @@
<i class="layui-icon">&#xe68e;</i>我的桌面
</li>
</ul>
<div class="layui-tab-content">
<div class="layui-tab-content"><%--中间的空白面板--%>
<div class="layui-tab-item layui-show o_div" >
<div class="layui-col-md6" style="padding: 30px;left: 60px;background-color: #F2F2F2;">
<div class="layui-card">
<div class="layui-card-header">个人信息
</div>
<div class="layui-card-body">
<%--<div class="layui-form-label" style="text-align: left">你好</div>--%>
用户名:${sessionScope.adminInfo.username}
</div>
<div class="layui-card-body">
密码:${sessionScope.adminInfo.password}
</div>
<div class="layui-card-body">
电话:${sessionScope.adminInfo.phone}
</div>
<div class="layui-card-body">
权限开启:${sessionScope.adminInfo.power}
</div>
<div class="layui-card-body">
描述:${sessionScope.adminInfo.description}
</div>
</div>
</div>
<jsp:include page="welcome.jsp"></jsp:include>
</div>
</div>
<div id="tab_show"></div>

@ -0,0 +1,123 @@
<%--
Created by IntelliJ IDEA.
User: user
Date: 2020/2/17
Time: 12:33
To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
<title>Title</title>
<link rel="stylesheet" href="${pageContext.request.contextPath}/css/bootstrap.css">
<script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery-3.1.1.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/js/bootstrap.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/layer/layer.js"></script>
</head>
<body>
<form>
<table class="table" style="width: 100%;text-align: center;">
<tbody>
<tr>
<td>
<label for="name">姓名</label>
</td>
<td>
<input type="text" class="form-control" id="name" name="name" maxlength="10" required>
</td>
<td>
<label for="sex">性别</label>
</td>
<td>
<select class="form-control" name="sex" id="sex">
<option value="男" selected>男</option>
<option value="女">女</option>
</select>
</td>
</tr>
<tr>
<td>
<label for="sno">学号</label>
</td>
<td>
<input type="text" name="sno" class="form-control" id="sno" aria-describedby="textHelp" maxlength="20" required>
</td>
<td>
<label for="stu_class">班级</label>
</td>
<td>
<input type="text" name="stu_class" class="form-control" id="stu_class" maxlength="30" required>
</td>
</tr>
<tr>
<td><label for="phone">联系方式</label></td>
<td>
<input type="text" name="phone" class="form-control" id="phone" minlength="11" maxlength="11" required>
</td>
<td><label for="place">家庭住址</label></td>
<td>
<input type="text" placeholder="请输入家庭详细地址" name="place" class="form-control" id="place" maxlength="30" required>
</td>
</tr>
<tr>
<td><label for="dorm1">宿舍号</label></td>
<td>
<select class="form-control" name="dorm1" id="dorm1">
<option value="西六" selected>西六</option>
<option value="西七">西七</option>
<option value="西十二">西十二</option>
<option value="西十三">西十三</option>
</select>
</td>
<td><select class="form-control" name="dorm2" id="dorm2">
<option value="A" selected>A</option>
<option value="B">B</option>
</select></td>
<td>
<input type="text" name="dorm3" placeholder="请直接输入宿舍号" maxlength="3" class="form-control" id="dorm3" required>
</td>
</tr>
<tr>
<td><label for="teacher">育人导师</label></td>
<td colspan="3">
<select class="form-control" name="teacher" id="teacher">
<option value="小李" selected>小李</option>
<option value="小王">小王</option>
<option value="小赵">小赵</option>
<option value="小飞">小飞</option>
<option value="小张">小张</option>
</select>
</td>
</tr>
<tr>
<td colspan="4">
<button type="submit" id="add-student" class="btn btn-primary">确认修改</button>
<a type="button" href="${pageContext.request.contextPath}/student/findAll" class="btn btn-default">返回列表</a>
</td>
</tr>
</tbody>
</table>
</form>
<script>
$("#add-student").click(function () {
var name = $("#name").val().trim();
var sex = $("#sex").val().trim();
var sno = $("#sno").val().trim();
var stu_class = $("#stu_class").val().trim();
var phone = $("#phone").val().trim();
var place = $("#place").val().trim();
var dorm3 = $("#dorm3").val().trim();
var teacher = $("#teacher").val().trim();
if (name == 0 || sex == 0 || sno == 0 || stu_class == 0 || phone == 0 || place == 0 || dorm3 == 0 || teacher == 0) {
layer.msg('字段不能为空');
return false;
}
var d1 = $("#dorm1").val();
var d2 = $("#dorm2").val();
var dorm_id = d1+""+d2+""+dorm3;
alert(dorm_id);
});
</script>
</body>
</html>

@ -0,0 +1,81 @@
<%--
Created by IntelliJ IDEA.
User: user
Date: 2020/2/17
Time: 12:34
To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
<title>Title</title>
<link rel="stylesheet" href="${pageContext.request.contextPath}/css/bootstrap.css">
<script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery-3.1.1.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/js/bootstrap.js"></script>
</head>
<body>
<form>
<table class="table" style="width: 100%;text-align: center;">
<tbody>
<tr>
<td>
<label for="name">姓名</label>
</td>
<td>
<input type="text" readonly class="form-control" value="peichen" id="name" name="name" required>
</td>
<td>
<label for="sex">性别</label>
</td>
<td>
<select class="form-control" name="sex" id="sex">
<option value="男" selected>男</option>
<option value="女">女</option>
</select>
</td>
</tr>
<tr>
<td>
<label for="sno">学号</label>
</td>
<td>
<input type="text" name="sno" class="form-control" id="sno" aria-describedby="textHelp" required>
</td>
<td>
<label for="class">班级</label>
</td>
<td>
<input type="text" name="class" class="form-control" id="class" required>
</td>
</tr>
<tr>
<td><label for="phone">联系方式</label></td>
<td>
<input type="text" name="phone" class="form-control" id="phone" required>
</td>
<td><label for="place">家庭住址</label></td>
<td>
<input type="text" name="place" class="form-control" id="place" required>
</td>
</tr>
<tr>
<td><label for="dorm_id">宿舍号</label></td>
<td>
<input type="text" name="dorm_id" class="form-control" id="dorm_id" required>
</td>
<td><label for="teacher">育人导师</label></td>
<td>
<input type="text" name="teacher" class="form-control" id="teacher" required>
</td>
</tr>
<tr>
<td colspan="4">
<button type="submit" id="addAdmin" class="btn btn-primary">确认修改</button>
<a type="button" class="btn btn-default">返回列表</a>
</td>
</tr>
</tbody>
</table>
</form>
</body>
</html>

@ -0,0 +1,226 @@
<%--
Created by IntelliJ IDEA.
User: user
Date: 2020/2/10
Time: 21:45
To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html class="x-admin-sm">
<head>
<meta charset="UTF-8">
<title></title>
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<link rel="stylesheet" href="${pageContext.request.contextPath}/css/font.css">
<link rel="stylesheet" href="${pageContext.request.contextPath}/css/xadmin.css">
<link rel="stylesheet" href="${pageContext.request.contextPath}/css/bootstrap.css">
<script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery-3.1.1.js"></script>
<script src="${pageContext.request.contextPath}/lib/layui/layui.js" charset="utf-8"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/js/xadmin.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/js/bootstrap.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery-3.1.1.js"></script>
<!--[if lt IE 9]>
<script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
<script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
<script>
function changePageSize() {
//获取下拉框的值
var pageSize = $("#changePageSize").val();
//向服务器发送请求,改变每页显示条数
location.href = "${pageContext.request.contextPath}/student/findAll?page=1&size="+ pageSize;
}
$("#serarch_btn").click(function () {
var keyword = $("#keyword").val();
location.href="${pageContext.request.contextPath}/student/findAll?page=1&size=4&keyword="+keyword;
});
$("#refresh").click(function () {
$("#myform").reset();
location.href="${pageContext.request.contextPath}/student/findAll?page=1&size=4";
});
</script>
</head>
<body>
<%--<div class="x-nav">
<span class="layui-breadcrumb">
<a href="">首页</a>
<a href="">演示</a>
<a>
<cite>导航元素</cite></a>
</span>
<a class="layui-btn layui-btn-small" style="line-height:1.6em;margin-top:3px;float:right" onclick="location.reload()" title="刷新">
<i class="layui-icon layui-icon-refresh" style="line-height:30px"></i></a>
</div>--%>
<div class="layui-fluid">
<div class="layui-row layui-col-space15">
<div class="layui-col-md12">
<div class="layui-card">
<div class="layui-card-body ">
<form id="myform" class="layui-form layui-col-space5">
<div class="layui-inline layui-show-xs-block">
<input class="layui-input" type="text" autocomplete="off" placeholder="请输入关键字" name="keyword" id="keyword" value="${param.keyword}">
</div>
<div class="layui-inline layui-show-xs-block">
<button class="layui-btn" id="serarch_btn" lay-submit="" lay-filter="sreach"><i class="layui-icon">&#xe615;</i></button>
</div>
<div class="layui-inline layui-show-xs-block x-right">
<a class="layui-btn layui-btn-normal" href="${pageContext.request.contextPath}/student/findAll?page=1&size=4"><i class="layui-icon">&#xe669;</i></a>
</div>
</form>
</div>
<xblock>
<c:if test="${sessionScope.adminInfo.power > 1 }">
<a onclick="exportInfo()" class="layui-btn layui-btn-warm" href="javascript:;"><i class="layui-icon">&#xe67c;</i>导出</a>
</c:if>
<span class="x-right" style="line-height:40px">共有数据:${pageInfo.total} 条</span>
</xblock>
<div class="layui-card-body">
<table class="layui-table layui-form">
<thead>
<tr style="text-align: center">
<th style="text-align: center">ID</th>
<th style="text-align: center">姓名</th>
<th style="text-align: center">性别</th>
<th style="text-align: center">学号</th>
<th style="text-align: center">班级</th>
<th style="text-align: center">联系方式</th>
<th style="text-align: center">家庭住址</th>
<th style="text-align: center">宿舍号</th>
<th style="text-align: center">育人导师</th>
<c:if test="${sessionScope.adminInfo.power > 1}">
<th style="text-align: center">操作</th>
</c:if>
</thead>
<tbody>
<%
int j = 1;
%>
<c:forEach items="${pageInfo.list}" var="student">
<tr id="light" style="text-align: center">
<td><%=j++%></td>
<td>${student.name}</td>
<td>${student.sex}</td>
<td>${student.sno}</td>
<td>${student.stu_class}</td>
<td>${student.phone}</td>
<td>${student.place}</td>
<td>${student.dorm_id}</td>
<td>${student.teacher}</td>
<c:if test="${sessionScope.adminInfo.power > 1}">
<td class="td-manage">
<a title="编辑" href="${pageContext.request.contextPath}">
<i class="layui-icon">&#xe642;</i>
</a>
<a title="注册" onclick="" href="${pageContext.request.contextPath}/student/addStudent">
<i class="layui-icon">&#xe654;</i>
</a>
<a title="删除" onclick="member_del(this,${student.sno},${sessionScope.adminInfo.power})" href="javascript:;">
<i class="layui-icon">&#xe640;</i>
</a>
</td>
</c:if>
</c:forEach>
</tr>
</tbody>
</table>
</div>
<div class="pull-left">
<div class="form-group form-inline">
共&nbsp;${pageInfo.pages}&nbsp;页&emsp;当前页:${pageInfo.pageNum}&nbsp;/&nbsp;${pageInfo.pages}&emsp; 每页
<select class="form-control" id="changePageSize" onchange="changePageSize()">
<option value="1">${pageInfo.size}</option>
<option value="2">2</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="10">10</option>
<option value="15">15</option>
<option value="20">20</option>
</select> 条
</div>
</div>
<c:choose>
<c:when test="${pageInfo.pages < 5}">
<c:set var="begin" value="1">
</c:set>
<c:set var="end" value="${pageInfo.pages}">
</c:set>
</c:when>
<c:when test="${pageInfo.pageNum <= 3}">
<c:set var="begin" value="1">
</c:set>
<c:set var="end" value="5">
</c:set>
</c:when>
<c:when test="${pageInfo.pageNum > 3 and pageInfo.pageNum <= pageInfo.pages-2}">
<c:set var="begin" value="${pageInfo.pageNum - 2}">
</c:set>
<c:set var="end" value="${pageInfo.pageNum + 2}">
</c:set>
</c:when>
<c:otherwise>
<c:set var="begin" value="${pageInfo.pages - 4}">
</c:set>
<c:set var="end" value="${pageInfo.pages}">
</c:set>
</c:otherwise>
</c:choose>
<div class="layui-card-body x-right" style="height: min-content">
<div class="page">
<div>
<a class="next" href="${pageContext.request.contextPath}/student/findAll?page=1&size=${pageInfo.pageSize}&keyword=${param.keyword}">首页</a>
<c:if test="${pageInfo.pageNum > 1}">
<a class="prev" href="${pageContext.request.contextPath}/student/findAll?page=${pageInfo.pageNum-1}&size=${pageInfo.pageSize}&keyword=${param.keyword}">上一页</a>
</c:if>
<c:forEach var="i" begin="${begin}" end="${end}" step="1">
<c:if test="${pageInfo.pageNum == i}">
<span class="current">${i}</span>
</c:if>
<c:if test="${pageInfo.pageNum != i}">
<a class="num" href="${pageContext.request.contextPath}/student/findAll?page=${i}&size=${pageInfo.pageSize}&keyword=${param.keyword}">${i}</a>
</c:if>
</c:forEach>
<c:if test="${pageInfo.pageNum < pageInfo.pages}">
<a class="next" href="${pageContext.request.contextPath}/student/findAll?page=${pageInfo.pageNum+1}&size=${pageInfo.pageSize}&keyword=${param.keyword}">下一页</a>
</c:if>
<a class="next" href="${pageContext.request.contextPath}/student/findAll?page=${pageInfo.pages}&size=${pageInfo.pageSize}&keyword=${param.keyword}">尾页</a>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script>
//删除操作
function member_del(obj,sno,power){
layer.confirm('确认要删除吗?',function(index){
if (power < 1){
layer.msg('对不起,您没有权限!');
return false;
}
//发异步删除数据
$.get("${pageContext.request.contextPath}/student/delete",{"sno":sno},function (data) {
if(data){
layer.msg('删除成功!',{icon:1,time:2000});
setTimeout(function () {window.location.href='${pageContext.request.contextPath}/student/findAll?page=1&size=4';},2000);
}else {
layer.msg('删除失败!',{icon:1,time:2000});
setTimeout(function () {window.location.href='${pageContext.request.contextPath}/student/findAll?page=1&size=4';},2000);
}
});
});
}
//导出Excel操作
function exportInfo() {
layer.confirm('确定导出所有学生数据吗?',function (index) {
location.href="${pageContext.request.contextPath}/student/export";
layer.close(index);
});
}
</script>
</body>
</html>

@ -9,15 +9,9 @@
<html>
<head>
<title>欢迎页面</title>
<LINK rel="stylesheet" href="css/bootstrap.min.css">
<link rel="stylesheet" href="css/bootstrap-theme.css">
</head>
<body>
<br><br><br>
<div class="container">
<div class="jumbotron">
<h1>欢迎登录宿舍信息管理系统!</h1>
</div>
</div>
&emsp;&emsp;&emsp;&emsp;&emsp;<h1>欢迎登录宿舍信息管理系统!</h1>
</body>
</html>

@ -0,0 +1 @@
/* your styles go here */

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

@ -60,8 +60,8 @@
</div>
<div class="row">
<div class="form-group btn-group col-md-offset-5">
<button class="btn btn-success" onclick="toValidate()">确认添加</button>
<a type="button" class="btn btn-primary" href="${pageContext.request.contextPath}/findAllAdmin">返回列表</a>
<button class="btn btn-primary" onclick="toValidate()">确认添加</button>
<a type="button" class="btn btn-default" href="${pageContext.request.contextPath}/findAllAdmin">返回列表</a>
</div>
</div>

@ -72,7 +72,7 @@
</div>
<xblock>
<a href="${pageContext.request.contextPath}/adminAdd" class="layui-btn layui-btn-normal"><i class="layui-icon">&#xe654;</i>添加</a>
<a onclick="exportInfo()" class="layui-btn layui-btn-warm" href="javascript:;"><i class="layui-icon">&#xe67c;</i>导出</a>
<a onclick="exportInfo(${sessionScope.adminInfo.power})" class="layui-btn layui-btn-warm" href="javascript:;"><i class="layui-icon">&#xe67c;</i>导出</a>
<span class="x-right" style="line-height:40px">共有数据:${pageInfo.total} 条</span>
</xblock>
<div class="layui-card-body">
@ -243,9 +243,14 @@
});
}
//导出Excel操作
function exportInfo() {
function exportInfo(power) {
if (power < 2) {
layer.msg('对不起,您权限不足!');
return false;
}
layer.confirm('确定导出管理员数据吗?',function (index) {
location.href="${pageContext.request.contextPath}/exportAdminInfo";
layer.close(index);
});
}
</script>

@ -30,6 +30,21 @@
<a><i title="展开左侧栏" class="iconfont">&#xe699;</i></a>
</div>
<ul class="layui-nav right" lay-filter="">
<li class="layui-nav-item">
<a href="javascript:;">我的消息</a>
<dl class="layui-nav-child">
<!-- 二级菜单 -->
<dd>
<a onclick="xadmin.add_tab('消息','http://www.baidu.com')">消息</a>
</dd>
<dd>
<a href="${pageContext.request.contextPath}">XXX</a>
</dd>
<dd>
<a href="${pageContext.request.contextPath}">XXX</a>
</dd>
</dl>
</li>
<li class="layui-nav-item">
<a href="javascript:;">${sessionScope.adminInfo.name}</a>
<dl class="layui-nav-child">
@ -43,7 +58,8 @@
</dl>
</li>
<li class="layui-nav-item to-index">
<a href="/">前台首页</a></li>
<a href="/">前台首页</a>
</li>
</ul>
</div>
<!-- 顶部结束 -->
@ -60,7 +76,7 @@
</a>
<ul class="sub-menu">
<li>
<a onclick="xadmin.add_tab('学生信息','welcome1.html')">
<a onclick="xadmin.add_tab('学生信息','${pageContext.request.contextPath}/student/findAll?page=1&size=4')">
<i class="iconfont">&#xe6a7;</i>
<cite>学生信息</cite></a>
</li>
@ -166,30 +182,9 @@
<i class="layui-icon">&#xe68e;</i>我的桌面
</li>
</ul>
<div class="layui-tab-content">
<div class="layui-tab-content"><%--中间的空白面板--%>
<div class="layui-tab-item layui-show o_div" >
<div class="layui-col-md6" style="padding: 30px;left: 60px;background-color: #F2F2F2;">
<div class="layui-card">
<div class="layui-card-header">个人信息
</div>
<div class="layui-card-body">
<%--<div class="layui-form-label" style="text-align: left">你好</div>--%>
用户名:${sessionScope.adminInfo.username}
</div>
<div class="layui-card-body">
密码:${sessionScope.adminInfo.password}
</div>
<div class="layui-card-body">
电话:${sessionScope.adminInfo.phone}
</div>
<div class="layui-card-body">
权限开启:${sessionScope.adminInfo.power}
</div>
<div class="layui-card-body">
描述:${sessionScope.adminInfo.description}
</div>
</div>
</div>
<jsp:include page="welcome.jsp"></jsp:include>
</div>
</div>
<div id="tab_show"></div>

@ -0,0 +1,118 @@
<%--
Created by IntelliJ IDEA.
User: user
Date: 2020/2/17
Time: 12:33
To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
<title>Title</title>
<link rel="stylesheet" href="${pageContext.request.contextPath}/css/bootstrap.css">
<script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery-3.1.1.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/js/bootstrap.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/layer/layer.js"></script>
</head>
<body>
<form>
<table class="table" style="width: 100%;text-align: center;">
<tbody>
<tr>
<td>
<label for="name">姓名</label>
</td>
<td>
<input type="text" class="form-control" id="name" name="name" maxlength="10" required>
</td>
<td>
<label for="sex">性别</label>
</td>
<td>
<select class="form-control" name="sex" id="sex">
<option value="男" selected>男</option>
<option value="女">女</option>
</select>
</td>
</tr>
<tr>
<td>
<label for="sno">学号</label>
</td>
<td>
<input type="text" name="sno" class="form-control" id="sno" aria-describedby="textHelp" maxlength="20" required>
</td>
<td>
<label for="stu_class">班级</label>
</td>
<td>
<input type="text" name="stu_class" class="form-control" id="stu_class" maxlength="30" required>
</td>
</tr>
<tr>
<td><label for="phone">联系方式</label></td>
<td>
<input type="text" name="phone" class="form-control" id="phone" minlength="11" maxlength="11" required>
</td>
<td><label for="place">家庭住址</label></td>
<td>
<input type="text" placeholder="请输入家庭详细地址" name="place" class="form-control" id="place" maxlength="30" required>
</td>
</tr>
<tr>
<td><label for="dorm1">宿舍号</label></td>
<td>
<select class="form-control" name="dorm1" id="dorm1">
<option value="西六" selected>西六</option>
<option value="西七">西七</option>
<option value="西十二">西十二</option>
<option value="西十三">西十三</option>
</select>
</td>
<td><select class="form-control" name="dorm2" id="dorm2">
<option value="A" selected>A</option>
<option value="B">B</option>
</select></td>
<td>
<input type="text" name="dorm3" placeholder="请直接输入宿舍号" maxlength="3" class="form-control" id="dorm3" required>
</td>
</tr>
<tr>
<td><label for="teacher">育人导师</label></td>
<td colspan="3">
<select class="form-control" name="teacher" id="teacher">
<option value="小李" selected>小李</option>
<option value="小王">小王</option>
<option value="小赵">小赵</option>
<option value="小飞">小飞</option>
<option value="小张">小张</option>
</select>
</td>
</tr>
<tr>
<td colspan="4">
<button type="submit" id="add-student" class="btn btn-primary">确认修改</button>
<a type="button" href="${pageContext.request.contextPath}/student/findAll" class="btn btn-default">返回列表</a>
</td>
</tr>
</tbody>
</table>
</form>
<script>
$("#add-student").click(function () {
if ($("#name").val().trim() == 0 || $("#sex").val().trim() == 0 || $("#sno").val().trim() == 0
|| $("#stu_class").val().trim() == 0 || $("#phone").val().trim() == 0 || $("#place").val().trim() == 0
|| $("#dorm3").val().trim() == 0 || $("#teacher").val().trim() == 0) {
layer.msg('字段不能为空');
return false;
}
var d1 = $("#dorm1").val();
var d2 = $("#dorm2").val();
var d3 = $("#dorm3").val().trim();
var dorm_id = d1+""+d2+""+d3;
alert(dorm_id);
});
</script>
</body>
</html>

@ -0,0 +1,81 @@
<%--
Created by IntelliJ IDEA.
User: user
Date: 2020/2/17
Time: 12:34
To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
<title>Title</title>
<link rel="stylesheet" href="${pageContext.request.contextPath}/css/bootstrap.css">
<script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery-3.1.1.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/js/bootstrap.js"></script>
</head>
<body>
<form>
<table class="table" style="width: 100%;text-align: center;">
<tbody>
<tr>
<td>
<label for="name">姓名</label>
</td>
<td>
<input type="text" readonly class="form-control" value="peichen" id="name" name="name" required>
</td>
<td>
<label for="sex">性别</label>
</td>
<td>
<select class="form-control" name="sex" id="sex">
<option value="男" selected>男</option>
<option value="女">女</option>
</select>
</td>
</tr>
<tr>
<td>
<label for="sno">学号</label>
</td>
<td>
<input type="text" name="sno" class="form-control" id="sno" aria-describedby="textHelp" required>
</td>
<td>
<label for="class">班级</label>
</td>
<td>
<input type="text" name="class" class="form-control" id="class" required>
</td>
</tr>
<tr>
<td><label for="phone">联系方式</label></td>
<td>
<input type="text" name="phone" class="form-control" id="phone" required>
</td>
<td><label for="place">家庭住址</label></td>
<td>
<input type="text" name="place" class="form-control" id="place" required>
</td>
</tr>
<tr>
<td><label for="dorm_id">宿舍号</label></td>
<td>
<input type="text" name="dorm_id" class="form-control" id="dorm_id" required>
</td>
<td><label for="teacher">育人导师</label></td>
<td>
<input type="text" name="teacher" class="form-control" id="teacher" required>
</td>
</tr>
<tr>
<td colspan="4">
<button type="submit" id="addAdmin" class="btn btn-primary">确认修改</button>
<a type="button" class="btn btn-default">返回列表</a>
</td>
</tr>
</tbody>
</table>
</form>
</body>
</html>

@ -0,0 +1,226 @@
<%--
Created by IntelliJ IDEA.
User: user
Date: 2020/2/10
Time: 21:45
To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html class="x-admin-sm">
<head>
<meta charset="UTF-8">
<title></title>
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<link rel="stylesheet" href="${pageContext.request.contextPath}/css/font.css">
<link rel="stylesheet" href="${pageContext.request.contextPath}/css/xadmin.css">
<link rel="stylesheet" href="${pageContext.request.contextPath}/css/bootstrap.css">
<script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery-3.1.1.js"></script>
<script src="${pageContext.request.contextPath}/lib/layui/layui.js" charset="utf-8"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/js/xadmin.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/js/bootstrap.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery-3.1.1.js"></script>
<!--[if lt IE 9]>
<script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
<script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
<script>
function changePageSize() {
//获取下拉框的值
var pageSize = $("#changePageSize").val();
//向服务器发送请求,改变每页显示条数
location.href = "${pageContext.request.contextPath}/student/findAll?page=1&size="+ pageSize;
}
$("#serarch_btn").click(function () {
var keyword = $("#keyword").val();
location.href="${pageContext.request.contextPath}/student/findAll?page=1&size=4&keyword="+keyword;
});
$("#refresh").click(function () {
$("#myform").reset();
location.href="${pageContext.request.contextPath}/student/findAll?page=1&size=4";
});
</script>
</head>
<body>
<%--<div class="x-nav">
<span class="layui-breadcrumb">
<a href="">首页</a>
<a href="">演示</a>
<a>
<cite>导航元素</cite></a>
</span>
<a class="layui-btn layui-btn-small" style="line-height:1.6em;margin-top:3px;float:right" onclick="location.reload()" title="刷新">
<i class="layui-icon layui-icon-refresh" style="line-height:30px"></i></a>
</div>--%>
<div class="layui-fluid">
<div class="layui-row layui-col-space15">
<div class="layui-col-md12">
<div class="layui-card">
<div class="layui-card-body ">
<form id="myform" class="layui-form layui-col-space5">
<div class="layui-inline layui-show-xs-block">
<input class="layui-input" type="text" autocomplete="off" placeholder="请输入关键字" name="keyword" id="keyword" value="${param.keyword}">
</div>
<div class="layui-inline layui-show-xs-block">
<button class="layui-btn" id="serarch_btn" lay-submit="" lay-filter="sreach"><i class="layui-icon">&#xe615;</i></button>
</div>
<div class="layui-inline layui-show-xs-block x-right">
<a class="layui-btn layui-btn-normal" href="${pageContext.request.contextPath}/student/findAll?page=1&size=4"><i class="layui-icon">&#xe669;</i></a>
</div>
</form>
</div>
<xblock>
<c:if test="${sessionScope.adminInfo.power > 1 }">
<a onclick="exportInfo()" class="layui-btn layui-btn-warm" href="javascript:;"><i class="layui-icon">&#xe67c;</i>导出</a>
</c:if>
<span class="x-right" style="line-height:40px">共有数据:${pageInfo.total} 条</span>
</xblock>
<div class="layui-card-body">
<table class="layui-table layui-form">
<thead>
<tr style="text-align: center">
<th style="text-align: center">ID</th>
<th style="text-align: center">姓名</th>
<th style="text-align: center">性别</th>
<th style="text-align: center">学号</th>
<th style="text-align: center">班级</th>
<th style="text-align: center">联系方式</th>
<th style="text-align: center">家庭住址</th>
<th style="text-align: center">宿舍号</th>
<th style="text-align: center">育人导师</th>
<c:if test="${sessionScope.adminInfo.power > 1}">
<th style="text-align: center">操作</th>
</c:if>
</thead>
<tbody>
<%
int j = 1;
%>
<c:forEach items="${pageInfo.list}" var="student">
<tr id="light" style="text-align: center">
<td><%=j++%></td>
<td>${student.name}</td>
<td>${student.sex}</td>
<td>${student.sno}</td>
<td>${student.stu_class}</td>
<td>${student.phone}</td>
<td>${student.place}</td>
<td>${student.dorm_id}</td>
<td>${student.teacher}</td>
<c:if test="${sessionScope.adminInfo.power > 1}">
<td class="td-manage">
<a title="编辑" href="${pageContext.request.contextPath}">
<i class="layui-icon">&#xe642;</i>
</a>
<a title="注册" onclick="" href="${pageContext.request.contextPath}/student/addStudent">
<i class="layui-icon">&#xe654;</i>
</a>
<a title="删除" onclick="member_del(this,${student.sno},${sessionScope.adminInfo.power})" href="javascript:;">
<i class="layui-icon">&#xe640;</i>
</a>
</td>
</c:if>
</c:forEach>
</tr>
</tbody>
</table>
</div>
<div class="pull-left">
<div class="form-group form-inline">
共&nbsp;${pageInfo.pages}&nbsp;页&emsp;当前页:${pageInfo.pageNum}&nbsp;/&nbsp;${pageInfo.pages}&emsp; 每页
<select class="form-control" id="changePageSize" onchange="changePageSize()">
<option value="1">${pageInfo.size}</option>
<option value="2">2</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="10">10</option>
<option value="15">15</option>
<option value="20">20</option>
</select> 条
</div>
</div>
<c:choose>
<c:when test="${pageInfo.pages < 5}">
<c:set var="begin" value="1">
</c:set>
<c:set var="end" value="${pageInfo.pages}">
</c:set>
</c:when>
<c:when test="${pageInfo.pageNum <= 3}">
<c:set var="begin" value="1">
</c:set>
<c:set var="end" value="5">
</c:set>
</c:when>
<c:when test="${pageInfo.pageNum > 3 and pageInfo.pageNum <= pageInfo.pages-2}">
<c:set var="begin" value="${pageInfo.pageNum - 2}">
</c:set>
<c:set var="end" value="${pageInfo.pageNum + 2}">
</c:set>
</c:when>
<c:otherwise>
<c:set var="begin" value="${pageInfo.pages - 4}">
</c:set>
<c:set var="end" value="${pageInfo.pages}">
</c:set>
</c:otherwise>
</c:choose>
<div class="layui-card-body x-right" style="height: min-content">
<div class="page">
<div>
<a class="next" href="${pageContext.request.contextPath}/student/findAll?page=1&size=${pageInfo.pageSize}&keyword=${param.keyword}">首页</a>
<c:if test="${pageInfo.pageNum > 1}">
<a class="prev" href="${pageContext.request.contextPath}/student/findAll?page=${pageInfo.pageNum-1}&size=${pageInfo.pageSize}&keyword=${param.keyword}">上一页</a>
</c:if>
<c:forEach var="i" begin="${begin}" end="${end}" step="1">
<c:if test="${pageInfo.pageNum == i}">
<span class="current">${i}</span>
</c:if>
<c:if test="${pageInfo.pageNum != i}">
<a class="num" href="${pageContext.request.contextPath}/student/findAll?page=${i}&size=${pageInfo.pageSize}&keyword=${param.keyword}">${i}</a>
</c:if>
</c:forEach>
<c:if test="${pageInfo.pageNum < pageInfo.pages}">
<a class="next" href="${pageContext.request.contextPath}/student/findAll?page=${pageInfo.pageNum+1}&size=${pageInfo.pageSize}&keyword=${param.keyword}">下一页</a>
</c:if>
<a class="next" href="${pageContext.request.contextPath}/student/findAll?page=${pageInfo.pages}&size=${pageInfo.pageSize}&keyword=${param.keyword}">尾页</a>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script>
//删除操作
function member_del(obj,sno,power){
layer.confirm('确认要删除吗?',function(index){
if (power < 1){
layer.msg('对不起,您没有权限!');
return false;
}
//发异步删除数据
$.get("${pageContext.request.contextPath}/student/delete",{"sno":sno},function (data) {
if(data){
layer.msg('删除成功!',{icon:1,time:2000});
setTimeout(function () {window.location.href='${pageContext.request.contextPath}/student/findAll?page=1&size=4';},2000);
}else {
layer.msg('删除失败!',{icon:1,time:2000});
setTimeout(function () {window.location.href='${pageContext.request.contextPath}/student/findAll?page=1&size=4';},2000);
}
});
});
}
//导出Excel操作
function exportInfo() {
layer.confirm('确定导出所有学生数据吗?',function (index) {
location.href="${pageContext.request.contextPath}/student/export";
layer.close(index);
});
}
</script>
</body>
</html>

@ -9,15 +9,9 @@
<html>
<head>
<title>欢迎页面</title>
<LINK rel="stylesheet" href="css/bootstrap.min.css">
<link rel="stylesheet" href="css/bootstrap-theme.css">
</head>
<body>
<br><br><br>
<div class="container">
<div class="jumbotron">
<h1>欢迎登录宿舍信息管理系统!</h1>
</div>
</div>
&emsp;&emsp;&emsp;&emsp;&emsp;<h1>欢迎登录宿舍信息管理系统!</h1>
</body>
</html>

@ -0,0 +1 @@
/* your styles go here */

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

@ -6,6 +6,7 @@
4. 2020.2.14把原来的登录页面更换成动态特效的登录页面并使用ajax完成登录的后台校验管理员查询功能完成了模糊查询但是模糊查询带上分页技术后页面跳转出现问题点击分页按钮后又重新查询了全部数据的分页查看了相关资料进行改进目前并未完全实现。
5. 2020.2.15实现了管理员信息模糊查询并分页的效果并增加了超级管理员可给普通管理员授权的功能着手实现数据导出功能发现程序运行时报错经验证后发现是json格式从后台传向前台需要经过解析故导入了相关依赖即可而后又遇到layui的Excel模块不可用开始着手解决。
6. 2020.2.16实现了管理员数据Excel格式的导出并可以指定保存位置。
7. 2020.2.17结束了管理员模块并继续开发学生模块后台controller、service、dao的CRUD功能已完成并测试成功前台页面所有学生信息可分页展示删除功能已实现前台注册学生功能还未实现待明天实现。

Loading…
Cancel
Save