采用技术
基于SpringBoot+VUE的后台资金管理系统的设计与实现~
开发语言:Java
数据库:MySQL
技术:SpringBoot+MyBatis
工具:IDEA/Ecilpse、Navicat、Maven
页面展示效果
员工首页
采购申请
商品添加
数据查询
管理员首页
采购申请
数据查询
系统管理
项目背景
- 如今信息化社会的不断发展,让更多的,注重人们的工作效率的提高,在工作的同时,也越来越注重在以后的工作中的服务便利性,拥有良好的管理手段,能够让用户在很大的程度上体验生活。在信息化技术的不断发展的今天,电子商务也成为了人们生活中的一项重要的技能,通过电子商务,可以在线购物,也能够在线选择一些想要的东西进行购买。同时后台资金行业的发展,也是电子商务第一个分支,本题目就是一款基于电子商务发展到今天的产物。
- 本题目的选择,就是基于当今电子商务发展趋势的一个重要的研究历程,也大大带动了人们在后台资金行业的游刃有余,让在系统上就能选择了解后台资金的详细情况,并且能够实现员工的的管理。随着计算机信息技术应用于开发,开发的需求越来越高,使用用户逐渐增多,那么开发的系统的安全性和性能也逐渐被设计到开发条件里面,使系统开发技术全面缓缓走向稳定成熟阶段。Web系统页开发技术缓慢走向成熟,而且Java不仅开发静态系统页,而且可以开发动态系统页,它不仅有扩充性、可移植性、高维护性等多种系统页的优势,使提前查询相关成为一种可能,提前了解做出计划,这种方式必将成为一种趋势。
研究意义
- 以前后台资金的管都是纯粹的人工管理,手工记录资金存储情况,手工记录工人个人信息情况,这样管理模式落后,反应迟缓等多种劣势,通过建立后台资金管理系统可以查到自己想要的后台资金信息,选择更加适合自己的方式是高效自己创造的趋势。虽然现在的后台资金管理系统很多,但是系统页也是开发的不同,他们创新性、特点性等页面设计混乱,设计不容易被用户使用,人机交互性比较差,所以我针对上面的问题设计一个个性化的后台资金管理系统后台资金攻略系统,就是为了满足用户简单舒适方便快捷、内容包括全面、可以给用户带来个性化视觉感受的后台资金系统。
- 根据用户需求,本系统主要是顺应系统络的发展及条件符和时代的发展要求,在符和需求的前提下开发,完成用户对后台资金信息的了解和查询后台资金信息完成了当前的目标。同时根据自己资料的填写修改,系统可以提高对用户的监督并对其需求进行管理后台资金。可以对后台资金信息完成添加、修改、删除等操作,并根据自己数据库中的信息直观看到用户信息查有关一种后台资金的基本情况,真正的实现用户的消费方便性,也方便工作人员的工作量。
源码示例
Service
public class LoginServiceImpl implements LoginService {@Autowiredprivate LoginDao loginDao;@Autowiredprivate PermissionService permissionService;/*** 登录表单提交*/@Overridepublic JSONObject authLogin(JSONObject jsonObject) {String username = jsonObject.getString("username");String password = jsonObject.getString("password");JSONObject info = new JSONObject();Subject currentUser = SecurityUtils.getSubject();UsernamePasswordToken token = new UsernamePasswordToken(username, password);try {currentUser.login(token);info.put("result", "success");} catch (AuthenticationException e) {info.put("result", "fail");}return CommonUtil.successJson(info);}/*** 根据用户名和密码查询对应的用户*/@Overridepublic JSONObject getUser(String username, String password) {return loginDao.getUser(username, password);}/*** 查询当前登录用户的权限等信息*/@Overridepublic JSONObject getInfo() {//从session获取用户信息Session session = SecurityUtils.getSubject().getSession();JSONObject userInfo = (JSONObject) session.getAttribute(Constants.SESSION_USER_INFO);String username = userInfo.getString("username");JSONObject info = new JSONObject();JSONObject userPermission = permissionService.getUserPermission(username);session.setAttribute(Constants.SESSION_USER_PERMISSION, userPermission);info.put("userPermission", userPermission);return CommonUtil.successJson(info);}/*** 退出登录*/@Overridepublic JSONObject logout() {try {Subject currentUser = SecurityUtils.getSubject();currentUser.logout();} catch (Exception e) {}return CommonUtil.successJson();}
}
public class UserRealm extends AuthorizingRealm {private Logger logger = LoggerFactory.getLogger(UserRealm.class);@Autowiredprivate LoginService loginService;@Override@SuppressWarnings("unchecked")protected AuthorizationInfo doGetAuthorizationInfo(PrincipalCollection principals) {Session session = SecurityUtils.getSubject().getSession();//查询用户的权限JSONObject permission = (JSONObject) session.getAttribute(Constants.SESSION_USER_PERMISSION);logger.info("permission的值为:" + permission);logger.info("本用户权限为:" + permission.get("permissionList"));//为当前用户设置角色和权限SimpleAuthorizationInfo authorizationInfo = new SimpleAuthorizationInfo();authorizationInfo.addStringPermissions((Collection<String>) permission.get("permissionList"));return authorizationInfo;}/*** 验证当前登录的Subject* LoginController.login()方法中执行Subject.login()时 执行此方法*/@Overrideprotected AuthenticationInfo doGetAuthenticationInfo(AuthenticationToken authcToken) throws AuthenticationException {String loginName = (String) authcToken.getPrincipal();// 获取用户密码String password = new String((char[]) authcToken.getCredentials());JSONObject user = loginService.getUser(loginName, password);if (user == null) {//没找到帐号throw new UnknownAccountException();}//交给AuthenticatingRealm使用CredentialsMatcher进行密码匹配,如果觉得人家的不好可以自定义实现SimpleAuthenticationInfo authenticationInfo = new SimpleAuthenticationInfo(user.getString("username"),user.getString("password"),//ByteSource.Util.bytes("salt"), salt=username+salt,采用明文访问时,不需要此句getName());//session中不需要保存密码user.remove("password");//将用户信息放入session中SecurityUtils.getSubject().getSession().setAttribute(Constants.SESSION_USER_INFO, user);return authenticationInfo;}
}
数据库模型设计
JAVA毕设帮助,指导,源码分享,调试部署