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








基于javaweb的SpringBoot火锅文化网站论坛系统(java+springboot+maven+vue+elementui+mysql)
/ForumSystem
管理员:
admin 123456
用户:
用户名1 123456
用户名2 123456
用户名3 123456
用户名4 123456
用户名5 123456
用户名6 123456
用户名7 123456
用户名8 123456
ForumSystem-backend,后端,启动类:StartApplication
ForumSystem-frontend-admin:前端管理员端,启动命令:npm run serve
ForumSystem-frontend-user:前端用户端,启动命令: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 39 40 41 42 43 44 45
| public R query(DianzanxinxiEntity dianzanxinxi){ EntityWrapper< DianzanxinxiEntity> ew = new EntityWrapper< DianzanxinxiEntity>(); ew.allEq(MPUtil.allEQMapPre( dianzanxinxi, "dianzanxinxi")); DianzanxinxiView dianzanxinxiView = dianzanxinxiService.selectView(ew); return R.ok("查询点赞信息成功").put("data", dianzanxinxiView); }
@RequestMapping("/info/{id}") public R info(@PathVariable("id") Long id){ DianzanxinxiEntity dianzanxinxi = dianzanxinxiService.selectById(id); return R.ok().put("data", dianzanxinxi); }
@IgnoreAuth @RequestMapping("/detail/{id}") public R detail(@PathVariable("id") Long id){ DianzanxinxiEntity dianzanxinxi = dianzanxinxiService.selectById(id); return R.ok().put("data", dianzanxinxi); }
@RequestMapping("/save") public R save(@RequestBody DianzanxinxiEntity dianzanxinxi, HttpServletRequest request){ dianzanxinxi.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue()); dianzanxinxiService.insert(dianzanxinxi); return R.ok(); }
@RequestMapping("/add") public R add(@RequestBody DianzanxinxiEntity dianzanxinxi, 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 35 36 37 38 39 40 41 42 43 44
| */ @RequestMapping("/add") public R add(@RequestBody LipinduihuanEntity lipinduihuan, HttpServletRequest request){ lipinduihuan.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue()); lipinduihuanService.insert(lipinduihuan); return R.ok(); }
@RequestMapping("/update") @Transactional public R update(@RequestBody LipinduihuanEntity lipinduihuan, HttpServletRequest request){ lipinduihuanService.updateById(lipinduihuan); return R.ok(); }
@RequestMapping("/delete") public R delete(@RequestBody Long[] ids){ lipinduihuanService.deleteBatchIds(Arrays.asList(ids)); return R.ok(); }
@RequestMapping("/remind/{columnName}/{type}") public R remindCount(@PathVariable("columnName") String columnName, HttpServletRequest request, @PathVariable("type") String type,@RequestParam Map<String, Object> map) { map.put("column", columnName); map.put("type", type); if(type.equals("2")) {
|
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
| }
@PostMapping("/save") public R save(@RequestBody UsersEntity user){
if(userService.selectOne(new EntityWrapper<UsersEntity>().eq("username", user.getUsername())) !=null) { return R.error("用户已存在"); } userService.insert(user); return R.ok(); }
@RequestMapping("/update") public R update(@RequestBody UsersEntity user){
UsersEntity u = userService.selectOne(new EntityWrapper<UsersEntity>().eq("username", user.getUsername())); if(u!=null && u.getId()!=user.getId() && u.getUsername().equals(user.getUsername())) { return R.error("用户名已存在。"); } userService.updateById(user); return R.ok(); }
@RequestMapping("/delete") public R delete(@RequestBody Long[] ids){ userService.deleteBatchIds(Arrays.asList(ids)); return R.ok(); } }
|
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("/update") @Transactional public R update(@RequestBody YonghuEntity yonghu, HttpServletRequest request){ yonghuService.updateById(yonghu); return R.ok(); }
@RequestMapping("/delete") public R delete(@RequestBody Long[] ids){ yonghuService.deleteBatchIds(Arrays.asList(ids)); return R.ok(); }
@RequestMapping("/remind/{columnName}/{type}") public R remindCount(@PathVariable("columnName") String columnName, HttpServletRequest request, @PathVariable("type") String type,@RequestParam Map<String, Object> map) { map.put("column", columnName); map.put("type", type); if(type.equals("2")) { SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); Calendar c = Calendar.getInstance(); Date remindStartDate = null; Date remindEndDate = null; if(map.get("remindstart")!=null) { Integer remindStart = Integer.parseInt(map.get("remindstart").toString()); c.setTime(new Date()); c.add(Calendar.DAY_OF_MONTH,remindStart); remindStartDate = c.getTime(); map.put("remindstart", sdf.format(remindStartDate)); } 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();
|
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
| public R detail(@PathVariable("id") Long id){ NewsEntity news = newsService.selectById(id); return R.ok().put("data", news); }
@RequestMapping("/save") public R save(@RequestBody NewsEntity news, HttpServletRequest request){ news.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue()); newsService.insert(news); return R.ok(); }
@RequestMapping("/add") public R add(@RequestBody NewsEntity news, HttpServletRequest request){ news.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue()); newsService.insert(news); return R.ok(); }
@RequestMapping("/update") @Transactional public R update(@RequestBody NewsEntity news, HttpServletRequest request){ newsService.updateById(news); return R.ok(); }
@RequestMapping("/delete") public R delete(@RequestBody Long[] ids){ newsService.deleteBatchIds(Arrays.asList(ids));
|
——————————PayStart——————————
项目链接:
https://javayms.github.io?id=540925270706201qa
https://javayms.pages.dev?id=540925270706201qa