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






基于javaweb的SSM+Maven购物商城管理系统(java+vue+elementui+ssm+mysql)
项目介绍
角色:管理员、用户
网上购物商城包括管理员: 首页、个人中心、用户管理、关于我们管理、商品信息管理、商品类型管理、 新闻类别管理、举报投诉管理、订单信息管理、售后管理、新闻信息管理、我的收藏管理、留言板管理、 交流论坛、系统管理,用户:首页、个人中心、举报投诉管理、订单信息管理、售后管理、我的收藏管理等功能。
环境需要
1.运行环境:最好是java jdk 1.8,我们在这个平台上运行的。其他版本理论上也可以。 2.IDE环境:IDEA,Eclipse,Myeclipse都可以。推荐IDEA; 3.tomcat环境:Tomcat 7.x,8.x,9.x版本均可 4.硬件环境:windows 7/8/10 1G内存以上;或者 Mac OS; 5.是否Maven项目: 否;查看源码目录中是否包含pom.xml;若包含,则为maven项目,否则为非maven项目; 6.数据库:MySql 5.7/8.0等版本均可;
技术栈
后端:SSM(Spring+SpringMVC+Mybatis) 前端:Vue+elementui
使用说明
- 使用Navicat或者其它工具,在mysql中创建对应名称的数据库,并导入项目的sql文件; 2. 使用IDEA/Eclipse/MyEclipse导入项目,修改配置,运行项目; 3. 将项目中db.xml配置文件中的数据库配置改为自己的配置,然后运行;
——————————CodeStart——————————
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
| } params.put("sort", "clicknum"); params.put("order", "desc"); PageUtils page = shangpinxinxiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, shangpinxinxi), params), params)); return R.ok().put("data", page); }
} package com.controller;
|
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
| } } return R.ok().put("data", result); }
@IgnoreAuth @RequestMapping("/value/{tableName}/{xColumnName}/{yColumnName}") public R value(@PathVariable("tableName") String tableName, @PathVariable("yColumnName") String yColumnName, @PathVariable("xColumnName") String xColumnName) { Map<String, Object> params = new HashMap<String, Object>(); params.put("table", tableName); params.put("xColumn", xColumnName); params.put("yColumn", yColumnName); List<Map<String, Object>> result = commonService.selectValue(params); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); for(Map<String, Object> m : result) { for(String k : m.keySet()) { if(m.get(k) instanceof Date) { m.put(k, sdf.format((Date)m.get(k))); } } } return R.ok().put("data", result); } } package com.controller;
|
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("/save") public R save(@RequestBody DiscussshangpinxinxiEntity discussshangpinxinxi, HttpServletRequest request){ discussshangpinxinxi.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
discussshangpinxinxiService.insert(discussshangpinxinxi); return R.ok(); }
@RequestMapping("/add") public R add(@RequestBody DiscussshangpinxinxiEntity discussshangpinxinxi, HttpServletRequest request){ discussshangpinxinxi.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
discussshangpinxinxiService.insert(discussshangpinxinxi); return R.ok(); }
@RequestMapping("/update") public R update(@RequestBody DiscussshangpinxinxiEntity discussshangpinxinxi, HttpServletRequest request){ discussshangpinxinxiService.updateById(discussshangpinxinxi); return R.ok(); }
@RequestMapping("/delete") public R delete(@RequestBody Long[] ids){ discussshangpinxinxiService.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);
|
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
|
@RestController @RequestMapping("/chat") public class ChatController { @Autowired private ChatService chatService;
@RequestMapping("/page") public R page(@RequestParam Map<String, Object> params,ChatEntity chat, HttpServletRequest request){ if(!request.getSession().getAttribute("role").toString().equals("管理员")) { chat.setUserid((Long)request.getSession().getAttribute("userId")); }
EntityWrapper<ChatEntity> ew = new EntityWrapper<ChatEntity>(); PageUtils page = chatService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, chat), params), params)); return R.ok().put("data", page); }
@RequestMapping("/list") public R list(@RequestParam Map<String, Object> params,ChatEntity chat, HttpServletRequest request){ if(!request.getSession().getAttribute("role").toString().equals("管理员")) { chat.setUserid((Long)request.getSession().getAttribute("userId")); }
EntityWrapper<ChatEntity> ew = new EntityWrapper<ChatEntity>(); PageUtils page = chatService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, chat), params), params)); return R.ok().put("data", page); }
@RequestMapping("/lists")
|
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
| * @email */ @RestController @RequestMapping("/dingdanxinxi") public class DingdanxinxiController { @Autowired private DingdanxinxiService dingdanxinxiService;
@RequestMapping("/page") public R page(@RequestParam Map<String, Object> params,DingdanxinxiEntity dingdanxinxi, HttpServletRequest request){
String tableName = request.getSession().getAttribute("tableName").toString(); if(tableName.equals("yonghu")) { dingdanxinxi.setZhanghao((String)request.getSession().getAttribute("username")); } EntityWrapper<DingdanxinxiEntity> ew = new EntityWrapper<DingdanxinxiEntity>(); PageUtils page = dingdanxinxiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, dingdanxinxi), params), params)); return R.ok().put("data", page); }
@RequestMapping("/list") public R list(@RequestParam Map<String, Object> params,DingdanxinxiEntity dingdanxinxi, HttpServletRequest request){ EntityWrapper<DingdanxinxiEntity> ew = new EntityWrapper<DingdanxinxiEntity>(); PageUtils page = dingdanxinxiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, dingdanxinxi), params), params)); return R.ok().put("data", page); }
@RequestMapping("/lists") public R list( DingdanxinxiEntity dingdanxinxi){ EntityWrapper<DingdanxinxiEntity> ew = new EntityWrapper<DingdanxinxiEntity>(); ew.allEq(MPUtil.allEQMapPre( dingdanxinxi, "dingdanxinxi")); return R.ok().put("data", dingdanxinxiService.selectListView(ew)); }
@RequestMapping("/query") public R query(DingdanxinxiEntity dingdanxinxi){
|
——————————PayStart——————————
项目链接:
https://javayms.github.io?id=351023292204201aa
https://javayms.pages.dev?id=351023292204201aa