环境:开发工具:idea,数据库:MySQL5.7 jdk1.8
架构:SpringBoot,前端HTML
主要功能
管理员:收入详情、支出详情、活期资产、理财详情、负债详情、理财推荐、统计报表、家庭成员管理、用户管理、角色管理等
家庭管理员:收入详情、支出详情、活期资产、理财详情、负债详情、理财推荐、统计报表、家庭成员管理等;
普通用户:收入详情、支出详情、统计报表等;

项目图片:
























部分代码

package com.xust.ffms.controller;import com.xust.ffms.configs.Md5UtilSimple;
import com.xust.ffms.dao.UserInfoMapper;
import com.xust.ffms.entity.Privilege;
import com.xust.ffms.entity.Role;
import com.xust.ffms.entity.RoleVo;
import com.xust.ffms.entity.UserInfo;
import com.xust.ffms.service.PrivilegeService;
import com.xust.ffms.service.UserInfoService;
import com.xust.ffms.utils.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.util.CollectionUtils;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;import javax.annotation.Resource;
import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;@Controller
public class UserInfoController {@Resourceprivate UserInfoService userInfoService;@Resourceprivate PrivilegeService privilegeService;@AutowiredUserInfoMapper userInfoMapper;@RequestMapping(value = {"/", "login.html"})public String toLogin(HttpServletRequest request, HttpServletResponse response) {HttpSession session = request.getSession();System.out.println(session.getAttribute(Config.CURRENT_USERNAME));if (session.getAttribute(Config.CURRENT_USERNAME) == null) {return "/login";} else {try {response.sendRedirect("/pages/index");} catch (IOException e) {e.printStackTrace();return "/login";}return null;}}@RequestMapping(value = "register.html")public String toRegister(HttpServletRequest request, HttpServletResponse response) {return "register";}//    @RequestMapping(value = "/login.do",method = RequestMethod.POST)@RequestMapping(value = "/login.do")@ResponseBodypublic Result getUserInfo(UserInfo userInfo, HttpServletRequest request, HttpServletResponse response) {boolean userIsExisted = userInfoService.userIsExisted(userInfo);System.out.println(userIsExisted + " - " + request.getHeader("token"));UserInfo user = getUserInfo(userInfo);if ("client".equals(request.getHeader("token")) || !userIsExisted) {//用户不存在return ResultUtil.unSuccess("用户不存在!");}if (userIsExisted && !user.getPassword().equals(Md5UtilSimple.md5(userInfo.getPassword()))) {return ResultUtil.unSuccess("用户名或密码错误!");} else {//将用户信息存入sessionuserInfo = setSessionUserInfo(user, request.getSession());//将当前用户信息存入cookiesetCookieUser(request, response);return ResultUtil.success("登录成功", userInfo);}}@RequestMapping(value = "/register.do")@ResponseBodypublic Result register(UserInfo userInfo, HttpServletRequest request, HttpServletResponse response) {System.out.println(userInfo);boolean userIsExisted = userInfoService.userIsExisted(userInfo);if (userIsExisted) {return ResultUtil.unSuccess("用户已存在!");}try {userInfo.setPassword(Md5UtilSimple.md5(userInfo.getPassword()));int num = userInfoService.add(userInfo);if (num > 0) {return ResultUtil.success();} else {return ResultUtil.unSuccess();}} catch (Exception e) {return ResultUtil.error(e);}}@RequestMapping("/users/getUsersByWhere/{pageNo}/{pageSize}")public @ResponseBodyResult getUsersByWhere(UserInfo userInfo, @PathVariable int pageNo, @PathVariable int pageSize, HttpSession session) {/*if (StringUtils.isEmpty(userInfo.getHouseid())) {if (Config.getSessionUser(session)!=null){userInfo.setHouseid(Config.getSessionUser(session).getHouseid());}}*/Utils.log(userInfo.toString());PageModel model = new PageModel<>(pageNo, userInfo);model.setPageSize(pageSize);return userInfoService.getUsersByWhere(model);}@RequestMapping("/user/add")public @ResponseBodyResult addUser(UserInfo userInfo,HttpSession session) {boolean userIsExisted = userInfoService.userIsExisted(userInfo);if (userIsExisted) {return ResultUtil.unSuccess("用户已存在!");}if (Config.getSessionUser(session)!=null){userInfo.setHouseid(Config.getSessionUser(session).getHouseid());}System.out.println(userInfo);try {userInfo.setPassword(Md5UtilSimple.md5(userInfo.getPassword()));int num = userInfoService.add(userInfo);if (num > 0) {return ResultUtil.success();} else {return ResultUtil.unSuccess();}} catch (Exception e) {return ResultUtil.error(e);}}@RequestMapping("/user/update")public @ResponseBodyResult updateUser(UserInfo userInfo,HttpSession session) {try {UserInfo currentUser = Config.getSessionUser(session);if (currentUser.getRoleid() == 2){userInfo.setRoleid(null);}int num = userInfoService.update(userInfo);if (num > 0) {return ResultUtil.success();} else {return ResultUtil.unSuccess();}} catch (Exception e) {return ResultUtil.error(e);}}@RequestMapping("/user/password/change")public @ResponseBodyResult updateUserPassword(UserInfo userInfo, @RequestParam(name = "newPassword") String newPassword, @RequestParam(name = "reNewPassword") String reNewPassword, HttpServletRequest request, HttpServletResponse response) {if (!reNewPassword.equals(newPassword)) {return ResultUtil.unSuccess("两次新密码不一致!");}UserInfo user = getUserInfo(userInfo);if (user == null) {return ResultUtil.unSuccess("用户不存在!");}if (!Md5UtilSimple.md5(userInfo.getPassword()).equals(user.getPassword())) {return ResultUtil.unSuccess("原密码错误!");}try {user.setPassword(Md5UtilSimple.md5(newPassword));int num = userInfoService.changePassword(userInfo, user.getPassword());if (num > 0) {delCookieUser(request, response);request.getSession().removeAttribute(Config.CURRENT_USERNAME);System.out.println(request.getSession().getAttribute(Config.CURRENT_USERNAME));return ResultUtil.success();} else {return ResultUtil.unSuccess();}} catch (Exception e) {return ResultUtil.error(e);}}@RequestMapping("/user/del/{id}")public @ResponseBodyResult deleteUser(@PathVariable String id) {try {int num = userInfoService.delete(id);if (num > 0) {return ResultUtil.success();} else {return ResultUtil.unSuccess();}} catch (Exception e) {return ResultUtil.error(e);}}@RequestMapping("/getSessionUser")@ResponseBodypublic UserInfo getSessionUser(HttpSession session) {UserInfo sessionUser = (UserInfo) session.getAttribute(Config.CURRENT_USERNAME);sessionUser.setPassword(null);return sessionUser;}@RequestMapping("/logout")public String logout(HttpServletRequest request, HttpServletResponse response) {delCookieUser(request, response);request.getSession().removeAttribute(Config.CURRENT_USERNAME);System.out.println(request.getSession().getAttribute(Config.CURRENT_USERNAME));return "login";}@RequestMapping("/getAllRoles")public @ResponseBodyResult<Role> getAllRoles() {try {List<Role> roles = userInfoService.getAllRoles();if (roles.size() > 0) {return ResultUtil.success(roles);} else {return ResultUtil.unSuccess();}} catch (Exception e) {return ResultUtil.error(e);}}@RequestMapping("/getAllPrivilege")public @ResponseBodyString getAllPrivilege(String roleId) {List<String> ids = userInfoService.getAllPrivilege(roleId);if (!CollectionUtils.isEmpty(ids)) {String join = String.join(",", ids);if (join.indexOf("65") > 0 || join.indexOf("63") >0){join += ",62";}if (join.indexOf("75") > 0 || join.indexOf("76") >0 || join.indexOf("77") >0 || join.indexOf("78") >0){join += ",64";}if (join.indexOf("67") > 0){join += ",66";}if (join.indexOf("74") > 0 ){join += ",68";}if (join.indexOf("70") > 0 || join.indexOf("71") >0 ){join += ",69";}return join;}return "";}@RequestMapping("/role/add")public @ResponseBodyResult addRole(RoleVo role) {Role role1 = new Role();role1.setRolename(role.getName());Role role2 = userInfoMapper.selectRoleByName1(role.getName());if (role2 != null) {return ResultUtil.unSuccess("该角色已存在");}userInfoService.addRole(role1);String[] id = role.getId();if (id != null){id = deleteArrayNull(id);}if (id != null && id.length > 0) {String join = String.join(",", id);if (join.indexOf("65") > 0 || join.indexOf("63") >0){join += ",62";}if (join.indexOf("75") > 0 || join.indexOf("76") >0 || join.indexOf("77") >0 || join.indexOf("78") >0){join += ",64";}if (join.indexOf("67") > 0){join += ",66";}if (join.indexOf("74") > 0 ){join += ",68";}if (join.indexOf("70") > 0 || join.indexOf("71") >0 ){join += ",69";}String[] split = join.split(",");for (int i1 = 0; i1 < split.length; i1++) {userInfoMapper.insertPrivileges(role1.getRoleid(), split[i1]);}}return ResultUtil.success();}@RequestMapping("/role/update")public @ResponseBodyResult updateRole(RoleVo role) {userInfoMapper.deletePrivilege(role.getRoleid());//userInfoMapper.deleteRole(role.getRoleid());Role role2 = userInfoMapper.selectRoleByName(role.getName(),role.getRoleid());if (role2 != null) {return ResultUtil.unSuccess("该角色已存在");}Role role1 = new Role();role1.setRoleid(Integer.valueOf(role.getRoleid()));role1.setRolename(role.getName());userInfoMapper.updateRole(role1);String[] id = role.getId();if (id != null){id = deleteArrayNull(id);}if (id != null && id.length > 0) {String join = String.join(",", id);if (join.indexOf("65") > 0 || join.indexOf("63") >0){join += ",62";}if (join.indexOf("75") > 0 || join.indexOf("76") >0 || join.indexOf("77") >0 || join.indexOf("78") >0){join += ",64";}if (join.indexOf("67") > 0){join += ",66";}if (join.indexOf("74") > 0 ){join += ",68";}if (join.indexOf("70") > 0 || join.indexOf("71") >0 ){join += ",69";}String[] split = join.split(",");for (int i1 = 0; i1 < split.length; i1++) {userInfoMapper.insertPrivileges(role1.getRoleid(), split[i1]);}}return ResultUtil.success();}@RequestMapping("/role/del/{roleid}")public @ResponseBodyResult deleteRole(@PathVariable String roleid) {userInfoMapper.deletePrivilege(roleid);userInfoMapper.deleteRole(roleid);return ResultUtil.success();}/**** 去除String数组中的空值*/private String[] deleteArrayNull(String string[]) {String strArr[] = string;// step1: 定义一个list列表,并循环赋值ArrayList<String> strList = new ArrayList<String>();for (int i = 0; i < strArr.length; i++) {strList.add(strArr[i]);}// step2: 删除list列表中所有的空值while (strList.remove(null));while (strList.remove(""));// step3: 把list列表转换给一个新定义的中间数组,并赋值给它String strArrLast[] = strList.toArray(new String[strList.size()]);return strArrLast;}@RequestMapping("/getRole/{id}")public @ResponseBodyResult getRoleById(@PathVariable String id) {try {Role role = userInfoService.getRoleById(id);if (role != null) {return ResultUtil.success(role);} else {return ResultUtil.unSuccess();}} catch (Exception e) {return ResultUtil.error(e);}}/*** 登录时将用户信息加入cookie中** @param response*/private void setCookieUser(HttpServletRequest request, HttpServletResponse response) {UserInfo user = getSessionUser(request.getSession());Cookie cookie = new Cookie(Config.CURRENT_USERNAME, user.getUsername() + "_" + user.getId());//cookie 保存7天cookie.setMaxAge(60 * 60 * 24 * 7);response.addCookie(cookie);}/*** 注销时删除cookie信息** @param request* @param response*/private void delCookieUser(HttpServletRequest request, HttpServletResponse response) {UserInfo user = getSessionUser(request.getSession());Cookie cookie = new Cookie(Config.CURRENT_USERNAME, user.getUsername() + "_" + user.getId());cookie.setMaxAge(0);response.addCookie(cookie);}/*** 通过用户信息获取用户权限信息,并存入session中** @param userInfo* @param session* @return*/public UserInfo setSessionUserInfo(UserInfo userInfo, HttpSession session) {List<Privilege> privileges = privilegeService.getPrivilegeByRoleid(userInfo.getRoleid());userInfo.setPrivileges(privileges);session.setAttribute(Config.CURRENT_USERNAME, userInfo);return userInfo;}public UserInfo getUserInfo(UserInfo userInfo) {return userInfoService.getUserInfo(userInfo);}//    public static void main(String[] args) {
//        int i = "3,4".indexOf("5");
//        System.out.println(i);
//    }}

获取方式:联系下方名片获取

毕设-基于SpringBoot家庭理财管理系统v2相关推荐

  1. 基于SpringBoot家庭理财管理系统(升级版本)

    [辰兮要努力]:hello你好我是辰兮,很高兴你能来阅读,昵称是希望自己能不断精进,向着优秀程序员前行! 博客来源于项目以及编程中遇到的问题总结,偶尔会有读书分享,我会陆续更新Java前端.后台.数据 ...

  2. 基于SSM家庭理财管理系统的设计与实现【毕业设计项目】

    大家好,我是吉哥.没有啥兴趣,喜欢撸代码,做事干净利索.今天和大家聊一聊的是一个ssm框架的家庭财务管理系统.项目的话页面简洁,易操作.比较适合初学者学习.毕业设计.课程设计.大作业等等.小编的观点就 ...

  3. 基于SpringBoot家庭理财系统(Java项目)

    文章目录 一.选题背景介绍 二.系统权限设计 三.新增理财模块 四.毕设专栏介绍 一.选题背景介绍

  4. 基于springboot的理财管理系统设计与实现 Java MySQL

    10143_基于springboot的理财管理系统 技术 SpringBoot 工具 eclipse + tomact + mysql + jdk 功能详情

  5. 基于SSM的家庭理财管理系统,高质量毕业论文范例-可直接参考使用,附源码和数据库脚本,论文撰写视频教程

    目录 1.项目技术栈 2.适合对象 3.适合课题 4.项目功能概述 4.1功能列表 4.2 功能详情 5.高质量论文范例 6. 毕业设计撰写视频教程 7. 部分运行截图 1.项目技术栈 前端必学三个基 ...

  6. 基于android的家庭理财管理系统,毕业设计(论文)-基于Android的家庭理财系统设计与实现.doc...

    全套设计加扣 3012250582 PAGE \* MERGEFORMAT 2 PAGE \* MERGEFORMAT 2 摘要 本论文展示了一个面向对象.方便快捷.安全性强的家庭理财系统.本家庭理财 ...

  7. Springboot毕设项目基于SpringBoot的房源管理系统lyh88(java+VUE+Mybatis+Maven+Mysql)

    Springboot毕设项目基于SpringBoot的房源管理系统lyh88(java+VUE+Mybatis+Maven+Mysql) 项目运行 环境配置: Jdk1.8 + Tomcat8.5 + ...

  8. 基于java的家庭理财管理系统的设计与实现

    基于java的家庭理财管理系统的设计与实现 源码获取:https://www.bilibili.com/video/BV1Ne4y1g7dC/ 家庭理财管理系统是为满足当代个人理财管理需要而开发的一个 ...

  9. springboot+jsp家庭理财管理系统

    本论文对家庭理财管理系统的发展背景进行详细的介绍,并且对系统开发技术进行介绍,然后对系统进行需求分析,对家庭理财管理系统业务流程.系统结构以及数据都进行详细说明. 1.系统功能完整性:根据系统每一个功 ...

最新文章

  1. Redis最佳实践:7个维度+43条使用规范,带你彻底玩转Redis | 附实践清单
  2. C++预编译头文件 bits/stdc++.h
  3. python exec函数_Python3 exec 函数
  4. 常见电子元件实物照片
  5. AVL树C++实现(插入,删除,查找,清空,遍历操作)
  6. [转]div里table居中的问题 Div与body顶部间隙
  7. 一文读懂熔断器和重试机制
  8. 用python读取股票价格_使用Python写一个量化股票提醒系统
  9. FreeSurfer Tutorial Datasets训练数据配置
  10. Linux文件系统变成只读的解决方法
  11. 在生产中使用Istio,我们学到了什么?
  12. php+对象和数组装备_php对象和数组有什么区别
  13. Chrome历史版本查看
  14. error LNK2005: 已经在*.obj中定义
  15. JavaScript(JS) date.getDay()
  16. 【强化学习】优势演员-评论员算法(Advantage Actor-Critic , A2C)求解倒立摆问题 + Pytorch代码实战
  17. matlab图像处理 识别颜色,MATLAB图像处理_直接操作像素点进行颜色变换
  18. h5画三角形_H5如何在网页中绘制三角形,值得一看
  19. 微信小程序3D轮播图实现
  20. 1602字符液晶显示

热门文章

  1. Yann LeCun对于AI的最新见解 | 深度学习现存的各类疑问,你是否想知道答案?
  2. python截图代码讲解_Python为PPT文件进行截图操作的代码详解
  3. php 截图ppt文件,PPT转图片你还在靠截图?一键即可导出,这个方法太逆天了吧...
  4. php单元格,PHP中的单元格怎么利用PhpSpreadsheet进行设置
  5. 【XMind】用A4纸打印超长思维导图的方法!(超简单,不用转换!)
  6. 眼科疾病可视化分析报告/Pycharm爬虫/数据处理/csv/plt画图
  7. 解决ubuntu下不能播放wmv等格式视频的方法
  8. 控制台五子棋--学习笔记
  9. 《黑客与画家》 读书笔记(二)
  10. 日语蔬菜水果相关词汇(3)