——————————DescriptionStart——————————
运行环境
Java≥8、MySQL≥5.7、Tomcat≥8
开发工具
eclipse/idea/myeclipse/sts等均可配置运行
适用
课程设计,大作业,毕业设计,项目练习,学习演示等
功能说明






1 2 3 4
| 登录: 老王 123456——家长(管理员) 大娃 123456 二娃 123456
|
基于javaweb的SSM+Maven家庭理财系统(java+ssm+jsp+tomcat+mysql)
一、项目简述
功能:家庭理财,财务分析,统计等等。
二、项目运行
运行环境:
jdk8+tomcat8+mysql+IntelliJ IDEA( Eclispe , MyEclispe ,Sts 都支持,代码与开发环境运行无关啦,只需要调整环境即可)
项目技术:SpringMVC + Spring + Mybatis + MySQL + Ajax + HTML + JavaScript + CSS + Jsp等等
——————————CodeStart——————————
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 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
| } @RequestMapping(value = {"/addGoal"}) public String SaveGoal() { return "savegoal"; }
@RequestMapping(value = {"/setgoal"}) @ResponseBody public SaveGoalStatus doSave(HttpSession session, @RequestBody Deposit goal){ int flag=saveGoalService.isRun(goal.getUid()); SaveGoalStatus sgs=new SaveGoalStatus(); if(flag==0){ saveGoalService.addSaveGoal(goal); sgs.setInfo("添加目标成功"); sgs.setCode(200); return sgs;
}else { sgs.setInfo("存在正在进行的目标,请先完成当前目标"); sgs.setCode(0); return sgs; }
}
@RequestMapping(value={"/getmembers"}) @ResponseBody public List<User> getMembers(HttpSession session,@RequestBody User user){ return saveGoalService.getAllUser(user.getUid()); }
@RequestMapping(value ={"/getAllGoal"}) @ResponseBody public GoalListStatus getAllGoal(HttpSession session,@RequestBody SaveGoalCombination saveGoalCombination){ GoalListStatus gls=new GoalListStatus(); List<Deposit> depositList=individualManagerService.getHistoryGoal(saveGoalCombination); gls.setData(depositList); gls.setCount(individualManagerService.getCountHistoryGoal(saveGoalCombination)); return gls; }
@RequestMapping(value = {"/getCurrentGoal"}) @ResponseBody public AccountAndDepositVo getCurrentGoal(HttpSession session,@RequestBody User user){ return individualManagerService.getIndividualState(user.getUid()); }
|
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 26 27 28 29
| msg.put("code", "500"); msg.put("msg", "error"); return objectMapper.writeValueAsString(msg); } } } package cn.edu.cuit.controller;
@Controller @RequestMapping("/savegoal") public class SaveGoalController { @Autowired private SaveGoalService saveGoalService; @Autowired private IndividualManagerService individualManagerService;
@RequestMapping(value = {"/page"}) public String toSaveGoal() { return "showgoal";
} @RequestMapping(value = {"/addGoal"}) public String SaveGoal() { return "savegoal"; }
|
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 26 27 28 29 30 31 32 33 34
| loginService.addUserAndFamily(userAndFamily); registerStatus.setInfo("登记家庭成功!"); registerStatus.setCode(200); return registerStatus; }
} package cn.edu.cuit.controller;
@Controller @RequestMapping("/accountType") public class AccountTypeController { @Autowired AccountTypeService accountTypeService;
@RequestMapping(value = {"/"}) public String LookAccountType() { return "accountTypeList"; } @RequestMapping(value = {"/list"}) @ResponseBody public AccountTypeListStatus ListAccountType( @RequestParam Integer page, @RequestParam Integer limit) { AccountTypeListStatus atls = new AccountTypeListStatus(); List<AccountType> accountTypes = (List<AccountType>) accountTypeService.getAccountType(page, limit); atls.setData(accountTypes); atls.setCount(accountTypeService.getAccountTypeCount()); return atls; }
|
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 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
| @RequestMapping(value = {"/userEdit"}) @ResponseBody public UserListStatus editUser(@RequestBody User user, HttpSession session) { UserListStatus rs = new UserListStatus(); userService.update(user); rs.setCode(200); rs.setMsg("添加成功!"); List<User> us = userService.list(user.getUid()); User newUser = us.get(0); newUser.setPassword(""); session.setAttribute("user", newUser); rs.setData(us); return rs; }
@RequestMapping(value = {"/userAdd"}) @ResponseBody public RegisterStatus addUser(@RequestBody User user) { RegisterStatus rs = new RegisterStatus(); if (userService.isExists(user.getName())) { rs.setCode(405); rs.setInfo("用户名已经存在!"); } else { userService.add(user); rs.setCode(200); rs.setInfo("添加成功!"); } return rs; }
|
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 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
| SaveGoalStatus sgs=new SaveGoalStatus(); if(flag==0){ saveGoalService.addSaveGoal(goal); sgs.setInfo("添加目标成功"); sgs.setCode(200); return sgs;
}else { sgs.setInfo("存在正在进行的目标,请先完成当前目标"); sgs.setCode(0); return sgs; }
}
@RequestMapping(value={"/getmembers"}) @ResponseBody public List<User> getMembers(HttpSession session,@RequestBody User user){ return saveGoalService.getAllUser(user.getUid()); }
@RequestMapping(value ={"/getAllGoal"}) @ResponseBody public GoalListStatus getAllGoal(HttpSession session,@RequestBody SaveGoalCombination saveGoalCombination){ GoalListStatus gls=new GoalListStatus(); List<Deposit> depositList=individualManagerService.getHistoryGoal(saveGoalCombination); gls.setData(depositList); gls.setCount(individualManagerService.getCountHistoryGoal(saveGoalCombination)); return gls; }
@RequestMapping(value = {"/getCurrentGoal"}) @ResponseBody public AccountAndDepositVo getCurrentGoal(HttpSession session,@RequestBody User user){ return individualManagerService.getIndividualState(user.getUid()); }
@RequestMapping(value = {"/cancelGoal"}) @ResponseBody public SaveGoalStatus ConcelGoal(HttpSession session,@RequestBody User user){ SaveGoalStatus sgs=new SaveGoalStatus(); individualManagerService.cancelGoal(user.getUid()); sgs.setInfo("取消目标成功"); sgs.setCode(200); return sgs; }
@RequestMapping(value = {"/finishGoal"}) @ResponseBody public SaveGoalStatus finishGoal(HttpSession session,@RequestBody User user){
|
——————————PayStart——————————
项目链接:
https://javayms.github.io?id=321422312105200il
https://javayms.pages.dev?id=321422312105200il