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










基于javaweb的SSM+Maven运动健身APP(java+ssm+mysql+vue+app)
/ssm58zlt
后端端口设置为:8080(前端指定)
先启动后端,再启动APP端
后台管理员:
http://localhost:8080/ssm58zlt/admin/dist/index.html
admin 123456
APP用户:
用户1 123456
用户2 123456
用户3 123456
用户4 123456
用户5 123456
用户6 123456
——————————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
|
@RequestMapping("/detail/{id}") public R detail(@PathVariable("id") Long id){ JianshenqicaiEntity jianshenqicai = jianshenqicaiService.selectById(id); return R.ok().put("data", jianshenqicai); }
@RequestMapping("/save") public R save(@RequestBody JianshenqicaiEntity jianshenqicai, HttpServletRequest request){ jianshenqicai.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
jianshenqicaiService.insert(jianshenqicai); return R.ok(); }
@RequestMapping("/add") public R add(@RequestBody JianshenqicaiEntity jianshenqicai, HttpServletRequest request){ jianshenqicai.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
jianshenqicaiService.insert(jianshenqicai); return R.ok(); }
@RequestMapping("/update") public R update(@RequestBody JianshenqicaiEntity jianshenqicai, 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
| * 后端详情 */ @RequestMapping("/info/{id}") public R info(@PathVariable("id") Long id){ ChatEntity chat = chatService.selectById(id); return R.ok().put("data", chat); }
@RequestMapping("/detail/{id}") public R detail(@PathVariable("id") Long id){ ChatEntity chat = chatService.selectById(id); return R.ok().put("data", chat); }
@RequestMapping("/save") public R save(@RequestBody ChatEntity chat, HttpServletRequest request){ chat.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue()); if(StringUtils.isNotBlank(chat.getAsk())) { chatService.updateForSet("isreply=0", new EntityWrapper<ChatEntity>().eq("userid", request.getSession().getAttribute("userId"))); chat.setUserid((Long)request.getSession().getAttribute("userId")); chat.setIsreply(1); } if(StringUtils.isNotBlank(chat.getReply())) { chatService.updateForSet("isreply=0", new EntityWrapper<ChatEntity>().eq("userid", chat.getUserid())); chat.setAdminid((Long)request.getSession().getAttribute("userId")); }
chatService.insert(chat); 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
| 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(); map.put("remindend", sdf.format(remindEndDate)); } } Wrapper<YonghuEntity> wrapper = new EntityWrapper<YonghuEntity>(); if(map.get("remindstart")!=null) { wrapper.ge(columnName, map.get("remindstart")); } if(map.get("remindend")!=null) { wrapper.le(columnName, map.get("remindend")); }
int count = yonghuService.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
|
@RestController @RequestMapping("/jiankangshuju") public class JiankangshujuController { @Autowired private JiankangshujuService jiankangshujuService;
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
|
}
@RestController @RequestMapping("/jiankangshuju") public class JiankangshujuController { @Autowired private JiankangshujuService jiankangshujuService;
|
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
| */ @RestController @RequestMapping("/discussyundongxiaozhishi") public class DiscussyundongxiaozhishiController { @Autowired private DiscussyundongxiaozhishiService discussyundongxiaozhishiService;
@RequestMapping("/page") public R page(@RequestParam Map<String, Object> params,DiscussyundongxiaozhishiEntity discussyundongxiaozhishi, HttpServletRequest request){
EntityWrapper<DiscussyundongxiaozhishiEntity> ew = new EntityWrapper<DiscussyundongxiaozhishiEntity>(); PageUtils page = discussyundongxiaozhishiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, discussyundongxiaozhishi), params), params)); return R.ok().put("data", page); }
@IgnoreAuth @RequestMapping("/list") public R list(@RequestParam Map<String, Object> params,DiscussyundongxiaozhishiEntity discussyundongxiaozhishi, HttpServletRequest request){ EntityWrapper<DiscussyundongxiaozhishiEntity> ew = new EntityWrapper<DiscussyundongxiaozhishiEntity>(); PageUtils page = discussyundongxiaozhishiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, discussyundongxiaozhishi), params), params)); return R.ok().put("data", page); }
@RequestMapping("/lists") public R list( DiscussyundongxiaozhishiEntity discussyundongxiaozhishi){ EntityWrapper<DiscussyundongxiaozhishiEntity> ew = new EntityWrapper<DiscussyundongxiaozhishiEntity>(); ew.allEq(MPUtil.allEQMapPre( discussyundongxiaozhishi, "discussyundongxiaozhishi")); return R.ok().put("data", discussyundongxiaozhishiService.selectListView(ew)); }
@RequestMapping("/query") public R query(DiscussyundongxiaozhishiEntity discussyundongxiaozhishi){ EntityWrapper< DiscussyundongxiaozhishiEntity> ew = new EntityWrapper< DiscussyundongxiaozhishiEntity>(); ew.allEq(MPUtil.allEQMapPre( discussyundongxiaozhishi, "discussyundongxiaozhishi")); DiscussyundongxiaozhishiView discussyundongxiaozhishiView = discussyundongxiaozhishiService.selectView(ew);
|
——————————PayStart——————————
项目链接:
https://javayms.github.io?id=341823120309201dq
https://javayms.pages.dev?id=341823120309201dq