├── .DS_Store ├── .gitattributes ├── README.md ├── pom.xml └── src ├── main ├── java │ └── com │ │ └── family │ │ ├── SpringbootFamilytestApplication.java │ │ ├── controller │ │ ├── AuserController.java │ │ ├── KeepController.java │ │ ├── LoopsController.java │ │ ├── MAdminController.java │ │ ├── OopController.java │ │ ├── UseropController.java │ │ └── VuserController.java │ │ ├── mapper │ │ ├── AuserMapper.java │ │ ├── KeepMapper.java │ │ ├── LoopsMapper.java │ │ ├── MAdminMapper.java │ │ ├── OopMapper.java │ │ ├── UseropMapper.java │ │ └── VuserMapper.java │ │ ├── page │ │ ├── View.java │ │ └── WebUrl.java │ │ ├── pojo │ │ ├── Auser.java │ │ ├── Keep.java │ │ ├── Loops.java │ │ ├── MAdmin.java │ │ ├── Oop.java │ │ ├── Userop.java │ │ └── Vuser.java │ │ └── service │ │ ├── AuserMapperService.java │ │ ├── KeepMapperService.java │ │ ├── LoopsMapperService.java │ │ ├── MAdminMapperService.java │ │ ├── OopMapperService.java │ │ ├── UseropMapperService.java │ │ ├── VuserMapperService.java │ │ └── impl │ │ ├── AuserMapperServiceImpl.java │ │ ├── KeepMapperServiceImpl.java │ │ ├── LoopsMapperServiceImpl.java │ │ ├── MAdminMapperServiceImpl.java │ │ ├── OopMapperServiceImpl.java │ │ ├── UseropMapperServiceImpl.java │ │ └── VuserMapperServiceImpl.java └── resources │ ├── application.yml │ ├── mapper │ ├── AuserMapper.xml │ ├── KeepMapper.xml │ ├── LoopsMapper.xml │ ├── MAdminMapper.xml │ ├── OopMapper.xml │ ├── UseropMapper.xml │ └── VuserMapper.xml │ ├── static │ ├── cop │ │ ├── css │ │ │ ├── admin.css │ │ │ ├── mian.css │ │ │ └── pintuer.css │ │ └── js │ │ │ ├── blog.js │ │ │ ├── jquery.js │ │ │ └── pintuer.js │ ├── css │ │ ├── admin.css │ │ ├── adminn.css │ │ ├── font.css │ │ ├── global.css │ │ ├── iconfont.eot │ │ ├── iconfont.svg │ │ ├── iconfont.ttf │ │ ├── iconfont.woff │ │ ├── pintuer.css │ │ └── xadmin.css │ ├── images │ │ ├── bg.jpg │ │ ├── info-img.png │ │ ├── item.png │ │ ├── logo-text.png │ │ └── logo.png │ ├── js │ │ ├── blog.js │ │ ├── index │ │ │ ├── article.js │ │ │ ├── article_details.js │ │ │ ├── article_pub.js │ │ │ ├── freezeheader.js │ │ │ ├── html5.js │ │ │ ├── index.js │ │ │ ├── set.js │ │ │ └── sliders.js │ │ ├── jquery.js │ │ ├── jquery │ │ │ ├── jquery-2.1.4.js │ │ │ └── jquery-2.1.4.min.js │ │ ├── pintuer.js │ │ └── xadmin.js │ ├── layer │ │ ├── layer.js │ │ ├── mobile │ │ │ ├── layer.js │ │ │ └── need │ │ │ │ └── layer.css │ │ └── skin │ │ │ └── default │ │ │ ├── icon-ext.png │ │ │ ├── icon.png │ │ │ ├── layer.css │ │ │ ├── loading-0.gif │ │ │ ├── loading-1.gif │ │ │ └── loading-2.gif │ └── layui │ │ ├── css │ │ ├── layui.css │ │ ├── layui.mobile.css │ │ └── modules │ │ │ ├── code.css │ │ │ ├── laydate │ │ │ └── default │ │ │ │ └── laydate.css │ │ │ └── layer │ │ │ └── default │ │ │ ├── icon-ext.png │ │ │ ├── icon.png │ │ │ ├── layer.css │ │ │ ├── loading-0.gif │ │ │ ├── loading-1.gif │ │ │ └── loading-2.gif │ │ ├── font │ │ ├── iconfont.eot │ │ ├── iconfont.svg │ │ ├── iconfont.ttf │ │ ├── iconfont.woff │ │ └── iconfont.woff2 │ │ ├── images │ │ └── face │ │ │ ├── 0.gif │ │ │ ├── 1.gif │ │ │ ├── 10.gif │ │ │ ├── 11.gif │ │ │ ├── 12.gif │ │ │ ├── 13.gif │ │ │ ├── 14.gif │ │ │ ├── 15.gif │ │ │ ├── 16.gif │ │ │ ├── 17.gif │ │ │ ├── 18.gif │ │ │ ├── 19.gif │ │ │ ├── 2.gif │ │ │ ├── 20.gif │ │ │ ├── 21.gif │ │ │ ├── 22.gif │ │ │ ├── 23.gif │ │ │ ├── 24.gif │ │ │ ├── 25.gif │ │ │ ├── 26.gif │ │ │ ├── 27.gif │ │ │ ├── 28.gif │ │ │ ├── 29.gif │ │ │ ├── 3.gif │ │ │ ├── 30.gif │ │ │ ├── 31.gif │ │ │ ├── 32.gif │ │ │ ├── 33.gif │ │ │ ├── 34.gif │ │ │ ├── 35.gif │ │ │ ├── 36.gif │ │ │ ├── 37.gif │ │ │ ├── 38.gif │ │ │ ├── 39.gif │ │ │ ├── 4.gif │ │ │ ├── 40.gif │ │ │ ├── 41.gif │ │ │ ├── 42.gif │ │ │ ├── 43.gif │ │ │ ├── 44.gif │ │ │ ├── 45.gif │ │ │ ├── 46.gif │ │ │ ├── 47.gif │ │ │ ├── 48.gif │ │ │ ├── 49.gif │ │ │ ├── 5.gif │ │ │ ├── 50.gif │ │ │ ├── 51.gif │ │ │ ├── 52.gif │ │ │ ├── 53.gif │ │ │ ├── 54.gif │ │ │ ├── 55.gif │ │ │ ├── 56.gif │ │ │ ├── 57.gif │ │ │ ├── 58.gif │ │ │ ├── 59.gif │ │ │ ├── 6.gif │ │ │ ├── 60.gif │ │ │ ├── 61.gif │ │ │ ├── 62.gif │ │ │ ├── 63.gif │ │ │ ├── 64.gif │ │ │ ├── 65.gif │ │ │ ├── 66.gif │ │ │ ├── 67.gif │ │ │ ├── 68.gif │ │ │ ├── 69.gif │ │ │ ├── 7.gif │ │ │ ├── 70.gif │ │ │ ├── 71.gif │ │ │ ├── 8.gif │ │ │ └── 9.gif │ │ ├── lay │ │ └── modules │ │ │ ├── carousel.js │ │ │ ├── code.js │ │ │ ├── colorpicker.js │ │ │ ├── element.js │ │ │ ├── flow.js │ │ │ ├── form.js │ │ │ ├── jquery.js │ │ │ ├── laydate.js │ │ │ ├── layedit.js │ │ │ ├── layer.js │ │ │ ├── laypage.js │ │ │ ├── laytpl.js │ │ │ ├── mobile.js │ │ │ ├── rate.js │ │ │ ├── slider.js │ │ │ ├── table.js │ │ │ ├── transfer.js │ │ │ ├── tree.js │ │ │ ├── upload.js │ │ │ └── util.js │ │ ├── layui.all.js │ │ └── layui.js │ └── templates │ ├── admin │ ├── m-admin-edit.html │ ├── m-admin-list.html │ └── m-admin-save.html │ ├── keep │ ├── keepadd.html │ ├── keepedit.html │ └── keeplist.html │ ├── lokhouse │ ├── key-add.html │ ├── key-edit.html │ └── key-list.html │ ├── loops │ ├── loopsedit.html │ ├── loopslist.html │ └── loppsadd.html │ ├── m-home-page.html │ ├── m-login.html │ ├── m-main.html │ ├── oop │ ├── oopadd.html │ ├── oopedit.html │ └── ooplist.html │ ├── user │ ├── useredit.html │ ├── userlist.html │ └── usersave.html │ ├── userop │ ├── useradd.html │ ├── userdit.html │ └── userlist.html │ ├── vivew │ ├── 404.html │ ├── about.html │ ├── comment.html │ ├── details.html │ ├── index.html │ ├── login.html │ └── message.html │ └── welcome1.html └── test └── java └── com └── family └── SpringbootFamilytestApplicationTests.java /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/SmartApartmentManagementSystem/4dff249cfcdc50047cc6df4004440abdd182774c/.DS_Store -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | *.js linguist-language=java 2 | *.css linguist-language=java 3 | *.html linguist-language=java 4 | *.vue linguist-language=java -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # 全目录 2 | 3 | [更多系统、论文,供君选择 ~~>](https://www.yuque.com/wisebit/blog) 4 | # 168.SmartApartmentManagementSystem 5 | 6 |

群: 983063232(大佬群 2TB学习资料,讲解)(入群获取sql文件)

7 | 8 |

168.智慧公寓管理系统

9 | 10 | 11 |

12 | 13 | 14 | 15 | 16 |

17 | 18 | # 简介 19 | 20 | 21 | > 本代码来源于网络,仅供学习参考使用,请入群(983063232)后联系群主索要sql文件! 22 | > 23 | > 提供1.远程部署/2.修改代码/3.设计文档指导/4.框架代码讲解等服务 24 | 25 | >访问路径 26 | > http://localhost:19967/family/vivelogin.m 27 | > 28 | > 15691086725 123 29 | > 30 | > http://localhost:19967/family/login.m 31 | > 32 | > 密码 : admin admin 33 | 34 | 35 | # 环境 36 | 37 | - IntelliJ IDEA 2009.3 38 | 39 | - Mysql 5.7.26 40 | 41 | - Tomcat 7.0.73 42 | 43 | - JDK 1.8 44 | 45 | 46 | 47 | 48 | ## 缩略图 49 | 50 | ![](https://bitwise.oss-cn-heyuan.aliyuncs.com/2024/9/10/a4f19dba-ec11-4cfa-a121-ba3ac9da3d1c.png) 51 | ![](https://bitwise.oss-cn-heyuan.aliyuncs.com/2024/9/10/0a7e91c2-95b9-460c-bdd6-17c7ccedf488.png) 52 | ![](https://bitwise.oss-cn-heyuan.aliyuncs.com/2024/9/10/7121926c-5fc0-4853-861e-ad0556fc375c.png) 53 | ![](https://bitwise.oss-cn-heyuan.aliyuncs.com/2024/9/10/93bd48d0-2189-447d-a099-c776a80eb2be.png) 54 | ![](https://bitwise.oss-cn-heyuan.aliyuncs.com/2024/9/10/1b403b56-dba0-488c-9015-ff425f24048b.png) 55 | ![](https://bitwise.oss-cn-heyuan.aliyuncs.com/2024/9/10/75beee10-a726-4842-87ba-f1af171fc9fb.png) 56 | ![](https://bitwise.oss-cn-heyuan.aliyuncs.com/2024/9/10/0dade780-4d56-4685-a046-4e3b4bbba0bc.png) 57 | 58 | 59 | -------------------------------------------------------------------------------- /pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | org.springframework.boot 7 | spring-boot-starter-parent 8 | 2.4.2 9 | 10 | 11 | com.family 12 | springboot-familytest 13 | 0.0.1-SNAPSHOT 14 | springboot-familytest 15 | Demo project for Spring Boot 16 | 17 | 1.8 18 | 19 | 20 | 21 | org.springframework.boot 22 | spring-boot-starter-thymeleaf 23 | 24 | 25 | org.springframework.boot 26 | spring-boot-starter-web 27 | 28 | 29 | mysql 30 | mysql-connector-java 31 | 32 | 33 | 34 | org.mybatis.spring.boot 35 | mybatis-spring-boot-starter 36 | 2.1.3 37 | 38 | 39 | com.alibaba 40 | druid 41 | 1.1.10 42 | 43 | 44 | 45 | org.projectlombok 46 | lombok 47 | 48 | 49 | 50 | log4j 51 | log4j 52 | 1.2.12 53 | 54 | 55 | 56 | org.springframework.boot 57 | spring-boot-starter-test 58 | test 59 | 60 | 61 | org.junit.vintage 62 | junit-vintage-engine 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | org.springframework.boot 72 | spring-boot-maven-plugin 73 | 74 | 75 | 76 | 77 | 78 | -------------------------------------------------------------------------------- /src/main/java/com/family/SpringbootFamilytestApplication.java: -------------------------------------------------------------------------------- 1 | package com.family; 2 | 3 | import org.mybatis.spring.annotation.MapperScan; 4 | import org.springframework.boot.SpringApplication; 5 | import org.springframework.boot.autoconfigure.SpringBootApplication; 6 | 7 | @SpringBootApplication 8 | @MapperScan("com.family.mapper") 9 | public class SpringbootFamilytestApplication { 10 | 11 | public static void main(String[] args) { 12 | SpringApplication.run(SpringbootFamilytestApplication.class, args); 13 | } 14 | 15 | } 16 | -------------------------------------------------------------------------------- /src/main/java/com/family/controller/AuserController.java: -------------------------------------------------------------------------------- 1 | package com.family.controller; 2 | 3 | import com.family.pojo.Auser; 4 | import com.family.service.AuserMapperService; 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.stereotype.Controller; 7 | import org.springframework.web.bind.annotation.*; 8 | 9 | import javax.servlet.http.HttpServletRequest; 10 | import java.util.HashMap; 11 | import java.util.List; 12 | import java.util.Map; 13 | 14 | @Controller 15 | @RequestMapping("/auser") 16 | public class AuserController { 17 | @Autowired 18 | private AuserMapperService auserMapperService; 19 | private Mapmap=new HashMap<>(); 20 | /** 21 | * 列表 22 | */ 23 | @RequestMapping("/keylist.m") 24 | @ResponseBody 25 | public Map keeplist() { 26 | List adminlist = auserMapperService.keeplist(); 27 | if (adminlist != null) { 28 | map.put("code", 0); 29 | map.put("msg", ""); 30 | map.put("count", adminlist.size()); 31 | map.put("data", adminlist); 32 | } 33 | return map; 34 | } 35 | 36 | /** 37 | * 添加 38 | * 39 | * @param auser 40 | * @return 41 | */ 42 | @PostMapping("/keyadd.m") 43 | @ResponseBody 44 | public Map saveMAdmin(Auser auser, HttpServletRequest request) { 45 | String useradd = null; 46 | Map saveMAdmin = null; 47 | String pageMname = request.getParameter("useradd"); 48 | List mAdmins = auserMapperService.keeplist(); 49 | for (Auser admin : mAdmins) { 50 | useradd = admin.getUseradd(); 51 | } 52 | if (!useradd.equals(pageMname)) { 53 | saveMAdmin = auserMapperService.saveMAdmin(auser); 54 | } else { 55 | try { 56 | throw new Exception("已经存在"); 57 | } catch (Exception e) { 58 | e.printStackTrace(); 59 | } 60 | } 61 | return saveMAdmin; 62 | } 63 | /** 64 | * 修改 65 | * 66 | * @param auser 67 | * @return 68 | */ 69 | @PutMapping("/keyedit.m") 70 | @ResponseBody 71 | public Map editMAdmin(Auser auser) { 72 | return auserMapperService.editMAdmin(auser); 73 | } 74 | /** 75 | * 根据id删除 76 | * 77 | * @param id 78 | * @return 79 | */ 80 | @DeleteMapping("/delMAdminById.m") 81 | @ResponseBody 82 | public Map delMAdminById(Integer id) { 83 | return auserMapperService.delMAdminById(id); 84 | } 85 | } 86 | -------------------------------------------------------------------------------- /src/main/java/com/family/controller/KeepController.java: -------------------------------------------------------------------------------- 1 | package com.family.controller; 2 | 3 | import com.family.pojo.Keep; 4 | import com.family.pojo.Userop; 5 | import com.family.service.KeepMapperService; 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | import org.springframework.stereotype.Controller; 8 | import org.springframework.web.bind.annotation.*; 9 | 10 | import javax.servlet.http.HttpServletRequest; 11 | import java.util.HashMap; 12 | import java.util.List; 13 | import java.util.Map; 14 | 15 | @Controller 16 | @RequestMapping("/keep") 17 | public class KeepController { 18 | @Autowired 19 | private KeepMapperService keepMapperService; 20 | private Mapmap=new HashMap<>(); 21 | /** 22 | * 列表 23 | */ 24 | @RequestMapping("/keeplist.m") 25 | @ResponseBody 26 | public Map keeplist() { 27 | List adminlist = keepMapperService.keeplist(); 28 | if (adminlist != null) { 29 | map.put("code", 0); 30 | map.put("msg", ""); 31 | map.put("count", adminlist.size()); 32 | map.put("data", adminlist); 33 | } 34 | return map; 35 | } 36 | 37 | /** 38 | * 添加 39 | * 40 | * @param keep 41 | * @return 42 | */ 43 | @PostMapping("/keepadd.m") 44 | @ResponseBody 45 | public Map saveMAdmin(Keep keep, HttpServletRequest request) { 46 | String fap = null; 47 | Map saveMAdmin = null; 48 | String pageMname = request.getParameter("fap"); 49 | List mAdmins = keepMapperService.keeplist(); 50 | for (Keep admin : mAdmins) { 51 | fap = admin.getFap(); 52 | } 53 | if (!fap.equals(pageMname)) { 54 | saveMAdmin = keepMapperService.saveMAdmin(keep); 55 | } else { 56 | try { 57 | throw new Exception("已经存在"); 58 | } catch (Exception e) { 59 | e.printStackTrace(); 60 | } 61 | } 62 | return saveMAdmin; 63 | } 64 | /** 65 | * 修改 66 | * 67 | * @param keep 68 | * @return 69 | */ 70 | @PutMapping("/keepedit.m") 71 | @ResponseBody 72 | public Map editMAdmin(Keep keep) { 73 | return keepMapperService.editMAdmin(keep); 74 | } 75 | /** 76 | * 根据id删除 77 | * 78 | * @param id 79 | * @return 80 | */ 81 | @DeleteMapping("/delMAdminById.m") 82 | @ResponseBody 83 | public Map delMAdminById(Integer id) { 84 | return keepMapperService.delMAdminById(id); 85 | } 86 | } 87 | -------------------------------------------------------------------------------- /src/main/java/com/family/controller/LoopsController.java: -------------------------------------------------------------------------------- 1 | package com.family.controller; 2 | 3 | import com.family.pojo.Loops; 4 | import com.family.service.LoopsMapperService; 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.stereotype.Controller; 7 | import org.springframework.web.bind.annotation.*; 8 | 9 | import javax.servlet.http.HttpServletRequest; 10 | import java.util.HashMap; 11 | import java.util.List; 12 | import java.util.Map; 13 | 14 | @Controller 15 | @RequestMapping("/loop") 16 | public class LoopsController { 17 | @Autowired 18 | private LoopsMapperService loopMapperService; 19 | private Mapmap=new HashMap<>(); 20 | /** 21 | * 列表 22 | */ 23 | @RequestMapping("/loopslist.m") 24 | @ResponseBody 25 | public Map keeplist() { 26 | List adminlist = loopMapperService.keeplist(); 27 | if (adminlist != null) { 28 | map.put("code", 0); 29 | map.put("msg", ""); 30 | map.put("count", adminlist.size()); 31 | map.put("data", adminlist); 32 | } 33 | return map; 34 | } 35 | /** 36 | * 添加 37 | * 38 | * @param loops 39 | * @return 40 | */ 41 | @PostMapping("/loppsadd.m") 42 | @ResponseBody 43 | public Map saveMAdmin(Loops loops, HttpServletRequest request) { 44 | String tuisu = null; 45 | Map saveMAdmin = null; 46 | String pageMname = request.getParameter("tuisu"); 47 | List mAdmins = loopMapperService.keeplist(); 48 | for (Loops admin : mAdmins) { 49 | tuisu = admin.getTuisu(); 50 | } 51 | if (!tuisu.equals(pageMname)) { 52 | saveMAdmin = loopMapperService.saveMAdmin(loops); 53 | } else { 54 | try { 55 | throw new Exception("已经存在"); 56 | } catch (Exception e) { 57 | e.printStackTrace(); 58 | } 59 | } 60 | return saveMAdmin; 61 | } 62 | /** 63 | * 修改 64 | * 65 | * @param loops 66 | * @return 67 | */ 68 | @PutMapping("/loopsedit.m") 69 | @ResponseBody 70 | public Map editMAdmin(Loops loops) { 71 | return loopMapperService.editMAdmin(loops); 72 | } 73 | /** 74 | * 根据id删除 75 | * 76 | * @param id 77 | * @return 78 | */ 79 | @DeleteMapping("/delMAdminById.m") 80 | @ResponseBody 81 | public Map delMAdminById(Integer id) { 82 | return loopMapperService.delMAdminById(id); 83 | } 84 | } 85 | -------------------------------------------------------------------------------- /src/main/java/com/family/controller/MAdminController.java: -------------------------------------------------------------------------------- 1 | package com.family.controller; 2 | 3 | import com.family.pojo.MAdmin; 4 | import com.family.service.MAdminMapperService; 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.stereotype.Controller; 7 | import org.springframework.web.bind.annotation.*; 8 | 9 | import javax.servlet.http.HttpServletRequest; 10 | import javax.servlet.http.HttpSession; 11 | import java.util.HashMap; 12 | import java.util.List; 13 | import java.util.Map; 14 | 15 | @Controller 16 | @RequestMapping("/family") 17 | public class MAdminController { 18 | @Autowired 19 | private MAdminMapperService mAdminMapperService; 20 | private Map map = new HashMap<>(); 21 | 22 | /** 23 | * 管理员登录 24 | * 25 | * @param mAdmin 26 | * @param request 27 | * @return 28 | */ 29 | @RequestMapping("/login.m") 30 | @ResponseBody 31 | public Map adminLogin(MAdmin mAdmin, HttpServletRequest request) { 32 | Map admin = mAdminMapperService.adminLogin(mAdmin); 33 | if (admin != null) { 34 | request.getSession().setAttribute("MAdmin", admin); 35 | request.getSession().setAttribute("mname", mAdmin.getMname()); 36 | 37 | } 38 | return admin; 39 | } 40 | 41 | /** 42 | * 管理员退出登录 43 | * 44 | * @param session 45 | * @return 46 | */ 47 | @RequestMapping("/signOut") 48 | @ResponseBody 49 | public Map signOut(HttpSession session) { 50 | session.removeAttribute("MAdmin"); 51 | session.removeAttribute("mname"); 52 | map.put("signOut", "signOut"); 53 | return map; 54 | } 55 | 56 | /** 57 | * 查询管理员的列表 58 | * 59 | * @return 60 | */ 61 | @RequestMapping("/adminlist.m") 62 | @ResponseBody 63 | public Map mAdminList() { 64 | List mAdmins = mAdminMapperService.mAdminList(); 65 | if (mAdmins != null) { 66 | map.put("code", 0); 67 | map.put("msg", ""); 68 | map.put("count", mAdmins.size()); 69 | map.put("data", mAdmins); 70 | } 71 | return map; 72 | } 73 | 74 | /** 75 | * 添加一条管理员信息 76 | * 77 | * @param mAdmin 78 | * @return 79 | */ 80 | @PostMapping("/adminsave.m") 81 | @ResponseBody 82 | public Map saveMAdmin(MAdmin mAdmin, HttpServletRequest request) { 83 | String mname = null; 84 | Map saveMAdmin = null; 85 | String pageMname = request.getParameter("mname"); 86 | List mAdmins = mAdminMapperService.mAdminList(); 87 | for (MAdmin admin : mAdmins) { 88 | mname = admin.getMname(); 89 | } 90 | if (!mname.equals(pageMname)) { 91 | saveMAdmin = mAdminMapperService.saveMAdmin(mAdmin); 92 | } else { 93 | try { 94 | throw new Exception("账号已经存在"); 95 | } catch (Exception e) { 96 | e.printStackTrace(); 97 | } 98 | } 99 | return saveMAdmin; 100 | } 101 | 102 | /** 103 | * 修改管理员信息 104 | * 105 | * @param mAdmin 106 | * @return 107 | */ 108 | @PutMapping("/adminedit.m") 109 | @ResponseBody 110 | public Map editMAdmin(MAdmin mAdmin) { 111 | return mAdminMapperService.editMAdmin(mAdmin); 112 | } 113 | 114 | /** 115 | * 根据id删除一条管理员信息 116 | * 117 | * @param id 118 | * @return 119 | */ 120 | @DeleteMapping("/delMAdminById.m") 121 | @ResponseBody 122 | public Map delMAdminById(Integer id) { 123 | return mAdminMapperService.delMAdminById(id); 124 | } 125 | } 126 | -------------------------------------------------------------------------------- /src/main/java/com/family/controller/OopController.java: -------------------------------------------------------------------------------- 1 | package com.family.controller; 2 | 3 | import com.family.pojo.Oop; 4 | import com.family.service.OopMapperService; 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.stereotype.Controller; 7 | import org.springframework.web.bind.annotation.*; 8 | import javax.servlet.http.HttpServletRequest; 9 | import java.util.HashMap; 10 | import java.util.List; 11 | import java.util.Map; 12 | 13 | @Controller 14 | @RequestMapping("/oop") 15 | public class OopController { 16 | @Autowired 17 | private OopMapperService oopMapperService; 18 | private Map map=new HashMap<>(); 19 | /** 20 | * 列表 21 | */ 22 | @RequestMapping("/ooplist.m") 23 | @ResponseBody 24 | public Map keeplist() { 25 | List adminlist = oopMapperService.keeplist(); 26 | if (adminlist != null) { 27 | map.put("code", 0); 28 | map.put("msg", ""); 29 | map.put("count", adminlist.size()); 30 | map.put("data", adminlist); 31 | } 32 | return map; 33 | } 34 | /** 35 | * 添加 36 | * 37 | * @param oop 38 | * @return 39 | */ 40 | @PostMapping("/oopadd.m") 41 | @ResponseBody 42 | public Map saveMAdmin(Oop oop, HttpServletRequest request) { 43 | String names = null; 44 | Map saveMAdmin = null; 45 | String pageMname = request.getParameter("names"); 46 | List mAdmins = oopMapperService.keeplist(); 47 | for (Oop admin : mAdmins) { 48 | names = admin.getNames(); 49 | } 50 | if (!names.equals(pageMname)) { 51 | saveMAdmin = oopMapperService.saveMAdmin(oop); 52 | } else { 53 | try { 54 | throw new Exception("已经存在"); 55 | } catch (Exception e) { 56 | e.printStackTrace(); 57 | } 58 | } 59 | return saveMAdmin; 60 | } 61 | /** 62 | * 修改 63 | * 64 | * @param oop 65 | * @return 66 | */ 67 | @PutMapping("/oopedit.m") 68 | @ResponseBody 69 | public Map editMAdmin(Oop oop) { 70 | return oopMapperService.editMAdmin(oop); 71 | } 72 | /** 73 | * 根据id删除 74 | * 75 | * @param id 76 | * @return 77 | */ 78 | @DeleteMapping("/delMAdminById.m") 79 | @ResponseBody 80 | public Map delMAdminById(Integer id) { 81 | return oopMapperService.delMAdminById(id); 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /src/main/java/com/family/controller/UseropController.java: -------------------------------------------------------------------------------- 1 | package com.family.controller; 2 | 3 | import com.family.pojo.Userop; 4 | import com.family.service.UseropMapperService; 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.stereotype.Controller; 7 | import org.springframework.web.bind.annotation.*; 8 | 9 | import javax.servlet.http.HttpServletRequest; 10 | import java.util.HashMap; 11 | import java.util.List; 12 | import java.util.Map; 13 | 14 | @Controller 15 | @RequestMapping("/userop") 16 | public class UseropController { 17 | @Autowired 18 | private UseropMapperService useropMapperService; 19 | private Mapmap=new HashMap<>(); 20 | /** 21 | * 列表 22 | */ 23 | @RequestMapping("/userlist.m") 24 | @ResponseBody 25 | public Map keeplist() { 26 | List adminlist = useropMapperService.keeplist(); 27 | if (adminlist != null) { 28 | map.put("code", 0); 29 | map.put("msg", ""); 30 | map.put("count", adminlist.size()); 31 | map.put("data", adminlist); 32 | } 33 | return map; 34 | } 35 | /** 36 | * 添加 37 | * 38 | * @param userop 39 | * @return 40 | */ 41 | @PostMapping("/useradd.m") 42 | @ResponseBody 43 | public Map saveMAdmin(Userop userop, HttpServletRequest request) { 44 | String zhichu = null; 45 | Map saveMAdmin = null; 46 | String pageMname = request.getParameter("zhichu"); 47 | List mAdmins = useropMapperService.keeplist(); 48 | for (Userop admin : mAdmins) { 49 | zhichu = admin.getZhichu(); 50 | } 51 | if (!zhichu.equals(pageMname)) { 52 | saveMAdmin = useropMapperService.saveMAdmin(userop); 53 | } else { 54 | try { 55 | throw new Exception("已经存在"); 56 | } catch (Exception e) { 57 | e.printStackTrace(); 58 | } 59 | } 60 | return saveMAdmin; 61 | } 62 | /** 63 | * 修改 64 | * 65 | * @param userop 66 | * @return 67 | */ 68 | @PutMapping("/userdit.m") 69 | @ResponseBody 70 | public Map editMAdmin(Userop userop) { 71 | return useropMapperService.editMAdmin(userop); 72 | } 73 | /** 74 | * 根据id删除 75 | * 76 | * @param id 77 | * @return 78 | */ 79 | @DeleteMapping("/delMAdminById.m") 80 | @ResponseBody 81 | public Map delMAdminById(Integer id) { 82 | return useropMapperService.delMAdminById(id); 83 | } 84 | } 85 | -------------------------------------------------------------------------------- /src/main/java/com/family/controller/VuserController.java: -------------------------------------------------------------------------------- 1 | package com.family.controller; 2 | 3 | import com.family.pojo.Vuser; 4 | import com.family.service.VuserMapperService; 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.stereotype.Controller; 7 | import org.springframework.web.bind.annotation.*; 8 | 9 | import javax.servlet.http.HttpServletRequest; 10 | import javax.servlet.http.HttpSession; 11 | import java.util.HashMap; 12 | import java.util.List; 13 | import java.util.Map; 14 | 15 | @Controller 16 | @RequestMapping("/vuser") 17 | public class VuserController { 18 | @Autowired 19 | private VuserMapperService vuserMapperService; 20 | private Mapmap=new HashMap<>(); 21 | /** 22 | * 用户登录 23 | * 24 | * @param vuser 25 | * @param request 26 | * @return 27 | */ 28 | @RequestMapping("/vivelogin.m") 29 | @ResponseBody 30 | public Map adminLogin(Vuser vuser, HttpServletRequest request) { 31 | Map admin = vuserMapperService.adminLogin(vuser); 32 | if (admin != null) { 33 | request.getSession().setAttribute("Vuser", admin); 34 | request.getSession().setAttribute("names", vuser.getNames()); 35 | } 36 | return admin; 37 | } 38 | /** 39 | * 用户退出登录 40 | * 41 | * @param session 42 | * @return 43 | */ 44 | @RequestMapping("/signOut") 45 | @ResponseBody 46 | public Map signOut(HttpSession session) { 47 | session.removeAttribute("Vuser"); 48 | session.removeAttribute("names"); 49 | map.put("signOut", "signOut"); 50 | return map; 51 | } 52 | /** 53 | * 查询列表 54 | * 55 | * @return 56 | */ 57 | @RequestMapping("/userelist.m") 58 | @ResponseBody 59 | public Map mAdminList() { 60 | List mAdmins = vuserMapperService.mAdminList(); 61 | if (mAdmins != null) { 62 | map.put("code", 0); 63 | map.put("msg", ""); 64 | map.put("count", mAdmins.size()); 65 | map.put("data", mAdmins); 66 | } 67 | return map; 68 | } 69 | /** 70 | * 添加信息 71 | * 72 | * @param vuser 73 | * @return 74 | */ 75 | @PostMapping("/usersave.m") 76 | @ResponseBody 77 | public Map saveMAdmin(Vuser vuser, HttpServletRequest request) { 78 | String names = null; 79 | Map saveMAdmin = null; 80 | String pageMname = request.getParameter("names"); 81 | List mAdmins = vuserMapperService.mAdminList(); 82 | for (Vuser admin : mAdmins) { 83 | names = admin.getNames(); 84 | } 85 | if (!names.equals(pageMname)) { 86 | saveMAdmin = vuserMapperService.saveMAdmin(vuser); 87 | } else { 88 | try { 89 | throw new Exception("账号已经存在"); 90 | } catch (Exception e) { 91 | e.printStackTrace(); 92 | } 93 | } 94 | return saveMAdmin; 95 | } 96 | /** 97 | * 修改信息 98 | * 99 | * @param vuser 100 | * @return 101 | */ 102 | @PutMapping("/useredit.m") 103 | @ResponseBody 104 | public Map editMAdmin(Vuser vuser) { 105 | return vuserMapperService.editMAdmin(vuser); 106 | } 107 | /** 108 | * 根据id删除信息 109 | * 110 | * @param id 111 | * @return 112 | */ 113 | @DeleteMapping("/delMAdminById.m") 114 | @ResponseBody 115 | public Map delMAdminById(Integer id) { 116 | return vuserMapperService.delMAdminById(id); 117 | } 118 | } 119 | -------------------------------------------------------------------------------- /src/main/java/com/family/mapper/AuserMapper.java: -------------------------------------------------------------------------------- 1 | package com.family.mapper; 2 | 3 | import com.family.pojo.Auser; 4 | import org.apache.ibatis.annotations.Mapper; 5 | 6 | import java.util.List; 7 | 8 | @Mapper 9 | public interface AuserMapper { 10 | List keeplist(); 11 | 12 | Integer saveMAdmin(Auser auser); 13 | 14 | Integer editMAdmin(Auser auser); 15 | 16 | Integer delMAdminById(Integer id); 17 | } 18 | -------------------------------------------------------------------------------- /src/main/java/com/family/mapper/KeepMapper.java: -------------------------------------------------------------------------------- 1 | package com.family.mapper; 2 | 3 | import com.family.pojo.Keep; 4 | import org.apache.ibatis.annotations.Mapper; 5 | 6 | import java.util.List; 7 | @Mapper 8 | public interface KeepMapper { 9 | List keeplist(); 10 | 11 | Integer saveMAdmin(Keep keep); 12 | 13 | Integer editMAdmin(Keep keep); 14 | 15 | Integer delMAdminById(Integer id); 16 | 17 | } 18 | -------------------------------------------------------------------------------- /src/main/java/com/family/mapper/LoopsMapper.java: -------------------------------------------------------------------------------- 1 | package com.family.mapper; 2 | 3 | import com.family.pojo.Loops; 4 | 5 | import java.util.List; 6 | 7 | public interface LoopsMapper { 8 | List keeplist(); 9 | 10 | Integer saveMAdmin(Loops loops); 11 | 12 | Integer editMAdmin(Loops loops); 13 | 14 | Integer delMAdminById(Integer id); 15 | 16 | } 17 | -------------------------------------------------------------------------------- /src/main/java/com/family/mapper/MAdminMapper.java: -------------------------------------------------------------------------------- 1 | package com.family.mapper; 2 | 3 | import com.family.pojo.MAdmin; 4 | import org.apache.ibatis.annotations.Mapper; 5 | 6 | import java.util.List; 7 | @Mapper 8 | public interface MAdminMapper { 9 | MAdmin adminLogin(MAdmin mAdmin); 10 | 11 | List mAdminList(); 12 | 13 | Integer saveMAdmin(MAdmin mAdmin); 14 | 15 | Integer editMAdmin(MAdmin mAdmin); 16 | 17 | Integer delMAdminById(Integer id); 18 | } 19 | -------------------------------------------------------------------------------- /src/main/java/com/family/mapper/OopMapper.java: -------------------------------------------------------------------------------- 1 | package com.family.mapper; 2 | 3 | import com.family.pojo.Oop; 4 | 5 | import java.util.List; 6 | 7 | public interface OopMapper { 8 | List keeplist(); 9 | 10 | Integer saveMAdmin(Oop oop); 11 | 12 | Integer editMAdmin(Oop oop); 13 | 14 | Integer delMAdminById(Integer id); 15 | } 16 | -------------------------------------------------------------------------------- /src/main/java/com/family/mapper/UseropMapper.java: -------------------------------------------------------------------------------- 1 | package com.family.mapper; 2 | 3 | import com.family.pojo.Userop; 4 | import org.apache.ibatis.annotations.Mapper; 5 | 6 | import java.util.List; 7 | @Mapper 8 | public interface UseropMapper { 9 | List keeplist(); 10 | 11 | Integer saveMAdmin(Userop userop); 12 | 13 | Integer editMAdmin(Userop userop); 14 | 15 | Integer delMAdminById(Integer id); 16 | 17 | } 18 | -------------------------------------------------------------------------------- /src/main/java/com/family/mapper/VuserMapper.java: -------------------------------------------------------------------------------- 1 | package com.family.mapper; 2 | 3 | import com.family.pojo.Vuser; 4 | import org.apache.ibatis.annotations.Mapper; 5 | 6 | import java.util.List; 7 | 8 | @Mapper 9 | public interface VuserMapper { 10 | Vuser adminLogin(Vuser vuser); 11 | 12 | List mAdminList(); 13 | 14 | Integer saveMAdmin(Vuser vuser); 15 | 16 | Integer editMAdmin(Vuser vuser); 17 | 18 | Integer delMAdminById(Integer id); 19 | 20 | } 21 | -------------------------------------------------------------------------------- /src/main/java/com/family/page/View.java: -------------------------------------------------------------------------------- 1 | package com.family.page; 2 | 3 | import org.springframework.stereotype.Controller; 4 | import org.springframework.web.bind.annotation.RequestMapping; 5 | 6 | /** 7 | * 前端页面入口 8 | */ 9 | @Controller 10 | public class View { 11 | /** 12 | * 登录 13 | */ 14 | @RequestMapping("/vivelogin.m") 15 | public String vivelogin(){return "vivew/login";} 16 | /** 17 | * 迎新 18 | */ 19 | @RequestMapping("/viveindex.m") 20 | public String viveindex(){return "vivew/index";} 21 | /** 22 | * 宿舍考评可视化 23 | */ 24 | @RequestMapping("/vivemessage.m") 25 | public String vivemessage(){return "vivew/message";} 26 | /** 27 | * 公寓管理 28 | */ 29 | @RequestMapping("/viveabout.m") 30 | public String viveabout(){return "vivew/about";} 31 | /** 32 | * 登记管理 33 | */ 34 | @RequestMapping("/vive404.m") 35 | public String vive404(){return "vivew/404";} 36 | /** 37 | * 门禁出入 38 | */ 39 | @RequestMapping("/vivecomment.m") 40 | public String vivecomment(){return "vivew/comment";} 41 | /** 42 | * 退宿离校 43 | */ 44 | @RequestMapping("/vivedetails.m") 45 | public String vivedetails(){return "vivew/details";} 46 | 47 | /** 48 | * 列表 49 | */ 50 | @RequestMapping("/userelist.m") 51 | public String userelist(){return "user/userlist";} 52 | /** 53 | * 添加 54 | */ 55 | @RequestMapping("/usersave.m") 56 | public String usersave(){return "user/usersave";} 57 | /** 58 | * 修改 59 | */ 60 | @RequestMapping("/useredit.m") 61 | public String useredit(){return "user/useredit";} 62 | 63 | } 64 | -------------------------------------------------------------------------------- /src/main/java/com/family/page/WebUrl.java: -------------------------------------------------------------------------------- 1 | package com.family.page; 2 | 3 | import org.springframework.stereotype.Controller; 4 | import org.springframework.web.bind.annotation.RequestMapping; 5 | 6 | /** 7 | * 后台页面控制入口 8 | */ 9 | @Controller 10 | public class WebUrl { 11 | /** 12 | * 进入后台管理系统 13 | */ 14 | @RequestMapping("/login.m") 15 | public String goManagementLogin() { 16 | return "m-login"; 17 | } 18 | /** 19 | * 管理员列表 20 | */ 21 | @RequestMapping("/adminlist.m") 22 | public String adminlist() { 23 | return "admin/m-admin-list"; 24 | } 25 | /** 26 | * 管理员添加 27 | */ 28 | @RequestMapping("/adminsave.m") 29 | public String adminsave() { 30 | return "admin/m-admin-save"; 31 | } 32 | /** 33 | * 管理员修改 34 | */ 35 | @RequestMapping("/adminedit.m") 36 | public String adminedit() { 37 | return "admin/m-admin-edit"; 38 | } 39 | /** 40 | * 首页系统 41 | */ 42 | @RequestMapping("/adminmain.m") 43 | public String adminmain() { 44 | return "m-main"; 45 | } 46 | /** 47 | * 首页列表 48 | */ 49 | @RequestMapping("/keylist.m") 50 | public String keylist(){return "lokhouse/key-list";} 51 | /** 52 | * 修改首页 53 | */ 54 | @RequestMapping("/keyedit.m") 55 | public String keyedit(){return "lokhouse/key-edit";} 56 | /** 57 | * 添加预首页 58 | */ 59 | @RequestMapping("/keyadd.m") 60 | public String keyadd(){return "lokhouse/key-add";} 61 | /** 62 | * 支出列表 63 | */ 64 | @RequestMapping("/userlist.m") 65 | public String userlist(){return "userop/userlist";} 66 | /** 67 | * 修改支出 68 | */ 69 | @RequestMapping("/userdit.m") 70 | public String userdit(){return "userop/userdit";} 71 | /** 72 | * 添加支出 73 | */ 74 | @RequestMapping("/useradd.m") 75 | public String useradd(){return "userop/useradd";} 76 | /** 77 | * 收入列表 78 | */ 79 | @RequestMapping("/ooplist.m") 80 | public String ooplist(){return "oop/ooplist";} 81 | /** 82 | * 收入修改 83 | */ 84 | @RequestMapping("/oopedit.m") 85 | public String oopedit(){return "oop/oopedit";} 86 | /** 87 | * 收入添加 88 | */ 89 | @RequestMapping("/oopadd.m") 90 | public String oopadd(){return "oop/oopadd";} 91 | /** 92 | * 报表视图 93 | */ 94 | @RequestMapping("/welcome1.m") 95 | public String welcome1(){return "welcome1";} 96 | 97 | 98 | /** 99 | * 家庭修改 100 | */ 101 | @RequestMapping("/keepedit.m") 102 | public String keepedit(){return "keep/keepedit";} 103 | /** 104 | * 家庭添加 105 | */ 106 | @RequestMapping("/keepadd.m") 107 | public String keepadd(){return "keep/keepadd";} 108 | 109 | /** 110 | * 家庭列表 111 | */ 112 | @RequestMapping("/keeplist.m") 113 | public String keeplist(){return "keep/keeplist";} 114 | /** 115 | * 116 | */ 117 | @RequestMapping("/mhomepage.m") 118 | public String mhomepage(){return "m-home-page";} 119 | 120 | 121 | 122 | /** 123 | * 修改 124 | */ 125 | @RequestMapping("/loopsedit.m") 126 | public String loopsedit(){return "loops/loopsedit";} 127 | /** 128 | * 添加 129 | */ 130 | @RequestMapping("/loppsadd.m") 131 | public String loppsadd(){return "loops/loppsadd";} 132 | 133 | /** 134 | * 列表 135 | */ 136 | @RequestMapping("/loopslist.m") 137 | public String loopslist(){return "loops/loopslist";} 138 | } 139 | -------------------------------------------------------------------------------- /src/main/java/com/family/pojo/Auser.java: -------------------------------------------------------------------------------- 1 | package com.family.pojo; 2 | 3 | 4 | public class Auser { 5 | private Integer id; 6 | private String useradd; //收入统计 7 | private String useredit; //支出统计 8 | private String addis; //净收入 9 | private String fangshi; //支付方式 10 | 11 | @Override 12 | public String toString() { 13 | return "Auser{" + 14 | "id=" + id + 15 | ", useradd='" + useradd + '\'' + 16 | ", useredit='" + useredit + '\'' + 17 | ", addis='" + addis + '\'' + 18 | ", fangshi='" + fangshi + '\'' + 19 | '}'; 20 | } 21 | 22 | public Integer getId() { 23 | return id; 24 | } 25 | 26 | public void setId(Integer id) { 27 | this.id = id; 28 | } 29 | 30 | public String getUseradd() { 31 | return useradd; 32 | } 33 | 34 | public void setUseradd(String useradd) { 35 | this.useradd = useradd; 36 | } 37 | 38 | public String getUseredit() { 39 | return useredit; 40 | } 41 | 42 | public void setUseredit(String useredit) { 43 | this.useredit = useredit; 44 | } 45 | 46 | public String getAddis() { 47 | return addis; 48 | } 49 | 50 | public void setAddis(String addis) { 51 | this.addis = addis; 52 | } 53 | 54 | public String getFangshi() { 55 | return fangshi; 56 | } 57 | 58 | public void setFangshi(String fangshi) { 59 | this.fangshi = fangshi; 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /src/main/java/com/family/pojo/Keep.java: -------------------------------------------------------------------------------- 1 | package com.family.pojo; 2 | 3 | 4 | public class Keep { 5 | private Integer id; 6 | private String fap; //新生选房 7 | private String agea;//新生分房 8 | private String kop;//到校登记 9 | private String xinse;//迎新问答 10 | private String ipho;//手机选号 11 | private String xian;//线上充值 12 | private String wu;//生活用品预定 13 | private String ipo;//新生礼包 14 | 15 | @Override 16 | public String toString() { 17 | return "Keep{" + 18 | "id=" + id + 19 | ", fap='" + fap + '\'' + 20 | ", agea='" + agea + '\'' + 21 | ", kop='" + kop + '\'' + 22 | ", xinse='" + xinse + '\'' + 23 | ", ipho='" + ipho + '\'' + 24 | ", xian='" + xian + '\'' + 25 | ", wu='" + wu + '\'' + 26 | ", ipo='" + ipo + '\'' + 27 | '}'; 28 | } 29 | 30 | public Integer getId() { 31 | return id; 32 | } 33 | 34 | public void setId(Integer id) { 35 | this.id = id; 36 | } 37 | 38 | public String getFap() { 39 | return fap; 40 | } 41 | 42 | public void setFap(String fap) { 43 | this.fap = fap; 44 | } 45 | 46 | public String getAgea() { 47 | return agea; 48 | } 49 | 50 | public void setAgea(String agea) { 51 | this.agea = agea; 52 | } 53 | 54 | public String getKop() { 55 | return kop; 56 | } 57 | 58 | public void setKop(String kop) { 59 | this.kop = kop; 60 | } 61 | 62 | public String getXinse() { 63 | return xinse; 64 | } 65 | 66 | public void setXinse(String xinse) { 67 | this.xinse = xinse; 68 | } 69 | 70 | public String getIpho() { 71 | return ipho; 72 | } 73 | 74 | public void setIpho(String ipho) { 75 | this.ipho = ipho; 76 | } 77 | 78 | public String getXian() { 79 | return xian; 80 | } 81 | 82 | public void setXian(String xian) { 83 | this.xian = xian; 84 | } 85 | 86 | public String getWu() { 87 | return wu; 88 | } 89 | 90 | public void setWu(String wu) { 91 | this.wu = wu; 92 | } 93 | 94 | public String getIpo() { 95 | return ipo; 96 | } 97 | 98 | public void setIpo(String ipo) { 99 | this.ipo = ipo; 100 | } 101 | } 102 | -------------------------------------------------------------------------------- /src/main/java/com/family/pojo/Loops.java: -------------------------------------------------------------------------------- 1 | package com.family.pojo; 2 | 3 | public class Loops { 4 | private Integer id; 5 | private String tuisu; 6 | private String lixiao; 7 | 8 | @Override 9 | public String toString() { 10 | return "Loop{" + 11 | "id=" + id + 12 | ", tuisu='" + tuisu + '\'' + 13 | ", lixiao='" + lixiao + '\'' + 14 | '}'; 15 | } 16 | 17 | public Integer getId() { 18 | return id; 19 | } 20 | 21 | public void setId(Integer id) { 22 | this.id = id; 23 | } 24 | 25 | public String getTuisu() { 26 | return tuisu; 27 | } 28 | 29 | public void setTuisu(String tuisu) { 30 | this.tuisu = tuisu; 31 | } 32 | 33 | public String getLixiao() { 34 | return lixiao; 35 | } 36 | 37 | public void setLixiao(String lixiao) { 38 | this.lixiao = lixiao; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /src/main/java/com/family/pojo/MAdmin.java: -------------------------------------------------------------------------------- 1 | package com.family.pojo; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Data; 5 | import lombok.NoArgsConstructor; 6 | import lombok.ToString; 7 | 8 | 9 | @ToString 10 | @AllArgsConstructor 11 | @NoArgsConstructor 12 | @Data 13 | public class MAdmin { 14 | private Integer id; 15 | private String mname; 16 | private String pass; 17 | 18 | @Override 19 | public String toString() { 20 | return "MAdmin{" + 21 | "id=" + id + 22 | ", mname='" + mname + '\'' + 23 | ", pass='" + pass + '\'' + 24 | '}'; 25 | } 26 | 27 | public Integer getId() { 28 | return id; 29 | } 30 | 31 | public void setId(Integer id) { 32 | this.id = id; 33 | } 34 | 35 | public String getMname() { 36 | return mname; 37 | } 38 | 39 | public void setMname(String mname) { 40 | this.mname = mname; 41 | } 42 | 43 | public String getPass() { 44 | return pass; 45 | } 46 | 47 | public void setPass(String pass) { 48 | this.pass = pass; 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /src/main/java/com/family/pojo/Oop.java: -------------------------------------------------------------------------------- 1 | package com.family.pojo; 2 | 3 | 4 | public class Oop { 5 | private Integer id; 6 | private String names; 7 | private String fangshi; 8 | private String renshu; 9 | 10 | @Override 11 | public String toString() { 12 | return "Oop{" + 13 | "id=" + id + 14 | ", names='" + names + '\'' + 15 | ", fangshi='" + fangshi + '\'' + 16 | ", renshu='" + renshu + '\'' + 17 | '}'; 18 | } 19 | 20 | public Integer getId() { 21 | return id; 22 | } 23 | 24 | public void setId(Integer id) { 25 | this.id = id; 26 | } 27 | 28 | public String getNames() { 29 | return names; 30 | } 31 | 32 | public void setNames(String names) { 33 | this.names = names; 34 | } 35 | 36 | public String getFangshi() { 37 | return fangshi; 38 | } 39 | 40 | public void setFangshi(String fangshi) { 41 | this.fangshi = fangshi; 42 | } 43 | 44 | public String getRenshu() { 45 | return renshu; 46 | } 47 | 48 | public void setRenshu(String renshu) { 49 | this.renshu = renshu; 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /src/main/java/com/family/pojo/Userop.java: -------------------------------------------------------------------------------- 1 | package com.family.pojo; 2 | 3 | 4 | public class Userop { 5 | private Integer id; 6 | private String zhichu; //支出 7 | private String jiine; //人数 8 | private String fangshi; //方式 9 | private String didian; //地点 10 | 11 | @Override 12 | public String toString() { 13 | return "Userop{" + 14 | "id=" + id + 15 | ", zhichu='" + zhichu + '\'' + 16 | ", jiine='" + jiine + '\'' + 17 | ", fangshi='" + fangshi + '\'' + 18 | ", didian='" + didian + '\'' + 19 | '}'; 20 | } 21 | 22 | public Integer getId() { 23 | return id; 24 | } 25 | 26 | public void setId(Integer id) { 27 | this.id = id; 28 | } 29 | 30 | public String getZhichu() { 31 | return zhichu; 32 | } 33 | 34 | public void setZhichu(String zhichu) { 35 | this.zhichu = zhichu; 36 | } 37 | 38 | public String getJiine() { 39 | return jiine; 40 | } 41 | 42 | public void setJiine(String jiine) { 43 | this.jiine = jiine; 44 | } 45 | 46 | public String getFangshi() { 47 | return fangshi; 48 | } 49 | 50 | public void setFangshi(String fangshi) { 51 | this.fangshi = fangshi; 52 | } 53 | 54 | public String getDidian() { 55 | return didian; 56 | } 57 | 58 | public void setDidian(String didian) { 59 | this.didian = didian; 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /src/main/java/com/family/pojo/Vuser.java: -------------------------------------------------------------------------------- 1 | package com.family.pojo; 2 | 3 | /** 4 | * 用户前端登录表 5 | */ 6 | public class Vuser { 7 | private Integer id; 8 | private String names; 9 | private String pass; 10 | 11 | @Override 12 | public String toString() { 13 | return "Vuser{" + 14 | "id=" + id + 15 | ", names='" + names + '\'' + 16 | ", pass='" + pass + '\'' + 17 | '}'; 18 | } 19 | 20 | public Integer getId() { 21 | return id; 22 | } 23 | 24 | public void setId(Integer id) { 25 | this.id = id; 26 | } 27 | 28 | public String getNames() { 29 | return names; 30 | } 31 | 32 | public void setNames(String names) { 33 | this.names = names; 34 | } 35 | 36 | public String getPass() { 37 | return pass; 38 | } 39 | 40 | public void setPass(String pass) { 41 | this.pass = pass; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/main/java/com/family/service/AuserMapperService.java: -------------------------------------------------------------------------------- 1 | package com.family.service; 2 | 3 | import com.family.pojo.Auser; 4 | 5 | import java.util.List; 6 | import java.util.Map; 7 | 8 | public interface AuserMapperService { 9 | List keeplist(); 10 | 11 | Map saveMAdmin(Auser auser); 12 | 13 | Map editMAdmin(Auser auser); 14 | 15 | Map delMAdminById(Integer id); 16 | 17 | } 18 | -------------------------------------------------------------------------------- /src/main/java/com/family/service/KeepMapperService.java: -------------------------------------------------------------------------------- 1 | package com.family.service; 2 | 3 | import com.family.pojo.Keep; 4 | 5 | import java.util.List; 6 | import java.util.Map; 7 | 8 | public interface KeepMapperService { 9 | List keeplist(); 10 | 11 | Map saveMAdmin(Keep keep); 12 | 13 | Map editMAdmin(Keep keep); 14 | 15 | Map delMAdminById(Integer id); 16 | 17 | } 18 | -------------------------------------------------------------------------------- /src/main/java/com/family/service/LoopsMapperService.java: -------------------------------------------------------------------------------- 1 | package com.family.service; 2 | 3 | import com.family.pojo.Loops; 4 | 5 | import java.util.List; 6 | import java.util.Map; 7 | 8 | public interface LoopsMapperService { 9 | List keeplist(); 10 | 11 | Map saveMAdmin(Loops loops); 12 | 13 | Map editMAdmin(Loops loops); 14 | 15 | Map delMAdminById(Integer id); 16 | } 17 | -------------------------------------------------------------------------------- /src/main/java/com/family/service/MAdminMapperService.java: -------------------------------------------------------------------------------- 1 | package com.family.service; 2 | 3 | import com.family.pojo.MAdmin; 4 | 5 | import java.util.List; 6 | import java.util.Map; 7 | 8 | public interface MAdminMapperService { 9 | Map adminLogin(MAdmin mAdmin); 10 | 11 | List mAdminList(); 12 | 13 | Map saveMAdmin(MAdmin mAdmin); 14 | 15 | Map editMAdmin(MAdmin mAdmin); 16 | 17 | Map delMAdminById(Integer id); 18 | 19 | } 20 | -------------------------------------------------------------------------------- /src/main/java/com/family/service/OopMapperService.java: -------------------------------------------------------------------------------- 1 | package com.family.service; 2 | 3 | import com.family.pojo.Oop; 4 | 5 | import java.util.List; 6 | import java.util.Map; 7 | 8 | public interface OopMapperService { 9 | List keeplist(); 10 | 11 | Map saveMAdmin(Oop oop); 12 | 13 | Map editMAdmin(Oop oop); 14 | 15 | Map delMAdminById(Integer id); 16 | 17 | } 18 | -------------------------------------------------------------------------------- /src/main/java/com/family/service/UseropMapperService.java: -------------------------------------------------------------------------------- 1 | package com.family.service; 2 | 3 | import com.family.pojo.Userop; 4 | 5 | import java.util.List; 6 | import java.util.Map; 7 | 8 | public interface UseropMapperService { 9 | List keeplist(); 10 | 11 | Map saveMAdmin(Userop userop); 12 | 13 | Map editMAdmin(Userop userop); 14 | 15 | Map delMAdminById(Integer id); 16 | 17 | } 18 | -------------------------------------------------------------------------------- /src/main/java/com/family/service/VuserMapperService.java: -------------------------------------------------------------------------------- 1 | package com.family.service; 2 | 3 | import com.family.pojo.Vuser; 4 | 5 | import java.util.List; 6 | import java.util.Map; 7 | 8 | public interface VuserMapperService { 9 | Map adminLogin(Vuser vuser); 10 | 11 | List mAdminList(); 12 | 13 | Map saveMAdmin(Vuser vuser); 14 | 15 | Map editMAdmin(Vuser vuser); 16 | 17 | Map delMAdminById(Integer id); 18 | } 19 | -------------------------------------------------------------------------------- /src/main/java/com/family/service/impl/AuserMapperServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.family.service.impl; 2 | 3 | import com.family.mapper.AuserMapper; 4 | import com.family.pojo.Auser; 5 | import com.family.service.AuserMapperService; 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | import org.springframework.stereotype.Service; 8 | 9 | import java.util.HashMap; 10 | import java.util.List; 11 | import java.util.Map; 12 | @Service 13 | public class AuserMapperServiceImpl implements AuserMapperService { 14 | @Autowired 15 | private AuserMapper auserMapper; 16 | private Map map=new HashMap<>(); 17 | @Override 18 | public List keeplist() { 19 | return auserMapper.keeplist(); 20 | } 21 | 22 | @Override 23 | public Map saveMAdmin(Auser auser) { 24 | Integer saveMAdmin = auserMapper.saveMAdmin(auser); 25 | if (saveMAdmin > 0) { 26 | map.put("flag", saveMAdmin); 27 | } 28 | return map; 29 | } 30 | 31 | @Override 32 | public Map editMAdmin(Auser auser) { 33 | Integer editMAdmin = auserMapper.editMAdmin(auser); 34 | if (editMAdmin > 0) { 35 | map.put("flag", editMAdmin); 36 | } 37 | return map; 38 | } 39 | 40 | @Override 41 | public Map delMAdminById(Integer id) { 42 | Integer delMAdminById = auserMapper.delMAdminById(id); 43 | if (delMAdminById > 0) { 44 | map.put("flag", delMAdminById); 45 | } 46 | return map; 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /src/main/java/com/family/service/impl/KeepMapperServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.family.service.impl; 2 | 3 | import com.family.mapper.KeepMapper; 4 | import com.family.pojo.Keep; 5 | import com.family.service.KeepMapperService; 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | import org.springframework.stereotype.Service; 8 | 9 | import java.util.HashMap; 10 | import java.util.List; 11 | import java.util.Map; 12 | @Service 13 | public class KeepMapperServiceImpl implements KeepMapperService { 14 | @Autowired 15 | private KeepMapper keepMapper; 16 | private Mapmap=new HashMap<>(); 17 | @Override 18 | public List keeplist() { 19 | return keepMapper.keeplist(); 20 | } 21 | 22 | @Override 23 | public Map saveMAdmin(Keep keep) { 24 | Integer saveMAdmin = keepMapper.saveMAdmin(keep); 25 | if (saveMAdmin > 0) { 26 | map.put("flag", saveMAdmin); 27 | } 28 | return map; 29 | } 30 | 31 | @Override 32 | public Map editMAdmin(Keep keep) { 33 | Integer editMAdmin = keepMapper.editMAdmin(keep); 34 | if (editMAdmin > 0) { 35 | map.put("flag", editMAdmin); 36 | } 37 | return map; 38 | } 39 | 40 | @Override 41 | public Map delMAdminById(Integer id) { 42 | Integer delMAdminById = keepMapper.delMAdminById(id); 43 | if (delMAdminById > 0) { 44 | map.put("flag", delMAdminById); 45 | } 46 | return map; 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /src/main/java/com/family/service/impl/LoopsMapperServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.family.service.impl; 2 | 3 | import com.family.mapper.LoopsMapper; 4 | import com.family.pojo.Loops; 5 | import com.family.service.LoopsMapperService; 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | import org.springframework.stereotype.Service; 8 | 9 | import java.util.HashMap; 10 | import java.util.List; 11 | import java.util.Map; 12 | 13 | @Service 14 | public class LoopsMapperServiceImpl implements LoopsMapperService { 15 | @Autowired 16 | private LoopsMapper loopMapper; 17 | private Map map=new HashMap<>(); 18 | 19 | @Override 20 | public List keeplist() { 21 | return loopMapper.keeplist(); 22 | } 23 | 24 | @Override 25 | public Map saveMAdmin(Loops loops) { 26 | Integer saveMAdmin = loopMapper.saveMAdmin(loops); 27 | if (saveMAdmin > 0) { 28 | map.put("flag", saveMAdmin); 29 | } 30 | return map; 31 | } 32 | 33 | @Override 34 | public Map editMAdmin(Loops loops) { 35 | Integer editMAdmin = loopMapper.editMAdmin(loops); 36 | if (editMAdmin > 0) { 37 | map.put("flag", editMAdmin); 38 | } 39 | return map; 40 | } 41 | 42 | @Override 43 | public Map delMAdminById(Integer id) { 44 | Integer delMAdminById = loopMapper.delMAdminById(id); 45 | if (delMAdminById > 0) { 46 | map.put("flag", delMAdminById); 47 | } 48 | return map; 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /src/main/java/com/family/service/impl/MAdminMapperServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.family.service.impl; 2 | 3 | import com.family.mapper.MAdminMapper; 4 | import com.family.pojo.MAdmin; 5 | import com.family.service.MAdminMapperService; 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | import org.springframework.stereotype.Service; 8 | 9 | import java.util.HashMap; 10 | import java.util.List; 11 | import java.util.Map; 12 | 13 | @Service 14 | public class MAdminMapperServiceImpl implements MAdminMapperService { 15 | @Autowired 16 | private MAdminMapper mAdminMapper; 17 | private Map map = new HashMap<>(); 18 | 19 | /** 20 | * 后台管理员登录 21 | * 22 | * @param mAdmin 23 | * @return 24 | */ 25 | @Override 26 | public Map adminLogin(MAdmin mAdmin) { 27 | MAdmin obj = mAdminMapper.adminLogin(mAdmin); 28 | if (obj != null) { 29 | map.put("flag", obj); 30 | } 31 | return map; 32 | } 33 | 34 | /** 35 | * 管理员列表 36 | * 37 | * @return 38 | */ 39 | @Override 40 | public List mAdminList() { 41 | return mAdminMapper.mAdminList(); 42 | } 43 | 44 | /** 45 | * 管理员增加 46 | * 47 | * @param mAdmin 48 | * @return 49 | */ 50 | @Override 51 | public Map saveMAdmin(MAdmin mAdmin) { 52 | Integer saveMAdmin = mAdminMapper.saveMAdmin(mAdmin); 53 | if (saveMAdmin > 0) { 54 | map.put("flag", saveMAdmin); 55 | } 56 | return map; 57 | } 58 | 59 | /** 60 | * 管理员修改 61 | * 62 | * @param mAdmin 63 | * @return 64 | */ 65 | @Override 66 | public Map editMAdmin(MAdmin mAdmin) { 67 | Integer editMAdmin = mAdminMapper.editMAdmin(mAdmin); 68 | if (editMAdmin > 0) { 69 | map.put("flag", editMAdmin); 70 | } 71 | return map; 72 | } 73 | 74 | /** 75 | * 管理员删除 76 | * 77 | * @param id 78 | * @return 79 | */ 80 | @Override 81 | public Map delMAdminById(Integer id) { 82 | Integer delMAdminById = mAdminMapper.delMAdminById(id); 83 | if (delMAdminById > 0) { 84 | map.put("flag", delMAdminById); 85 | } 86 | return map; 87 | } 88 | } 89 | -------------------------------------------------------------------------------- /src/main/java/com/family/service/impl/OopMapperServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.family.service.impl; 2 | 3 | import com.family.mapper.OopMapper; 4 | import com.family.pojo.Oop; 5 | import com.family.service.OopMapperService; 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | import org.springframework.stereotype.Service; 8 | 9 | import java.util.HashMap; 10 | import java.util.List; 11 | import java.util.Map; 12 | @Service 13 | public class OopMapperServiceImpl implements OopMapperService { 14 | @Autowired 15 | private OopMapper oopMapper; 16 | private Map map=new HashMap<>(); 17 | @Override 18 | public List keeplist() { 19 | return oopMapper.keeplist(); 20 | } 21 | 22 | @Override 23 | public Map saveMAdmin(Oop oop) { 24 | Integer saveMAdmin = oopMapper.saveMAdmin(oop); 25 | if (saveMAdmin > 0) { 26 | map.put("flag", saveMAdmin); 27 | } 28 | return map; 29 | } 30 | 31 | @Override 32 | public Map editMAdmin(Oop oop) { 33 | Integer editMAdmin = oopMapper.editMAdmin(oop); 34 | if (editMAdmin > 0) { 35 | map.put("flag", editMAdmin); 36 | } 37 | return map; 38 | } 39 | 40 | @Override 41 | public Map delMAdminById(Integer id) { 42 | Integer delMAdminById = oopMapper.delMAdminById(id); 43 | if (delMAdminById > 0) { 44 | map.put("flag", delMAdminById); 45 | } 46 | return map; 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /src/main/java/com/family/service/impl/UseropMapperServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.family.service.impl; 2 | 3 | import com.family.mapper.UseropMapper; 4 | import com.family.pojo.Userop; 5 | import com.family.service.UseropMapperService; 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | import org.springframework.stereotype.Service; 8 | 9 | import java.util.HashMap; 10 | import java.util.List; 11 | import java.util.Map; 12 | @Service 13 | public class UseropMapperServiceImpl implements UseropMapperService { 14 | @Autowired 15 | private UseropMapper useropMapper; 16 | private Map map=new HashMap<>(); 17 | @Override 18 | public List keeplist() { 19 | return useropMapper.keeplist(); 20 | } 21 | 22 | @Override 23 | public Map saveMAdmin(Userop userop) { 24 | Integer saveMAdmin = useropMapper.saveMAdmin(userop); 25 | if (saveMAdmin > 0) { 26 | map.put("flag", saveMAdmin); 27 | } 28 | return map; 29 | } 30 | 31 | @Override 32 | public Map editMAdmin(Userop userop) { 33 | Integer editMAdmin = useropMapper.editMAdmin(userop); 34 | if (editMAdmin > 0) { 35 | map.put("flag", editMAdmin); 36 | } 37 | return map; 38 | } 39 | 40 | @Override 41 | public Map delMAdminById(Integer id) { 42 | Integer delMAdminById = useropMapper.delMAdminById(id); 43 | if (delMAdminById > 0) { 44 | map.put("flag", delMAdminById); 45 | } 46 | return map; 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /src/main/java/com/family/service/impl/VuserMapperServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.family.service.impl; 2 | 3 | import com.family.mapper.VuserMapper; 4 | import com.family.pojo.Vuser; 5 | import com.family.service.VuserMapperService; 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | import org.springframework.stereotype.Service; 8 | 9 | import java.util.HashMap; 10 | import java.util.List; 11 | import java.util.Map; 12 | 13 | @Service 14 | public class VuserMapperServiceImpl implements VuserMapperService { 15 | @Autowired 16 | private VuserMapper vuserMapper; 17 | private Mapmap=new HashMap<>(); 18 | 19 | /** 20 | * 登录 21 | * @param vuser 22 | * @return 23 | */ 24 | @Override 25 | public Map adminLogin(Vuser vuser) { 26 | Vuser obj = vuserMapper.adminLogin(vuser); 27 | if (obj != null) { 28 | map.put("flag", obj); 29 | } 30 | return map; 31 | } 32 | 33 | /** 34 | * 列表 35 | * @return 36 | */ 37 | @Override 38 | public List mAdminList() { 39 | return vuserMapper.mAdminList(); 40 | } 41 | 42 | /** 43 | * 增加 44 | * @param vuser 45 | * @return 46 | */ 47 | @Override 48 | public Map saveMAdmin(Vuser vuser) { 49 | Integer saveMAdmin = vuserMapper.saveMAdmin(vuser); 50 | if (saveMAdmin > 0) { 51 | map.put("flag", saveMAdmin); 52 | } 53 | return map; 54 | } 55 | 56 | /** 57 | * 修改 58 | * @param vuser 59 | * @return 60 | */ 61 | @Override 62 | public Map editMAdmin(Vuser vuser) { 63 | Integer editMAdmin = vuserMapper.editMAdmin(vuser); 64 | if (editMAdmin > 0) { 65 | map.put("flag", editMAdmin); 66 | } 67 | return map; 68 | } 69 | 70 | /** 71 | * 删除 72 | * @param id 73 | * @return 74 | */ 75 | @Override 76 | public Map delMAdminById(Integer id) { 77 | Integer delMAdminById = vuserMapper.delMAdminById(id); 78 | if (delMAdminById > 0) { 79 | map.put("flag", delMAdminById); 80 | } 81 | return map; 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | #声明端口号 2 | server: 3 | port: 19967 4 | 5 | # 配置路由 6 | servlet: 7 | context-path: /family 8 | 9 | # mysql 10 | spring: 11 | datasource: 12 | driver-class-name: com.mysql.cj.jdbc.Driver 13 | url: jdbc:mysql://127.0.0.1:3306/graduation_family?useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8 14 | username: root 15 | password: 123456 16 | type: com.alibaba.druid.pool.DruidDataSource 17 | 18 | # thymeleaf 19 | thymeleaf: 20 | prefix: classpath:/templates/ 21 | check-template-location: true 22 | suffix: .html 23 | encoding: UTF-8 24 | servlet: 25 | content-type: text/html 26 | mode: HTML5 27 | cache: false 28 | 29 | # mybatis 30 | mybatis: 31 | mapper-locations: classpath:mapper/*Mapper.xml 32 | type-aliases-package: com.movie.pojo 33 | 34 | #logging 35 | logging: 36 | level: 37 | com: 38 | movie: 39 | mapper: debug 40 | -------------------------------------------------------------------------------- /src/main/resources/mapper/AuserMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | select id,useradd,useredit,addis,fangshi from auser 17 | 18 | 21 | 22 | insert into auser(useradd,useredit,addis,fangshi) values (#{useradd},#{useredit},#{addis},#{fangshi}) 23 | 24 | 25 | update auser set useradd=#{useradd},useredit=#{useredit},addis=#{addis},fangshi=#{fangshi} where id=#{id} 26 | 27 | 28 | delete from auser where id=#{id} 29 | 30 | 31 | -------------------------------------------------------------------------------- /src/main/resources/mapper/KeepMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | select id,fap,agea,kop,xinse,ipho,xian,wu,ipo from keep 21 | 22 | 25 | 26 | insert into keep(fap,agea,kop,xinse,ipho,xian,wu,ipo) values (#{fap},#{agea},#{kop},#{xinse},#{ipho},#{xian},#{wu},#{ipo}) 27 | 28 | 29 | update keep set fap=#{fap},agea=#{agea},kop=#{kop},xinse=#{xinse},ipho=#{ipho},xian=#{xian},wu=#{wu},ipo=#{ipo}where id=#{id} 30 | 31 | 32 | delete from keep where id=#{id} 33 | 34 | 35 | -------------------------------------------------------------------------------- /src/main/resources/mapper/LoopsMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | select id,tuisu,lixiao from loops 15 | 16 | 19 | 20 | insert into loops(tuisu,lixiao) values (#{tuisu},#{lixiao}) 21 | 22 | 23 | update loops set tuisu=#{tuisu},lixiao=#{lixiao} where id=#{id} 24 | 25 | 26 | delete from loops where id=#{id} 27 | 28 | 29 | -------------------------------------------------------------------------------- /src/main/resources/mapper/MAdminMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | select id,mname,pass from m_admin 15 | 16 | 22 | 25 | 26 | insert into m_admin(mname,pass) values (#{mname},#{pass}) 27 | 28 | 29 | update m_admin set mname=#{mname},pass=#{pass} where id=#{id} 30 | 31 | 32 | delete from m_admin where id=#{id} 33 | 34 | 35 | -------------------------------------------------------------------------------- /src/main/resources/mapper/OopMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | select id,names,fangshi,renshu from oop 16 | 17 | 20 | 21 | insert into oop(names,fangshi,renshu) values (#{names},#{fangshi},#{renshu}) 22 | 23 | 24 | update oop set names=#{names},fangshi=#{fangshi},renshu=#{renshu} where id=#{id} 25 | 26 | 27 | delete from oop where id=#{id} 28 | 29 | 30 | -------------------------------------------------------------------------------- /src/main/resources/mapper/UseropMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | select id,zhichu,jiine,fangshi,didian from userop 17 | 18 | 21 | 22 | insert into userop(zhichu,jiine,fangshi,didian) values (#{zhichu},#{jiine},#{fangshi},#{didian}) 23 | 24 | 25 | update userop set zhichu=#{zhichu},jiine=#{jiine},fangshi=#{fangshi},didian=#{didian} where id=#{id} 26 | 27 | 28 | delete from userop where id=#{id} 29 | 30 | 31 | -------------------------------------------------------------------------------- /src/main/resources/mapper/VuserMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | select id,names,pass from vuser 15 | 16 | 22 | 25 | 26 | insert into vuser(names,pass) values (#{names},#{pass}) 27 | 28 | 29 | update vuser set names=#{names},pass=#{pass} where id=#{id} 30 | 31 | 32 | delete from vuser where id=#{id} 33 | 34 | 35 | -------------------------------------------------------------------------------- /src/main/resources/static/cop/css/admin.css: -------------------------------------------------------------------------------- 1 | body{ color:#333; font-size:13px;} 2 | input,select,textarea{color:#333;} 3 | .bg{ width:100%; height:100%; position:absolute; background:url(..res/images/bg.jpg) } 4 | .panel{background:#fff;} 5 | form .form-group:last-child{padding-bottom:0;} 6 | .passcode{position:absolute;right:0;bottom:0;height:32px;margin:1px;border-left:solid 1px #ddd;text-align:center;line-height:32px;border-radius:0 4px 4px 0;} 7 | ul,li{ list-style-type:none;} 8 | 9 | .lefter{position:relative;float:left;width:180px;margin-right:-180px;background:#e6f2fb;text-align:center;} 10 | .righter{float:right;width:100%;padding-top:15px;background:#e6f2fb;} 11 | .mainer{margin-left:180px;} 12 | .field-icon-right .icon{ bottom:0px; top:auto} 13 | .logo{ float:left; color:#FFF; margin-top:10px; line-height:45px;} 14 | .logo img{ float:left; margin-right:10px;} 15 | .loginbox { background:url(../images/tmbg-white.png); border:0px;} 16 | /********头部******/ 17 | .header{height:70px; overflow:hidden; background:url(..res/images/bg.jpg) no-repeat 0 -1000px; } 18 | .head-l{ float:left; margin-top:17px; margin-left:15px; } 19 | .head-l .button{ padding:8px 15px;} 20 | .head-l .bg-blue:hover{ background-color:#03b6fd;} 21 | .leftnav{width:180px; height:100%; position:fixed; top:70px; left:0px;} 22 | .leftnav-title { height:50px; background:url(../images/bg.jpg) no-repeat 0 -1000px; color:#FFF; padding-left:22px; font-size:14px; line-height:50px;} 23 | .leftnav-title span{ margin-right:10px;} 24 | .leftnav h2{ padding:10px 0 10px 22px; transition:all .1s ease-in-out; display:block; cursor:pointer; font-weight:bold; font-size:14px; border-top:1px solid #b5cfd9;} 25 | .leftnav h2.on{ color:#09c;} 26 | .leftnav .border-bottom{ border-bottom:1px solid #b5cfd9;} 27 | .leftnav h2 span{ margin-right:10px;} 28 | .leftnav h2:hover{ color:#09c;} 29 | .leftnav ul {display:none; border-top:1px solid #b5cfd9; padding:5px 0; opacity:1;} 30 | .leftnav ul li{ list-style-type:none; } 31 | .leftnav ul li a{ display:block;padding-left:30px;line-height:30px; } 32 | .leftnav ul li span{ margin-right:8px;} 33 | .leftnav ul li a:hover,.leftnav ul li a.on{ color:#09c;} 34 | 35 | /***主要内容***/ 36 | .admin{background:#fff;position:fixed;border-left:solid 1px #b5cfd9;right:0;bottom:0;top:110px;left:180px; padding:15px; padding-right:0px; padding-bottom:0px; overflow:auto; border-top:1px solid #b5cfd9; padding-right:15px;} 37 | .content{width:100%;} 38 | .body-content{padding:20px 0; overflow:hidden;} 39 | .content .title{ border-bottom:1px solid #dfdfdf; line-height:35px; font-size:14px; font-weight:bold; color:#09c} 40 | .form-x .form-group .label{ width:10%;} 41 | .form-x .form-button { margin-left:10%;} 42 | .w50 { width:25%; float:left;} 43 | .form-x .tipss{ float:left; padding-left:10px; color:#888; line-height:42px;} 44 | .input-help { float:left; line-height:30px;} 45 | .input-help li{ float:left;margin-left:10px;} 46 | .bread{ margin-left:190px; margin-top:4px;} 47 | .bread li{ float:left;} 48 | .label label{ font-weight:normal; color:#333;} 49 | .form-group{ margin-bottom:12px;} 50 | .button{ padding:10px 15px;} 51 | .form-group .field .file{ background:#FFF; border:0px;} 52 | .form-group .field input[type=radio]{ vertical-align:middle; line-height:35px; margin-right:5px;} 53 | .form-group .radio { line-height:35px;} 54 | .table th{ text-align:center;} 55 | .table td { vertical-align:middle;} 56 | .tip img{width:100px; height:100px;} 57 | .clear{ clear:both; overflow:hidden;} 58 | .pagelist {padding:10px 0; text-align:center;} 59 | .pagelist span,.pagelist a{ border-radius:3px; border:1px solid #dfdfdf;display:inline-block; padding:5px 12px;} 60 | .pagelist a{ margin:0 3px;} 61 | .pagelist span.current{ background:#09F; color:#FFF; border-color:#09F; margin:0 2px;} 62 | .pagelist a:hover{background:#09F; color:#FFF; border-color:#09F; } 63 | .pagelist label{ padding-left:15px; color:#999;} 64 | .pagelist label b{color:red; font-weight:normal; margin:0 3px;} 65 | 66 | .search{ overflow:hidden;} 67 | .search li{float:left; margin-right:15px; line-height:35px;} 68 | 69 | .button.bg-main.icon-check-square-o{ padding:10px 30px;} 70 | .button.bg-main.icon-check-square-o:hover{ background:#08bbe1;} 71 | input[type="checkbox"], input[type="radio"]{ width:15px; height:15px; vertical-align:-3px; margin-right:5px;} 72 | 73 | textarea[name=content]{width:100%; height:500px; border:1px solid #ddd; border-radius:3px; -webkit-border-radius:3px;} 74 | 75 | 76 | 77 | 78 | 79 | -------------------------------------------------------------------------------- /src/main/resources/static/cop/js/blog.js: -------------------------------------------------------------------------------- 1 | /** 2 | 3 | @Name:layui.blog 闲言轻博客模块 4 | @Author:徐志文 5 | @License:MIT 6 | @Site:http://www.layui.com/template/xianyan/ 7 | 8 | */ 9 | layui.define(['element', 'form','laypage','jquery','laytpl'],function(exports){ 10 | var element = layui.element 11 | ,form = layui.form 12 | ,laypage = layui.laypage 13 | ,$ = layui.jquery 14 | ,laytpl = layui.laytpl; 15 | 16 | 17 | //statr 分页 18 | 19 | laypage.render({ 20 | elem: 'test1' //注意,这里的 test1 是 ID,不用加 # 号 21 | ,count: 50 //数据总数,从服务端得到 22 | ,theme: '#1e9fff' 23 | }); 24 | 25 | // end 分頁 26 | 27 | 28 | 29 | // start 导航显示隐藏 30 | 31 | $("#mobile-nav").on('click', function(){ 32 | $("#pop-nav").toggle(); 33 | }); 34 | 35 | // end 导航显示隐藏 36 | 37 | 38 | 39 | 40 | //start 评论的特效 41 | 42 | (function ($) { 43 | $.extend({ 44 | tipsBox: function (options) { 45 | options = $.extend({ 46 | obj: null, //jq对象,要在那个html标签上显示 47 | str: "+1", //字符串,要显示的内容;也可以传一段html,如: "+1" 48 | startSize: "12px", //动画开始的文字大小 49 | endSize: "30px", //动画结束的文字大小 50 | interval: 600, //动画时间间隔 51 | color: "red", //文字颜色 52 | callback: function () { } //回调函数 53 | }, options); 54 | 55 | $("body").append("" + options.str + ""); 56 | 57 | var box = $(".num"); 58 | var left = options.obj.offset().left + options.obj.width() / 2; 59 | var top = options.obj.offset().top - 10; 60 | box.css({ 61 | "position": "absolute", 62 | "left": left + "px", 63 | "top": top + "px", 64 | "z-index": 9999, 65 | "font-size": options.startSize, 66 | "line-height": options.endSize, 67 | "color": options.color 68 | }); 69 | box.animate({ 70 | "font-size": options.endSize, 71 | "opacity": "0", 72 | "top": top - parseInt(options.endSize) + "px" 73 | }, options.interval, function () { 74 | box.remove(); 75 | options.callback(); 76 | }); 77 | } 78 | }); 79 | })($); 80 | 81 | function niceIn(prop){ 82 | prop.find('i').addClass('niceIn'); 83 | setTimeout(function(){ 84 | prop.find('i').removeClass('niceIn'); 85 | },1000); 86 | } 87 | 88 | $(function () { 89 | $(".like").on('click',function () { 90 | 91 | if(!($(this).hasClass("layblog-this"))){ 92 | this.text = '已赞'; 93 | $(this).addClass('layblog-this'); 94 | $.tipsBox({ 95 | obj: $(this), 96 | str: "+1", 97 | callback: function () { 98 | } 99 | }); 100 | niceIn($(this)); 101 | layer.msg('点赞成功', { 102 | icon: 6 103 | ,time: 1000 104 | }) 105 | } 106 | }); 107 | }); 108 | 109 | //end 评论的特效 110 | 111 | 112 | // start点赞图标变身 113 | $('#LAY-msg-box').on('click', '.info-img', function(){ 114 | $(this).addClass('layblog-this'); 115 | }) 116 | 117 | 118 | // end点赞图标变身 119 | 120 | //end 提交 121 | $('#item-btn').on('click', function(){ 122 | var elemCont = $('#LAY-msg-content') 123 | ,content = elemCont.val(); 124 | if(content.replace(/\s/g, '') == ""){ 125 | layer.msg('请先输入留言'); 126 | return elemCont.focus(); 127 | } 128 | 129 | var view = $('#LAY-msg-tpl').html() 130 | 131 | //模拟数据 132 | ,data = { 133 | username: '闲心' 134 | ,avatar: '../res/static/images/info-img.png' 135 | ,praise: 0 136 | ,content: content 137 | }; 138 | 139 | //模板渲染 140 | laytpl(view).render(data, function(html){ 141 | $('#LAY-msg-box').prepend(html); 142 | elemCont.val(''); 143 | layer.msg('留言成功', { 144 | icon: 1 145 | }) 146 | }); 147 | 148 | }) 149 | 150 | // start 图片遮罩 151 | var layerphotos = document.getElementsByClassName('layer-photos-demo'); 152 | for(var i = 1;i <= layerphotos.length;i++){ 153 | layer.photos({ 154 | photos: ".layer-photos-demo"+i+"" 155 | ,anim: 0 156 | }); 157 | } 158 | // end 图片遮罩 159 | 160 | 161 | //输出test接口 162 | exports('blog', {}); 163 | }); 164 | -------------------------------------------------------------------------------- /src/main/resources/static/css/admin.css: -------------------------------------------------------------------------------- 1 | body{ color:#333; font-size:13px;} 2 | input,select,textarea{color:#333;} 3 | .bg{ width:100%; height:100%; position:absolute; background:url(../images/bg.jpg) } 4 | .panel{background:#fff;} 5 | form .form-group:last-child{padding-bottom:0;} 6 | .passcode{position:absolute;right:0;bottom:0;height:32px;margin:1px;border-left:solid 1px #ddd;text-align:center;line-height:32px;border-radius:0 4px 4px 0;} 7 | ul,li{ list-style-type:none;} 8 | 9 | .lefter{position:relative;float:left;width:180px;margin-right:-180px;background:#e6f2fb;text-align:center;} 10 | .righter{float:right;width:100%;padding-top:15px;background:#e6f2fb;} 11 | .mainer{margin-left:180px;} 12 | .field-icon-right .icon{ bottom:0px; top:auto} 13 | .logo{ float:left; color:#FFF; margin-top:10px; line-height:45px;} 14 | .logo img{ float:left; margin-right:10px;} 15 | .loginbox { background:url(../images/tmbg-white.png); border:0px;} 16 | /********头部******/ 17 | .header{height:70px; overflow:hidden; background:url(../images/bg.jpg) no-repeat 0 -1000px; } 18 | .head-l{ float:left; margin-top:17px; margin-left:15px; } 19 | .head-l .button{ padding:8px 15px;} 20 | .head-l .bg-blue:hover{ background-color:#03b6fd;} 21 | .leftnav{width:180px; height:100%; position:fixed; top:70px; left:0px;} 22 | .leftnav-title { height:50px; background:url(../images/bg.jpg) no-repeat 0 -1000px; color:#FFF; padding-left:22px; font-size:14px; line-height:50px;} 23 | .leftnav-title span{ margin-right:10px;} 24 | .leftnav h2{ padding:10px 0 10px 22px; transition:all .1s ease-in-out; display:block; cursor:pointer; font-weight:bold; font-size:14px; border-top:1px solid #b5cfd9;} 25 | .leftnav h2.on{ color:#09c;} 26 | .leftnav .border-bottom{ border-bottom:1px solid #b5cfd9;} 27 | .leftnav h2 span{ margin-right:10px;} 28 | .leftnav h2:hover{ color:#09c;} 29 | .leftnav ul {display:none; border-top:1px solid #b5cfd9; padding:5px 0; opacity:1;} 30 | .leftnav ul li{ list-style-type:none; } 31 | .leftnav ul li a{ display:block;padding-left:30px;line-height:30px; } 32 | .leftnav ul li span{ margin-right:8px;} 33 | .leftnav ul li a:hover,.leftnav ul li a.on{ color:#09c;} 34 | 35 | /***主要内容***/ 36 | .admin{background:#fff;position:fixed;border-left:solid 1px #b5cfd9;right:0;bottom:0;top:110px;left:180px; padding:15px; padding-right:0px; padding-bottom:0px; overflow:auto; border-top:1px solid #b5cfd9; padding-right:15px;} 37 | .content{width:100%;} 38 | .body-content{padding:20px 0; overflow:hidden;} 39 | .content .title{ border-bottom:1px solid #dfdfdf; line-height:35px; font-size:14px; font-weight:bold; color:#09c} 40 | .form-x .form-group .label{ width:10%;} 41 | .form-x .form-button { margin-left:10%;} 42 | .w50 { width:25%; float:left;} 43 | .form-x .tipss{ float:left; padding-left:10px; color:#888; line-height:42px;} 44 | .input-help { float:left; line-height:30px;} 45 | .input-help li{ float:left;margin-left:10px;} 46 | .bread{ margin-left:190px; margin-top:4px;} 47 | .bread li{ float:left;} 48 | .label label{ font-weight:normal; color:#333;} 49 | .form-group{ margin-bottom:12px;} 50 | .button{ padding:10px 15px;} 51 | .form-group .field .file{ background:#FFF; border:0px;} 52 | .form-group .field input[type=radio]{ vertical-align:middle; line-height:35px; margin-right:5px;} 53 | .form-group .radio { line-height:35px;} 54 | .table th{ text-align:center;} 55 | .table td { vertical-align:middle;} 56 | .tip img{width:100px; height:100px;} 57 | .clear{ clear:both; overflow:hidden;} 58 | .pagelist {padding:10px 0; text-align:center;} 59 | .pagelist span,.pagelist a{ border-radius:3px; border:1px solid #dfdfdf;display:inline-block; padding:5px 12px;} 60 | .pagelist a{ margin:0 3px;} 61 | .pagelist span.current{ background:#09F; color:#FFF; border-color:#09F; margin:0 2px;} 62 | .pagelist a:hover{background:#09F; color:#FFF; border-color:#09F; } 63 | .pagelist label{ padding-left:15px; color:#999;} 64 | .pagelist label b{color:red; font-weight:normal; margin:0 3px;} 65 | 66 | .search{ overflow:hidden;} 67 | .search li{float:left; margin-right:15px; line-height:35px;} 68 | 69 | .button.bg-main.icon-check-square-o{ padding:10px 30px;} 70 | .button.bg-main.icon-check-square-o:hover{ background:#08bbe1;} 71 | input[type="checkbox"], input[type="radio"]{ width:15px; height:15px; vertical-align:-3px; margin-right:5px;} 72 | 73 | textarea[name=content]{width:100%; height:500px; border:1px solid #ddd; border-radius:3px; -webkit-border-radius:3px;} 74 | 75 | 76 | 77 | 78 | 79 | -------------------------------------------------------------------------------- /src/main/resources/static/css/adminn.css: -------------------------------------------------------------------------------- 1 | body{ color:#333; font-size:13px;} 2 | input,select,textarea{color:#333;} 3 | .bg{ width:100%; height:100%; position:absolute; background:url(../images/bg.jpg) } 4 | .panel{background:#fff;} 5 | form .form-group:last-child{padding-bottom:0;} 6 | .passcode{position:absolute;right:0;bottom:0;height:32px;margin:1px;border-left:solid 1px #ddd;text-align:center;line-height:32px;border-radius:0 4px 4px 0;} 7 | ul,li{ list-style-type:none;} 8 | 9 | .lefter{position:relative;float:left;width:180px;margin-right:-180px;background:#e6f2fb;text-align:center;} 10 | .righter{float:right;width:100%;padding-top:15px;background:#e6f2fb;} 11 | .mainer{margin-left:180px;} 12 | .field-icon-right .icon{ bottom:0px; top:auto} 13 | .logo{ float:left; color:#FFF; margin-top:10px; line-height:45px;} 14 | .logo img{ float:left; margin-right:10px;} 15 | .loginbox { background:url(../images/tmbg-white.png); border:0px;} 16 | /********头部******/ 17 | .header{height:70px; overflow:hidden; background:url(../images/bg.jpg) no-repeat 0 -1000px; } 18 | .head-l{ float:left; margin-top:17px; margin-left:15px; } 19 | .head-l .button{ padding:8px 15px;} 20 | .head-l .bg-blue:hover{ background-color:#03b6fd;} 21 | .leftnav{width:180px; height:100%; position:fixed; top:70px; left:0px;} 22 | .leftnav-title { height:50px; background:url(../images/bg.jpg) no-repeat 0 -1000px; color:#FFF; padding-left:22px; font-size:14px; line-height:50px;} 23 | .leftnav-title span{ margin-right:10px;} 24 | .leftnav h2{ padding:10px 0 10px 22px; transition:all .1s ease-in-out; display:block; cursor:pointer; font-weight:bold; font-size:14px; border-top:1px solid #b5cfd9;} 25 | .leftnav h2.on{ color:#09c;} 26 | .leftnav .border-bottom{ border-bottom:1px solid #b5cfd9;} 27 | .leftnav h2 span{ margin-right:10px;} 28 | .leftnav h2:hover{ color:#09c;} 29 | .leftnav ul {display:none; border-top:1px solid #b5cfd9; padding:5px 0; opacity:1;} 30 | .leftnav ul li{ list-style-type:none; } 31 | .leftnav ul li a{ display:block;padding-left:30px;line-height:30px; } 32 | .leftnav ul li span{ margin-right:8px;} 33 | .leftnav ul li a:hover,.leftnav ul li a.on{ color:#09c;} 34 | 35 | /***主要内容***/ 36 | .admin{background:#fff;position:fixed;border-left:solid 1px #b5cfd9;right:0;bottom:0;top:110px;left:180px; padding:15px; padding-right:0px; padding-bottom:0px; overflow:auto; border-top:1px solid #b5cfd9; padding-right:15px;} 37 | .content{width:100%;} 38 | .body-content{padding:20px 0; overflow:hidden;} 39 | .content .title{ border-bottom:1px solid #dfdfdf; line-height:35px; font-size:14px; font-weight:bold; color:#09c} 40 | .form-x .form-group .label{ width:10%;} 41 | .form-x .form-button { margin-left:10%;} 42 | .w50 { width:25%; float:left;} 43 | .form-x .tipss{ float:left; padding-left:10px; color:#888; line-height:42px;} 44 | .input-help { float:left; line-height:30px;} 45 | .input-help li{ float:left;margin-left:10px;} 46 | .bread{ margin-left:190px; margin-top:4px;} 47 | .bread li{ float:left;} 48 | .label label{ font-weight:normal; color:#333;} 49 | .form-group{ margin-bottom:12px;} 50 | .button{ padding:10px 15px;} 51 | .form-group .field .file{ background:#FFF; border:0px;} 52 | .form-group .field input[type=radio]{ vertical-align:middle; line-height:35px; margin-right:5px;} 53 | .form-group .radio { line-height:35px;} 54 | .table th{ text-align:center;} 55 | .table td { vertical-align:middle;} 56 | .tip img{width:100px; height:100px;} 57 | .clear{ clear:both; overflow:hidden;} 58 | .pagelist {padding:10px 0; text-align:center;} 59 | .pagelist span,.pagelist a{ border-radius:3px; border:1px solid #dfdfdf;display:inline-block; padding:5px 12px;} 60 | .pagelist a{ margin:0 3px;} 61 | .pagelist span.current{ background:#09F; color:#FFF; border-color:#09F; margin:0 2px;} 62 | .pagelist a:hover{background:#09F; color:#FFF; border-color:#09F; } 63 | .pagelist label{ padding-left:15px; color:#999;} 64 | .pagelist label b{color:red; font-weight:normal; margin:0 3px;} 65 | 66 | .search{ overflow:hidden;} 67 | .search li{float:left; margin-right:15px; line-height:35px;} 68 | 69 | .button.bg-main.icon-check-square-o{ padding:10px 30px;} 70 | .button.bg-main.icon-check-square-o:hover{ background:#08bbe1;} 71 | input[type="checkbox"], input[type="radio"]{ width:15px; height:15px; vertical-align:-3px; margin-right:5px;} 72 | 73 | textarea[name=content]{width:100%; height:500px; border:1px solid #ddd; border-radius:3px; -webkit-border-radius:3px;} 74 | 75 | 76 | 77 | 78 | 79 | -------------------------------------------------------------------------------- /src/main/resources/static/css/font.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: 'iconfont'; 3 | src: url('../fonts/iconfont.eot'); 4 | src: url('../fonts/iconfont.eot?#iefix') format('embedded-opentype'), 5 | url('../fonts/iconfont.woff') format('woff'), 6 | url('../fonts/iconfont.ttf') format('truetype'), 7 | url('../fonts/iconfont.svg#iconfont') format('svg'); 8 | } 9 | .iconfont{ 10 | font-family:"iconfont" !important; 11 | font-size:16px;font-style:normal; 12 | -webkit-font-smoothing: antialiased; 13 | -webkit-text-stroke-width: 0.2px; 14 | -moz-osx-font-smoothing: grayscale; 15 | } 16 | 17 | -------------------------------------------------------------------------------- /src/main/resources/static/css/iconfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/SmartApartmentManagementSystem/4dff249cfcdc50047cc6df4004440abdd182774c/src/main/resources/static/css/iconfont.eot -------------------------------------------------------------------------------- /src/main/resources/static/css/iconfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/SmartApartmentManagementSystem/4dff249cfcdc50047cc6df4004440abdd182774c/src/main/resources/static/css/iconfont.ttf -------------------------------------------------------------------------------- /src/main/resources/static/css/iconfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/SmartApartmentManagementSystem/4dff249cfcdc50047cc6df4004440abdd182774c/src/main/resources/static/css/iconfont.woff -------------------------------------------------------------------------------- /src/main/resources/static/images/bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/SmartApartmentManagementSystem/4dff249cfcdc50047cc6df4004440abdd182774c/src/main/resources/static/images/bg.jpg -------------------------------------------------------------------------------- /src/main/resources/static/images/info-img.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/SmartApartmentManagementSystem/4dff249cfcdc50047cc6df4004440abdd182774c/src/main/resources/static/images/info-img.png -------------------------------------------------------------------------------- /src/main/resources/static/images/item.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/SmartApartmentManagementSystem/4dff249cfcdc50047cc6df4004440abdd182774c/src/main/resources/static/images/item.png -------------------------------------------------------------------------------- /src/main/resources/static/images/logo-text.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/SmartApartmentManagementSystem/4dff249cfcdc50047cc6df4004440abdd182774c/src/main/resources/static/images/logo-text.png -------------------------------------------------------------------------------- /src/main/resources/static/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/SmartApartmentManagementSystem/4dff249cfcdc50047cc6df4004440abdd182774c/src/main/resources/static/images/logo.png -------------------------------------------------------------------------------- /src/main/resources/static/js/blog.js: -------------------------------------------------------------------------------- 1 | 2 | layui.define(['element', 'form','laypage','jquery','laytpl'],function(exports){ 3 | var element = layui.element 4 | ,form = layui.form 5 | ,laypage = layui.laypage 6 | ,$ = layui.jquery 7 | ,laytpl = layui.laytpl; 8 | 9 | 10 | //statr 分页 11 | 12 | laypage.render({ 13 | elem: 'test1' //注意,这里的 test1 是 ID,不用加 # 号 14 | ,count: 50 //数据总数,从服务端得到 15 | ,theme: '#1e9fff' 16 | }); 17 | 18 | // end 分頁 19 | 20 | 21 | 22 | // start 导航显示隐藏 23 | 24 | $("#mobile-nav").on('click', function(){ 25 | $("#pop-nav").toggle(); 26 | }); 27 | 28 | // end 导航显示隐藏 29 | 30 | 31 | 32 | 33 | //start 评论的特效 34 | 35 | (function ($) { 36 | $.extend({ 37 | tipsBox: function (options) { 38 | options = $.extend({ 39 | obj: null, //jq对象,要在那个html标签上显示 40 | str: "+1", //字符串,要显示的内容;也可以传一段html,如: "+1" 41 | startSize: "12px", //动画开始的文字大小 42 | endSize: "30px", //动画结束的文字大小 43 | interval: 600, //动画时间间隔 44 | color: "red", //文字颜色 45 | callback: function () { } //回调函数 46 | }, options); 47 | 48 | $("body").append("" + options.str + ""); 49 | 50 | var box = $(".num"); 51 | var left = options.obj.offset().left + options.obj.width() / 2; 52 | var top = options.obj.offset().top - 10; 53 | box.css({ 54 | "position": "absolute", 55 | "left": left + "px", 56 | "top": top + "px", 57 | "z-index": 9999, 58 | "font-size": options.startSize, 59 | "line-height": options.endSize, 60 | "color": options.color 61 | }); 62 | box.animate({ 63 | "font-size": options.endSize, 64 | "opacity": "0", 65 | "top": top - parseInt(options.endSize) + "px" 66 | }, options.interval, function () { 67 | box.remove(); 68 | options.callback(); 69 | }); 70 | } 71 | }); 72 | })($); 73 | 74 | function niceIn(prop){ 75 | prop.find('i').addClass('niceIn'); 76 | setTimeout(function(){ 77 | prop.find('i').removeClass('niceIn'); 78 | },1000); 79 | } 80 | 81 | $(function () { 82 | $(".like").on('click',function () { 83 | 84 | if(!($(this).hasClass("layblog-this"))){ 85 | this.text = '已赞'; 86 | $(this).addClass('layblog-this'); 87 | $.tipsBox({ 88 | obj: $(this), 89 | str: "+1", 90 | callback: function () { 91 | } 92 | }); 93 | niceIn($(this)); 94 | layer.msg('点赞成功', { 95 | icon: 6 96 | ,time: 1000 97 | }) 98 | } 99 | }); 100 | }); 101 | 102 | //end 评论的特效 103 | 104 | 105 | // start点赞图标变身 106 | $('#LAY-msg-box').on('click', '.info-img', function(){ 107 | $(this).addClass('layblog-this'); 108 | }) 109 | 110 | 111 | // end点赞图标变身 112 | 113 | //end 提交 114 | $('#item-btn').on('click', function(){ 115 | var elemCont = $('#LAY-msg-content') 116 | ,content = elemCont.val(); 117 | if(content.replace(/\s/g, '') == ""){ 118 | layer.msg('请先输入留言'); 119 | return elemCont.focus(); 120 | } 121 | 122 | var view = $('#LAY-msg-tpl').html() 123 | 124 | //模拟数据 125 | ,data = { 126 | username: '闲心' 127 | ,avatar: '../res/static/images/info-img.png' 128 | ,praise: 0 129 | ,content: content 130 | }; 131 | 132 | //模板渲染 133 | laytpl(view).render(data, function(html){ 134 | $('#LAY-msg-box').prepend(html); 135 | elemCont.val(''); 136 | layer.msg('留言成功', { 137 | icon: 1 138 | }) 139 | }); 140 | 141 | }) 142 | 143 | // start 图片遮罩 144 | var layerphotos = document.getElementsByClassName('layer-photos-demo'); 145 | for(var i = 1;i <= layerphotos.length;i++){ 146 | layer.photos({ 147 | photos: ".layer-photos-demo"+i+"" 148 | ,anim: 0 149 | }); 150 | } 151 | // end 图片遮罩 152 | 153 | 154 | //输出test接口 155 | exports('blog', {}); 156 | }); 157 | -------------------------------------------------------------------------------- /src/main/resources/static/js/index/article.js: -------------------------------------------------------------------------------- 1 | // JavaScript Document 2 | 3 | $(function(){ 4 | var oLi = document.getElementById("tab").getElementsByTagName("li"); 5 | var oUl = document.getElementById("ms-main").getElementsByTagName("div"); 6 | for(var i = 0; i < oLi.length; i++) 7 | { 8 | oLi[i].index = i; 9 | oLi[i].onmouseover = function () 10 | { 11 | for(var n = 0; n < oLi.length; n++) oLi[n].className=""; 12 | this.className = "cur"; 13 | for(var n = 0; n < oUl.length; n++) oUl[n].style.display = "none"; 14 | oUl[this.index].style.display = "block" 15 | } 16 | } 17 | }); -------------------------------------------------------------------------------- /src/main/resources/static/js/index/article_details.js: -------------------------------------------------------------------------------- 1 | // JavaScript Document 2 | var html =""; 3 | html+="
"; 4 | html+=""; 5 | html+=""; 6 | html+="香菇活雷锋"; 7 | html+="
刚刚
"; 8 | html+="
"; 9 | html+="
0回复
"; 10 | html+="编辑删除采纳
"; 11 | var editIndex = null; 12 | $(function(){ 13 | var oLi = document.getElementById("tab").getElementsByTagName("li"); 14 | var oUl = document.getElementById("ms-main").getElementsByTagName("div"); 15 | for(var i = 0; i < oLi.length; i++) 16 | { 17 | oLi[i].index = i; 18 | oLi[i].onmouseover = function () 19 | { 20 | for(var n = 0; n < oLi.length; n++) oLi[n].className=""; 21 | this.className = "cur"; 22 | for(var n = 0; n < oUl.length; n++) oUl[n].style.display = "none"; 23 | oUl[this.index].style.display = "block" 24 | } 25 | } 26 | }); 27 | 28 | layui.use(['layedit', 'form', 'layer', 'laypage'], function(){ 29 | var layedit = layui.layedit 30 | ,form = layui.form 31 | ,layer = layui.layer 32 | ,laypage = layui.laypage; 33 | 34 | layedit.set({ 35 | uploadImage: { 36 | url: '#' //接口url 37 | ,type: 'post' //默认post 38 | } 39 | }); 40 | 41 | editIndex = layedit.build('reply',{ 42 | height: 150, //设置编辑器高度 43 | tool: ['strong', 'italic', 'underline', 'left', 'center', 'right', '|', 'link', 'image', 'code'] 44 | }); //建立编辑器 45 | 46 | //只显示上一页、下一页 47 | laypage.render({ 48 | elem: 'page_reply' 49 | ,count: 20 50 | //['count', 'prev', 'page', 'next', 'limit', 'skip'] 51 | ,layout: ['prev', 'page', 'next'] 52 | ,jump: function(obj, first){ 53 | if(!first){ 54 | layer.msg('第 '+ obj.curr +' 页'); 55 | } 56 | } 57 | }); 58 | }); 59 | 60 | function getReply(){ 61 | layui.use(['layedit','layer','form'], function(){ 62 | var layedit = layui.layedit 63 | ,layer = layui.layer 64 | ,form = layui.form; 65 | 66 | //自定义验证规则 67 | form.verify({ 68 | reply: function(value){ 69 | var reply = layedit.getContent(editIndex); //获取编辑器的内容 70 | if(reply.length <= 0){ 71 | return '文章内容不能为空'; 72 | }else{ 73 | //获取添加的ui 74 | var ul = document.getElementById("jieda"); 75 | //创建li 76 | var li = document.createElement("li"); 77 | //设置id="newli" data-id='14' 78 | li.setAttribute("id", "newli"); 79 | li.setAttribute("data-id", "14"); 80 | li.innerHTML = html; 81 |    ul.appendChild(li); 82 | document.getElementById("testReply").innerHTML = reply; 83 | console.log(reply); 84 | } 85 | } 86 | }); 87 | }); 88 | } 89 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /src/main/resources/static/js/index/article_pub.js: -------------------------------------------------------------------------------- 1 | // JavaScript Document 2 | 3 | layui.use(['form', 'layedit'], function(){ 4 | var form = layui.form 5 | ,layer = layui.layer 6 | ,layedit = layui.layedit; 7 | 8 | layedit.set({ 9 | uploadImage: { 10 | url: '#' //接口url 11 | ,type: 'post' //默认post 12 | } 13 | }); 14 | 15 | //建立编辑器 16 | //var editIndex = layedit.build('content',{ 17 | // height: 400, //设置编辑器高度 18 | // tool: ['strong', 'italic', 'underline', 'left', 'center', 'right', '|', 'link', 'image', 'code'] 19 | //}); 20 | var editIndex = layedit.build('content'); 21 | 22 | 23 | //自定义验证规则 24 | form.verify({ 25 | title: function(value){ 26 | if(value.length < 5){ 27 | return '标题至少得5个字符'; 28 | } 29 | } 30 | ,content: function(value){ 31 | var content = layedit.getContent(editIndex); //获取编辑器的内容 32 | if(content.length <= 0){ 33 | return '文章内容不能为空'; 34 | } 35 | } 36 | ,type: function(value){ 37 | if(value.length <= 0){ 38 | return '请选择文章类型'; 39 | } 40 | } 41 | ,code: function(value){ 42 | if( value.length <= 0){ 43 | return '验证码不能为空'; 44 | } 45 | } 46 | }); 47 | 48 | }); -------------------------------------------------------------------------------- /src/main/resources/static/js/index/html5.js: -------------------------------------------------------------------------------- 1 | /* 2 | HTML5 Shiv v3.7.0 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed 3 | */ 4 | (function(l,f){function m(){var a=e.elements;return"string"==typeof a?a.split(" "):a}function i(a){var b=n[a[o]];b||(b={},h++,a[o]=h,n[h]=b);return b}function p(a,b,c){b||(b=f);if(g)return b.createElement(a);c||(c=i(b));b=c.cache[a]?c.cache[a].cloneNode():r.test(a)?(c.cache[a]=c.createElem(a)).cloneNode():c.createElem(a);return b.canHaveChildren&&!s.test(a)?c.frag.appendChild(b):b}function t(a,b){if(!b.cache)b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag(); 5 | a.createElement=function(c){return!e.shivMethods?b.createElem(c):p(c,a,b)};a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+m().join().replace(/[\w\-]+/g,function(a){b.createElem(a);b.frag.createElement(a);return'c("'+a+'")'})+");return n}")(e,b.frag)}function q(a){a||(a=f);var b=i(a);if(e.shivCSS&&!j&&!b.hasCSS){var c,d=a;c=d.createElement("p");d=d.getElementsByTagName("head")[0]||d.documentElement;c.innerHTML="x"; 6 | c=d.insertBefore(c.lastChild,d.firstChild);b.hasCSS=!!c}g||t(a,b);return a}var k=l.html5||{},s=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,r=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,j,o="_html5shiv",h=0,n={},g;(function(){try{var a=f.createElement("a");a.innerHTML="";j="hidden"in a;var b;if(!(b=1==a.childNodes.length)){f.createElement("a");var c=f.createDocumentFragment();b="undefined"==typeof c.cloneNode|| 7 | "undefined"==typeof c.createDocumentFragment||"undefined"==typeof c.createElement}g=b}catch(d){g=j=!0}})();var e={elements:k.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output progress section summary template time video",version:"3.7.0",shivCSS:!1!==k.shivCSS,supportsUnknownElements:g,shivMethods:!1!==k.shivMethods,type:"default",shivDocument:q,createElement:p,createDocumentFragment:function(a,b){a||(a=f); 8 | if(g)return a.createDocumentFragment();for(var b=b||i(a),c=b.frag.cloneNode(),d=0,e=m(),h=e.length;d'+(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;o=e.elemItem.length&&(n.index=e.elemItem.length-1),n.interval<800&&(n.interval=800),n.full?n.elem.css({position:"fixed",width:"100%",height:"100%",zIndex:9999}):n.elem.css({width:n.width,height:n.height}),n.elem.attr("lay-anim",n.anim),e.elemItem.eq(n.index).addClass(a),e.elemItem.length<=1||(e.indicator(),e.arrow(),e.autoplay(),e.events()))},m.prototype.reload=function(e){var n=this;clearInterval(n.timer),n.config=i.extend({},n.config,e),n.render()},m.prototype.prevIndex=function(){var e=this,i=e.config,n=i.index-1;return n<0&&(n=e.elemItem.length-1),n},m.prototype.nextIndex=function(){var e=this,i=e.config,n=i.index+1;return n>=e.elemItem.length&&(n=0),n},m.prototype.addIndex=function(e){var i=this,n=i.config;e=e||1,n.index=n.index+e,n.index>=i.elemItem.length&&(n.index=0)},m.prototype.subIndex=function(e){var i=this,n=i.config;e=e||1,n.index=n.index-e,n.index<0&&(n.index=i.elemItem.length-1)},m.prototype.autoplay=function(){var e=this,i=e.config;i.autoplay&&(clearInterval(e.timer),e.timer=setInterval(function(){e.slide()},i.interval))},m.prototype.arrow=function(){var e=this,n=e.config,t=i(['",'"].join(""));n.elem.attr("lay-arrow",n.arrow),n.elem.find("."+u)[0]&&n.elem.find("."+u).remove(),n.elem.append(t),t.on("click",function(){var n=i(this),t=n.attr("lay-type");e.slide(t)})},m.prototype.indicator=function(){var e=this,n=e.config,t=e.elemInd=i(['
    ',function(){var i=[];return layui.each(e.elemItem,function(e){i.push("")}),i.join("")}(),"
"].join(""));n.elem.attr("lay-indicator",n.indicator),n.elem.find("."+c)[0]&&n.elem.find("."+c).remove(),n.elem.append(t),"updown"===n.anim&&t.css("margin-top",-(t.height()/2)),t.find("li").on("hover"===n.trigger?"mouseover":n.trigger,function(){var t=i(this),a=t.index();a>n.index?e.slide("add",a-n.index):a/g,">").replace(/'/g,"'").replace(/"/g,""")),c.html('
  1. '+o.replace(/[\r\t\n]+/g,"
  2. ")+"
"),c.find(">.layui-code-h3")[0]||c.prepend('

'+(c.attr("lay-title")||e.title||"code")+(e.about?'layui.code':"")+"

");var d=c.find(">.layui-code-ol");c.addClass("layui-box layui-code-view"),(c.attr("lay-skin")||e.skin)&&c.addClass("layui-code-"+(c.attr("lay-skin")||e.skin)),(d.find("li").length/100|0)>0&&d.css("margin-left",(d.find("li").length/100|0)+"px"),(c.attr("lay-height")||e.height)&&d.css("max-height",c.attr("lay-height")||e.height)})})}).addcss("modules/code.css","skincodecss"); -------------------------------------------------------------------------------- /src/main/resources/static/layui/lay/modules/flow.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.5.6 MIT License By https://www.layui.com */ 2 | ;layui.define("jquery",function(e){"use strict";var l=layui.$,o=function(e){},t='';o.prototype.load=function(e){var o,i,n,r,a=this,c=0;e=e||{};var f=l(e.elem);if(f[0]){var m=l(e.scrollElem||document),u=e.mb||50,s=!("isAuto"in e)||e.isAuto,v=e.end||"没有更多了",y=e.scrollElem&&e.scrollElem!==document,d="加载更多",h=l('");f.find(".layui-flow-more")[0]||f.append(h);var p=function(e,t){e=l(e),h.before(e),t=0==t||null,t?h.html(v):h.find("a").html(d),i=t,o=null,n&&n()},g=function(){o=!0,h.find("a").html(t),"function"==typeof e.done&&e.done(++c,p)};if(g(),h.find("a").on("click",function(){l(this);i||o||g()}),e.isLazyimg)var n=a.lazyimg({elem:e.elem+" img",scrollElem:e.scrollElem});return s?(m.on("scroll",function(){var e=l(this),t=e.scrollTop();r&&clearTimeout(r),!i&&f.width()&&(r=setTimeout(function(){var i=y?e.height():l(window).height(),n=y?e.prop("scrollHeight"):document.documentElement.scrollHeight;n-t-i<=u&&(o||g())},100))}),a):a}},o.prototype.lazyimg=function(e){var o,t=this,i=0;e=e||{};var n=l(e.scrollElem||document),r=e.elem||"img",a=e.scrollElem&&e.scrollElem!==document,c=function(e,l){var o=n.scrollTop(),r=o+l,c=a?function(){return e.offset().top-n.offset().top+o}():e.offset().top;if(c>=o&&c<=r&&!e.attr("src")){var m=e.attr("lay-src");layui.img(m,function(){var l=t.lazyimg.elem.eq(i);e.attr("src",m).removeAttr("lay-src"),l[0]&&f(l),i++})}},f=function(e,o){var f=a?(o||n).height():l(window).height(),m=n.scrollTop(),u=m+f;if(t.lazyimg.elem=l(r),e)c(e,f);else for(var s=0;su)break}};if(f(),!o){var m;n.on("scroll",function(){var e=l(this);m&&clearTimeout(m),m=setTimeout(function(){f(null,e)},50)}),o=!0}return f},e("flow",new o)}); -------------------------------------------------------------------------------- /src/main/resources/static/layui/lay/modules/laypage.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.5.6 MIT License By https://www.layui.com */ 2 | ;layui.define(function(e){"use strict";var a=document,t="getElementById",n="getElementsByTagName",i="laypage",r="layui-disabled",u=function(e){var a=this;a.config=e||{},a.config.index=++s.index,a.render(!0)};u.prototype.type=function(){var e=this.config;if("object"==typeof e.elem)return void 0===e.elem.length?2:3},u.prototype.view=function(){var e=this,a=e.config,t=a.groups="groups"in a?0|a.groups:5;a.layout="object"==typeof a.layout?a.layout:["prev","page","next"],a.count=0|a.count,a.curr=0|a.curr||1,a.limits="object"==typeof a.limits?a.limits:[10,20,30,40,50],a.limit=0|a.limit||10,a.pages=Math.ceil(a.count/a.limit)||1,a.curr>a.pages&&(a.curr=a.pages),t<0?t=1:t>a.pages&&(t=a.pages),a.prev="prev"in a?a.prev:"上一页",a.next="next"in a?a.next:"下一页";var n=a.pages>t?Math.ceil((a.curr+(t>1?1:0))/(t>0?t:1)):1,i={prev:function(){return a.prev?''+a.prev+"":""}(),page:function(){var e=[];if(a.count<1)return"";n>1&&a.first!==!1&&0!==t&&e.push(''+(a.first||1)+"");var i=Math.floor((t-1)/2),r=n>1?a.curr-i:1,u=n>1?function(){var e=a.curr+(t-i-1);return e>a.pages?a.pages:e}():t;for(u-r2&&e.push('');r<=u;r++)r===a.curr?e.push('"+r+""):e.push(''+r+"");return a.pages>t&&a.pages>u&&a.last!==!1&&(u+1…'),0!==t&&e.push(''+(a.last||a.pages)+"")),e.join("")}(),next:function(){return a.next?''+a.next+"":""}(),count:'共 '+a.count+" 条",limit:function(){var e=['"}(),refresh:['','',""].join(""),skip:function(){return['到第','','页',""].join("")}()};return['
',function(){var e=[];return layui.each(a.layout,function(a,t){i[t]&&e.push(i[t])}),e.join("")}(),"
"].join("")},u.prototype.jump=function(e,a){if(e){var t=this,i=t.config,r=e.children,u=e[n]("button")[0],l=e[n]("input")[0],p=e[n]("select")[0],c=function(){var e=0|l.value.replace(/\s|\D/g,"");e&&(i.curr=e,t.render())};if(a)return c();for(var o=0,y=r.length;oi.pages||(i.curr=e,t.render())});p&&s.on(p,"change",function(){var e=this.value;i.curr*e>i.count&&(i.curr=Math.ceil(i.count/e)),i.limit=e,t.render()}),u&&s.on(u,"click",function(){c()})}},u.prototype.skip=function(e){if(e){var a=this,t=e[n]("input")[0];t&&s.on(t,"keyup",function(t){var n=this.value,i=t.keyCode;/^(37|38|39|40)$/.test(i)||(/\D/.test(n)&&(this.value=n.replace(/\D/,"")),13===i&&a.jump(e,!0))})}},u.prototype.render=function(e){var n=this,i=n.config,r=n.type(),u=n.view();2===r?i.elem&&(i.elem.innerHTML=u):3===r?i.elem.html(u):a[t](i.elem)&&(a[t](i.elem).innerHTML=u),i.jump&&i.jump(i,e);var s=a[t]("layui-laypage-"+i.index);n.jump(s),i.hash&&!e&&(location.hash="!"+i.hash+"="+i.curr),n.skip(s)};var s={render:function(e){var a=new u(e);return a.index},index:layui.laypage?layui.laypage.index+1e4:0,on:function(e,a,t){return e.attachEvent?e.attachEvent("on"+a,function(a){a.target=a.srcElement,t.call(e,a)}):e.addEventListener(a,t,!1),this}};e(i,s)}); -------------------------------------------------------------------------------- /src/main/resources/static/layui/lay/modules/laytpl.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.5.6 MIT License By https://www.layui.com */ 2 | ;layui.define(function(e){"use strict";var r={open:"{{",close:"}}"},c={exp:function(e){return new RegExp(e,"g")},query:function(e,c,t){var o=["#([\\s\\S])+?","([^{#}])*?"][e||0];return n((c||"")+r.open+o+r.close+(t||""))},escape:function(e){return String(e||"").replace(/&(?!#?[a-zA-Z0-9]+;)/g,"&").replace(//g,">").replace(/'/g,"'").replace(/"/g,""")},error:function(e,r){var c="Laytpl Error:";return"object"==typeof console&&console.error(c+e+"\n"+(r||"")),c+e}},n=c.exp,t=function(e){this.tpl=e};t.pt=t.prototype,window.errors=0,t.pt.parse=function(e,t){var o=this,p=e,a=n("^"+r.open+"#",""),l=n(r.close+"$","");e=e.replace(/\s+|\r|\t|\n/g," ").replace(n(r.open+"#"),r.open+"# ").replace(n(r.close+"}"),"} "+r.close).replace(/\\/g,"\\\\").replace(n(r.open+"!(.+?)!"+r.close),function(e){return e=e.replace(n("^"+r.open+"!"),"").replace(n("!"+r.close),"").replace(n(r.open+"|"+r.close),function(e){return e.replace(/(.)/g,"\\$1")})}).replace(/(?="|')/g,"\\").replace(c.query(),function(e){return e=e.replace(a,"").replace(l,""),'";'+e.replace(/\\/g,"")+';view+="'}).replace(c.query(1),function(e){var c='"+(';return e.replace(/\s/g,"")===r.open+r.close?"":(e=e.replace(n(r.open+"|"+r.close),""),/^=/.test(e)&&(e=e.replace(/^=/,""),c='"+_escape_('),c+e.replace(/\\/g,"")+')+"')}),e='"use strict";var view = "'+e+'";return view;';try{return o.cache=e=new Function("d, _escape_",e),e(t,c.escape)}catch(u){return delete o.cache,c.error(u,p)}},t.pt.render=function(e,r){var n,t=this;return e?(n=t.cache?t.cache(e,c.escape):t.parse(t.tpl,e),r?void r(n):n):c.error("no data")};var o=function(e){return"string"!=typeof e?c.error("Template not found"):new t(e)};o.config=function(e){e=e||{};for(var c in e)r[c]=e[c]},o.v="1.2.0",e("laytpl",o)}); -------------------------------------------------------------------------------- /src/main/resources/static/layui/lay/modules/rate.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.5.6 MIT License By https://www.layui.com */ 2 | ;layui.define("jquery",function(e){"use strict";var a=layui.jquery,i={config:{},index:layui.rate?layui.rate.index+1e4:0,set:function(e){var i=this;return i.config=a.extend({},i.config,e),i},on:function(e,a){return layui.onevent.call(this,n,e,a)}},l=function(){var e=this,a=e.config;return{setvalue:function(a){e.setvalue.call(e,a)},config:a}},n="rate",t="layui-rate",o="layui-icon-rate",s="layui-icon-rate-solid",u="layui-icon-rate-half",r="layui-icon-rate-solid layui-icon-rate-half",c="layui-icon-rate-solid layui-icon-rate",f="layui-icon-rate layui-icon-rate-half",v=function(e){var l=this;l.index=++i.index,l.config=a.extend({},l.config,i.config,e),l.render()};v.prototype.config={length:5,text:!1,readonly:!1,half:!1,value:0,theme:""},v.prototype.render=function(){var e=this,i=e.config,l=i.theme?'style="color: '+i.theme+';"':"";i.elem=a(i.elem),parseInt(i.value)!==i.value&&(i.half||(i.value=Math.ceil(i.value)-i.value<.5?Math.ceil(i.value):Math.floor(i.value)));for(var n='
    ",u=1;u<=i.length;u++){var r='
  • ";i.half&&parseInt(i.value)!==i.value&&u==Math.ceil(i.value)?n=n+'
  • ":n+=r}n+="
"+(i.text?''+i.value+"星":"")+"";var c=i.elem,f=c.next("."+t);f[0]&&f.remove(),e.elemTemp=a(n),i.span=e.elemTemp.next("span"),i.setText&&i.setText(i.value),c.html(e.elemTemp),c.addClass("layui-inline"),i.readonly||e.action()},v.prototype.setvalue=function(e){var a=this,i=a.config;i.value=e,a.render()},v.prototype.action=function(){var e=this,i=e.config,l=e.elemTemp,n=l.find("i").width();l.children("li").each(function(e){var t=e+1,v=a(this);v.on("click",function(e){if(i.value=t,i.half){var o=e.pageX-a(this).offset().left;o<=n/2&&(i.value=i.value-.5)}i.text&&l.next("span").text(i.value+"星"),i.choose&&i.choose(i.value),i.setText&&i.setText(i.value)}),v.on("mousemove",function(e){if(l.find("i").each(function(){a(this).addClass(o).removeClass(r)}),l.find("i:lt("+t+")").each(function(){a(this).addClass(s).removeClass(f)}),i.half){var c=e.pageX-a(this).offset().left;c<=n/2&&v.children("i").addClass(u).removeClass(s)}}),v.on("mouseleave",function(){l.find("i").each(function(){a(this).addClass(o).removeClass(r)}),l.find("i:lt("+Math.floor(i.value)+")").each(function(){a(this).addClass(s).removeClass(f)}),i.half&&parseInt(i.value)!==i.value&&l.children("li:eq("+Math.floor(i.value)+")").children("i").addClass(u).removeClass(c)})})},v.prototype.events=function(){var e=this;e.config},i.render=function(e){var a=new v(e);return l.call(a)},e(n,i)}); -------------------------------------------------------------------------------- /src/main/resources/static/layui/lay/modules/util.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.5.6 MIT License By https://www.layui.com */ 2 | ;layui.define("jquery",function(e){"use strict";var t=layui.$,i={fixbar:function(e){var i,n,a="layui-fixbar",o="layui-fixbar-top",r=t(document),l=t("body");e=t.extend({showHeight:200},e),e.bar1=e.bar1===!0?"":e.bar1,e.bar2=e.bar2===!0?"":e.bar2,e.bgcolor=e.bgcolor?"background-color:"+e.bgcolor:"";var c=[e.bar1,e.bar2,""],u=t(['
    ',e.bar1?'
  • '+c[0]+"
  • ":"",e.bar2?'
  • '+c[1]+"
  • ":"",'
  • '+c[2]+"
  • ","
"].join("")),g=u.find("."+o),s=function(){var t=r.scrollTop();t>=e.showHeight?i||(g.show(),i=1):i&&(g.hide(),i=0)};t("."+a)[0]||("object"==typeof e.css&&u.css(e.css),l.append(u),s(),u.find("li").on("click",function(){var i=t(this),n=i.attr("lay-type");"top"===n&&t("html,body").animate({scrollTop:0},200),e.click&&e.click.call(this,n)}),r.on("scroll",function(){clearTimeout(n),n=setTimeout(function(){s()},100)}))},countdown:function(e,t,i){var n=this,a="function"==typeof t,o=new Date(e).getTime(),r=new Date(!t||a?(new Date).getTime():t).getTime(),l=o-r,c=[Math.floor(l/864e5),Math.floor(l/36e5)%24,Math.floor(l/6e4)%60,Math.floor(l/1e3)%60];a&&(i=t);var u=setTimeout(function(){n.countdown(e,r+1e3,i)},1e3);return i&&i(l>0?c:[0,0,0,0],t,u),l<=0&&clearTimeout(u),u},timeAgo:function(e,t){var i=this,n=[[],[]],a=(new Date).getTime()-new Date(e).getTime();return a>26784e5?(a=new Date(e),n[0][0]=i.digit(a.getFullYear(),4),n[0][1]=i.digit(a.getMonth()+1),n[0][2]=i.digit(a.getDate()),t||(n[1][0]=i.digit(a.getHours()),n[1][1]=i.digit(a.getMinutes()),n[1][2]=i.digit(a.getSeconds())),n[0].join("-")+" "+n[1].join(":")):a>=864e5?(a/1e3/60/60/24|0)+"天前":a>=36e5?(a/1e3/60/60|0)+"小时前":a>=18e4?(a/1e3/60|0)+"分钟前":a<0?"未来":"刚刚"},digit:function(e,t){var i="";e=String(e),t=t||2;for(var n=e.length;n/g,">").replace(/'/g,"'").replace(/"/g,""")},event:function(e,n,a){var o=t("body");return a=a||"click",n=i.event[e]=t.extend(!0,i.event[e],n)||{},i.event.UTIL_EVENT_CALLBACK=i.event.UTIL_EVENT_CALLBACK||{},o.off(a,"*["+e+"]",i.event.UTIL_EVENT_CALLBACK[e]),i.event.UTIL_EVENT_CALLBACK[e]=function(){var i=t(this),a=i.attr(e);"function"==typeof n[a]&&n[a].call(this,i)},o.on(a,"*["+e+"]",i.event.UTIL_EVENT_CALLBACK[e]),n}};!function(e,t,i){"$:nomunge";function n(){a=t[l](function(){o.each(function(){var t=e(this),i=t.width(),n=t.height(),a=e.data(this,u);(i!==a.w||n!==a.h)&&t.trigger(c,[a.w=i,a.h=n])}),n()},r[g])}var a,o=e([]),r=e.resize=e.extend(e.resize,{}),l="setTimeout",c="resize",u=c+"-special-event",g="delay",s="throttleWindow";r[g]=250,r[s]=!0,e.event.special[c]={setup:function(){if(!r[s]&&this[l])return!1;var t=e(this);o=o.add(t),e.data(this,u,{w:t.width(),h:t.height()}),1===o.length&&n()},teardown:function(){if(!r[s]&&this[l])return!1;var t=e(this);o=o.not(t),t.removeData(u),o.length||clearTimeout(a)},add:function(t){function n(t,n,o){var r=e(this),l=e.data(this,u)||{};l.w=n!==i?n:r.width(),l.h=o!==i?o:r.height(),a.apply(this,arguments)}if(!r[s]&&this[l])return!1;var a;return e.isFunction(t)?(a=t,n):(a=t.handler,void(t.handler=n))}}}(t,window),e("util",i)}); -------------------------------------------------------------------------------- /src/main/resources/templates/admin/m-admin-edit.html: -------------------------------------------------------------------------------- 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 | 27 |
28 |
29 |
30 | 31 |
32 | 34 |
35 |
36 |
37 |
38 | 39 | 40 |
41 |
42 |
43 |
44 | 75 | 76 | -------------------------------------------------------------------------------- /src/main/resources/templates/admin/m-admin-save.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 添加管理员信息 6 | 7 | 8 | 9 | 10 |
11 | 12 |
13 | 14 | 管理员 15 | 管理员列表 16 | 添加管理员 17 | 18 |
19 | 20 |
21 |
22 | 23 |
24 | 26 |
27 |
28 |
29 | 30 |
31 | 33 |
34 |
35 |
36 |
37 | 38 | 39 |
40 |
41 |
42 |
43 | 69 | 70 | -------------------------------------------------------------------------------- /src/main/resources/templates/lokhouse/key-add.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 公寓管理信息 6 | 7 | 8 | 9 | 10 |
11 | 12 |
13 | 14 | 公寓 15 | 列表 16 | 信息 17 | 18 |
19 | 20 |
21 |
22 | 23 |
24 | 26 |
27 |
28 |
29 | 30 |
31 | 33 |
34 |
35 |
36 | 37 |
38 | 40 |
41 |
42 |
43 | 44 |
45 | 47 |
48 |
49 |
50 |
51 | 52 | 53 |
54 |
55 |
56 |
57 | 83 | 84 | -------------------------------------------------------------------------------- /src/main/resources/templates/lokhouse/key-edit.html: -------------------------------------------------------------------------------- 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 | 27 |
28 |
29 |
30 | 31 |
32 | 34 |
35 |
36 |
37 | 38 |
39 | 41 |
42 |
43 |
44 | 45 |
46 | 48 |
49 |
50 |
51 |
52 | 53 | 54 |
55 |
56 |
57 |
58 | 91 | 92 | -------------------------------------------------------------------------------- /src/main/resources/templates/loops/loopsedit.html: -------------------------------------------------------------------------------- 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 | 27 |
28 |
29 |
30 | 31 |
32 | 34 |
35 |
36 |
37 |
38 | 39 | 40 |
41 |
42 |
43 |
44 | 75 | 76 | -------------------------------------------------------------------------------- /src/main/resources/templates/loops/loopslist.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 退宿离校列表 6 | 7 | 8 | 9 | 10 |
11 | 12 |
13 | 14 | 退宿离校 15 | 列表 16 | 17 | 18 | 刷新 19 | 20 |
21 | 22 | 25 | 26 |
27 |
28 | 104 | 108 | 109 | -------------------------------------------------------------------------------- /src/main/resources/templates/loops/loppsadd.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 添加退宿离校 6 | 7 | 8 | 9 | 10 |
11 | 12 |
13 | 14 | 退宿离校 15 | 列表 16 | 信息 17 | 18 |
19 | 20 |
21 |
22 | 23 |
24 | 26 |
27 |
28 |
29 | 30 |
31 | 33 |
34 |
35 |
36 |
37 | 38 | 39 |
40 |
41 |
42 |
43 | 69 | 70 | -------------------------------------------------------------------------------- /src/main/resources/templates/m-home-page.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 首页 6 | 7 | 8 | 19 | 20 | 21 | 26 | 38 | 39 | -------------------------------------------------------------------------------- /src/main/resources/templates/m-login.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 智慧公寓后台系统 7 | 8 | 9 | 31 | 32 | 33 |
34 |
35 |

智慧公寓后台系统

36 |
37 |
39 |
40 | 43 |
44 |
45 | 48 |
49 |
50 |
51 | 54 |
55 |
56 |
57 |
58 | 86 | 87 | -------------------------------------------------------------------------------- /src/main/resources/templates/oop/oopadd.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 添加门禁出入 6 | 7 | 8 | 9 | 10 |
11 | 12 |
13 | 14 | 门禁出入 15 | 列表 16 | 信息 17 | 18 |
19 | 20 |
21 |
22 | 23 |
24 | 26 |
27 |
28 |
29 | 30 |
31 | 33 |
34 |
35 |
36 | 37 |
38 | 40 |
41 |
42 |
43 |
44 | 45 | 46 |
47 |
48 |
49 |
50 | 76 | 77 | -------------------------------------------------------------------------------- /src/main/resources/templates/oop/oopedit.html: -------------------------------------------------------------------------------- 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 | 27 |
28 |
29 |
30 | 31 |
32 | 34 |
35 |
36 |
37 | 38 |
39 | 41 |
42 |
43 |
44 |
45 | 46 | 47 |
48 |
49 |
50 |
51 | 83 | 84 | -------------------------------------------------------------------------------- /src/main/resources/templates/oop/ooplist.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 门禁出入列表 6 | 7 | 8 | 9 | 10 |
11 | 12 |
13 | 14 | 门禁出入 15 | 列表 16 | 17 | 18 | 刷新 19 | 20 |
21 | 22 | 25 | 26 |
27 |
28 | 105 | 109 | 110 | -------------------------------------------------------------------------------- /src/main/resources/templates/user/useredit.html: -------------------------------------------------------------------------------- 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 | 27 |
28 |
29 |
30 | 31 |
32 | 34 |
35 |
36 |
37 |
38 | 39 | 40 |
41 |
42 |
43 |
44 | 75 | 76 | -------------------------------------------------------------------------------- /src/main/resources/templates/user/usersave.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 添加用户信息 6 | 7 | 8 | 9 | 10 |
11 | 12 |
13 | 14 | 用户 15 | 列表 16 | 添加用户 17 | 18 |
19 | 20 |
21 |
22 | 23 |
24 | 26 |
27 |
28 |
29 | 30 |
31 | 33 |
34 |
35 |
36 |
37 | 38 | 39 |
40 |
41 |
42 |
43 | 69 | 70 | -------------------------------------------------------------------------------- /src/main/resources/templates/userop/useradd.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 登记管理信息 6 | 7 | 8 | 9 | 10 |
11 | 12 |
13 | 14 | 登记 15 | 列表 16 | 登记管理 17 | 18 |
19 | 20 |
21 |
22 | 23 |
24 | 26 |
27 |
28 |
29 | 30 |
31 | 33 |
34 |
35 |
36 | 37 |
38 | 40 |
41 |
42 |
43 | 44 |
45 | 47 |
48 |
49 |
50 |
51 | 52 | 53 |
54 |
55 |
56 |
57 | 83 | 84 | -------------------------------------------------------------------------------- /src/main/resources/templates/userop/userdit.html: -------------------------------------------------------------------------------- 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 | 27 |
28 |
29 |
30 | 31 |
32 | 34 |
35 |
36 |
37 | 38 |
39 | 41 |
42 |
43 |
44 | 45 |
46 | 48 |
49 |
50 |
51 |
52 | 53 | 54 |
55 |
56 |
57 |
58 | 91 | 92 | -------------------------------------------------------------------------------- /src/main/resources/templates/vivew/login.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 智慧公寓用户系统 7 | 8 | 9 | 31 | 32 | 33 |
34 |
35 |

智慧公寓用户系统

36 |
37 |
39 |
40 | 43 |
44 |
45 | 48 |
49 |
50 |
51 | 54 |
55 |
56 |
57 |
58 | 86 | 87 | -------------------------------------------------------------------------------- /src/test/java/com/family/SpringbootFamilytestApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.family; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class SpringbootFamilytestApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | --------------------------------------------------------------------------------