——————————DescriptionStart——————————
运行环境
Java≥8、MySQL≥5.7、Node.js≥14
开发工具
后端:eclipse/idea/myeclipse/sts等均可配置运行
前端:WebStorm/VSCode/HBuilderX等均可
❗没学过node.js的不要搞前后端分离项目
适用
课程设计,大作业,毕业设计,项目练习,学习演示等
功能说明










基于javaweb的SpringBoot学生宿舍信息系统(java+springboot+maven+mybaits+vue+elementui+mysql)
技术栈
后端:SpringBoot+Mybaits
前端:Vue + elementui
管理员:
admin 123456
学生:
学生1 123456
学生2 123456
学生3 123456
学生4 123456
学生5 123456
学生6 123456
维修人员:
维修人员1 123456
维修人员2 123456
维修人员3 123456
维修人员4 123456
维修人员5 123456
维修人员6 123456
商家:
商家1 123456
商家2 123456
商家3 123456
商家4 123456
商家5 123456
商家6 123456
后端启动类:StartApplication
前端启动命令:npm run serve
——————————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
|
@RestController @RequestMapping("/tongzhuangshuiyuding") public class TongzhuangshuiyudingController { @Autowired private TongzhuangshuiyudingService tongzhuangshuiyudingService;
@RequestMapping("/page") public R page(@RequestParam Map<String, Object> params,TongzhuangshuiyudingEntity tongzhuangshuiyuding, HttpServletRequest request){ String tableName = request.getSession().getAttribute("tableName").toString(); if(tableName.equals("xuesheng")) { tongzhuangshuiyuding.setXuehao((String)request.getSession().getAttribute("username")); } if(tableName.equals("shangjia")) { tongzhuangshuiyuding.setShangjiazhanghao((String)request.getSession().getAttribute("username")); } EntityWrapper<TongzhuangshuiyudingEntity> ew = new EntityWrapper<TongzhuangshuiyudingEntity>(); PageUtils page = tongzhuangshuiyudingService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, tongzhuangshuiyuding), params), params));
return R.ok().put("data", page); }
|
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
| } if(map.get("remindend")!=null) { Integer remindEnd = Integer.parseInt(map.get("remindend").toString()); c.setTime(new Date()); c.add(Calendar.DAY_OF_MONTH,remindEnd); remindEndDate = c.getTime(); map.put("remindend", sdf.format(remindEndDate)); } } Wrapper<ShangjiaEntity> wrapper = new EntityWrapper<ShangjiaEntity>(); if(map.get("remindstart")!=null) { wrapper.ge(columnName, map.get("remindstart")); } if(map.get("remindend")!=null) { wrapper.le(columnName, map.get("remindend")); }
int count = shangjiaService.selectCount(wrapper); return R.ok().put("count", count); }
}
|
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
|
@RestController @RequestMapping("/weishengjiancha") public class WeishengjianchaController { @Autowired private WeishengjianchaService weishengjianchaService;
@RequestMapping("/page") public R page(@RequestParam Map<String, Object> params,WeishengjianchaEntity weishengjiancha, HttpServletRequest request){ String tableName = request.getSession().getAttribute("tableName").toString(); if(tableName.equals("xuesheng")) { weishengjiancha.setXuehao((String)request.getSession().getAttribute("username"));
|
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
|
@RestController @RequestMapping("/xuesheng") public class XueshengController { @Autowired private XueshengService xueshengService; @Autowired private TokenService tokenService;
@IgnoreAuth @RequestMapping(value = "/login") public R login(String username, String password, String captcha, HttpServletRequest request) {
|
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
|
@RestController @RequestMapping("/weixiurenyuan") public class WeixiurenyuanController { @Autowired private WeixiurenyuanService weixiurenyuanService; @Autowired private TokenService tokenService;
@IgnoreAuth @RequestMapping(value = "/login") public R login(String username, String password, String captcha, HttpServletRequest request) { WeixiurenyuanEntity user = weixiurenyuanService.selectOne(new EntityWrapper<WeixiurenyuanEntity>().eq("weixiugonghao", username)); if(user==null || !user.getMima().equals(password)) { return R.error("账号或密码不正确"); } String token = tokenService.generateToken(user.getId(), username,"weixiurenyuan", "维修人员" ); return R.ok().put("token", token); }
|
——————————PayStart——————————
项目链接:
https://javayms.github.io?id=202325042508201tj
https://javayms.pages.dev?id=202325042508201tj