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





基于javaweb的SpringBoot在线服装销售商城系统(java+springboot+maven+vue+mysql)
一、项目运行 环境配置:
Jdk1.8 + Mysql + HBuilderX(Webstorm也行)+ Eclispe(IntelliJ IDEA,Eclispe,MyEclispe,Sts都支持)。
项目技术:
Spring + SpringBoot+ mybatis + Maven + Vue 等等组成,B/S模式 + Maven管理等等。
——————————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
| * @methodDesc: 用户对某商品的评价 * @Param: appraise,orderListId,userId * @return: Result<> */ @ApiOperation(value = "添加评论", notes = "用户端-当订单查询到为待评论状态,点击待评论跳转到评论页面(携带该商品的订单列表信息),在评论页面提交评论,把评论和订单列表id传到后端,添加评论") @PutMapping("/orders_appraise/{orderListId}") public Result<Object> ordersAppraise(@PathVariable int orderListId, @RequestBody AppraiseVo appraiseVo){ ordersService.goodsAppraise(orderListId,appraiseVo.getAppraise()); return Result.success(null); }
@ApiOperation(value = "查询所有订单", notes = "管理员端-获取用户下的所有订单") @GetMapping("/orders_show_all") public Result<List<Orders>> ordersShowAll(){ return Result.success(ordersService.ordersShowAll()); }
@PutMapping("/orders_log") @ApiOperation(value = "修改订单状态,记录日志", notes = "管理员端-管理员通过orderId修改订单状态,记录日志") public Result<Object> ordersLog(@RequestBody ChangeStateVo changeStateVo){ ordersService.ordersLog(changeStateVo); return Result.success(null); }
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
| if (result == null) { return Result.error(CodeMsg.NOT_YET_LOGIN); } ManagerVo managerVo = managerService.managerShow(managerId); return Result.success(managerVo); }
@PostMapping("/edit") public Result<Object> editGoods(@RequestBody GoodsSizeDto goodsSizeDto){ managerService.editGoods(goodsSizeDto); return Result.success(null); } } package tech.yxing.clothing.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
| @GetMapping("/get_edit/{goodsId}") public Result<GoodsSizeDto> getGoodsAndSize(@PathVariable int goodsId){ return Result.success(goodsService.getGoodsAndSize(goodsId)); }
@GetMapping("/wxin") public void testWechat(HttpServletRequest request, HttpServletResponse response) { System.out.println("get"); } } package tech.yxing.clothing.controller;
@Api(tags = "用户端-购物车服务接口列表") @RestController @RequestMapping("cart") public class CartController {
private static final Logger logger = LoggerFactory.getLogger(CartController.class);
|
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
| package tech.yxing.clothing.controller;
@Api(tags = "用户端-主页服务接口列表") @RestController @RequestMapping("/home") public class HomeController {
private static final Logger logger = LoggerFactory.getLogger(HomeController.class);
@Autowired private HomeService homeService;
@ApiOperation(value = "搜索商品", notes = "用户端-查询商品") @GetMapping("/search/{keyWord}") public Result<List<Goods>> search(@PathVariable String keyWord){ return Result.success(homeService.search(keyWord)); }
@ApiOperation(value = "上传轮播图", notes = "管理员端-管理员上传轮播图") @PostMapping("/rotation_upload") public Result<String> rotationImgUpload(@RequestParam("imge") MultipartFile picture) throws Exception { String pictureUrl = homeService.rotationImgUpload(picture); return Result.success(pictureUrl);
|
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
| */ @ApiOperation(value = "查询某状态订单", notes = "用户端-查询某订单状态的订单") @GetMapping("/get_state") public Result<List<AllOrdersDto>> getStateOrder(int state,int userId){ return Result.success(ordersService.getStateOrder(state,userId)); }
@ApiOperation(value = "修改订单状态2-->3", notes = "用户端-用户确认订单") @PutMapping("/confirm_goods/{orderId}") public Result<Object> confirmGoods(@PathVariable int orderId){ ordersService.confirmGoods(orderId); return Result.success(null); }
|
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
| return Result.success(ordersService.ordersSubmit(ordersListVo)); }
@ApiOperation(value = "用户支付", notes = "用户端-提交订单后根据订单id,查询该订单的价钱,完成支付,在order_log中记录支付时间提示支付成功,返回首页") @PutMapping("/order_pay/{orderId}") public Result<Object> ordersPay(@PathVariable int orderId){ ordersService.ordersPay(orderId); return Result.success(null); }
@ApiOperation(value = "查询所有订单", notes = "用户端-用户id查询所有订单") @GetMapping("/orders_show/{userId}") public Result<List<Orders>> ordersShow(@PathVariable int userId){ return Result.success(ordersService.ordersShow(userId)); }
@ApiOperation(value = "查询某状态订单", notes = "用户端-查询某订单状态的订单") @GetMapping("/orders_state") public Result<List<OrdersAndListGoodsDto>> ordersState(int state, int userId){ return Result.success(ordersService.ordersState(state,userId)); }
@ApiOperation(value = "添加评论", notes = "用户端-当订单查询到为待评论状态,点击待评论跳转到评论页面(携带该商品的订单列表信息),在评论页面提交评论,把评论和订单列表id传到后端,添加评论") @PutMapping("/orders_appraise/{orderListId}") public Result<Object> ordersAppraise(@PathVariable int orderListId, @RequestBody AppraiseVo appraiseVo){ ordersService.goodsAppraise(orderListId,appraiseVo.getAppraise()); return Result.success(null); }
|
——————————PayStart——————————
项目链接:
https://javayms.github.io?id=581222052008200vz
https://javayms.pages.dev?id=581222052008200vz