基于javaweb的SpringBoot在线服装销售商城系统(java+springboot+maven+vue+mysql)

运行环境

Java≥8、MySQL≥5.7、Node.js≥14

开发工具

后端:eclipse/idea/myeclipse/sts等均可配置运行
前端:WebStorm/VSCode/HBuilderX等均可

❗没学过node.js的不要搞前后端分离项目

适用

课程设计,大作业,毕业设计,项目练习,学习演示等

功能说明

230123072402

240123072402

250123072402

260123072402

280123072402

基于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管理等等。  

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);
}

/**
* @methodDesc: 管理员查询所有订单
* @Param:
* @return: Result<List<Orders>>
*/
@ApiOperation(value = "查询所有订单", notes = "管理员端-获取用户下的所有订单")
@GetMapping("/orders_show_all")
public Result<List<Orders>> ordersShowAll(){
return Result.success(ordersService.ordersShowAll());
}

/**
* @methodDesc: 管理员修改订单状态,记录日志
* @Param: orderId,managerId
* @return: Result<>
*/
@PutMapping("/orders_log")
@ApiOperation(value = "修改订单状态,记录日志", notes = "管理员端-管理员通过orderId修改订单状态,记录日志")
public Result<Object> ordersLog(@RequestBody ChangeStateVo changeStateVo){
ordersService.ordersLog(changeStateVo);
return Result.success(null);
}
/**
* @methodDesc: 获取评论
* @Param: goodsId
* @return: Result<String>
*/
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
        if (result == null) {
//为null返回错误信息和登录url
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;
/**
* @Param: keyWord
* @Date
*/
@ApiOperation(value = "搜索商品", notes = "用户端-查询商品")
@GetMapping("/search/{keyWord}")
public Result<List<Goods>> search(@PathVariable String keyWord){
return Result.success(homeService.search(keyWord));
}

/**
* @methodDesc: 管理员上传轮播图1:上传图片
* @Param: MultipartFile
* @Date
*/
@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));
}

/**
* @methodDesc: 确认收货
* @Param: orderId
* @return: Result<>
*/
@ApiOperation(value = "修改订单状态2-->3", notes = "用户端-用户确认订单")
@PutMapping("/confirm_goods/{orderId}")
public Result<Object> confirmGoods(@PathVariable int orderId){
ordersService.confirmGoods(orderId);
return Result.success(null);
}

// @PostMapping("/mq")
// public Result<String> mq(){
// mqSender.send("hello,imooc");
// return Result.success("Hello , world");
// }
//
// @PostMapping("/mq/topic")
// public Result<String> topic(){
// mqSender.sendTopic("hello,imooc");
// return Result.success("Hello , world");
// }
//
// @PostMapping("/mq/fanout")
// public Result<String> fanout(){
// mqSender.sendFanout("hello,imooc");
// return Result.success("Hello , world");
// }
//
// @PostMapping("/mq/header")
// public Result<String> header(){
// mqSender.sendHeader("hello,imooc");
// return Result.success("Hello , world");
// }
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
    //result不为null继续操作
return Result.success(ordersService.ordersSubmit(ordersListVo));
}

/**
* @methodDesc: 用户支付
* @Param: orderId
* @return: Result<Object>
*/
@ApiOperation(value = "用户支付", notes = "用户端-提交订单后根据订单id,查询该订单的价钱,完成支付,在order_log中记录支付时间提示支付成功,返回首页")
@PutMapping("/order_pay/{orderId}")
public Result<Object> ordersPay(@PathVariable int orderId){
ordersService.ordersPay(orderId);
return Result.success(null);
}

/**
* @methodDesc: 查询所有订单
* @Param: userId
* @return: Result<>
*/
@ApiOperation(value = "查询所有订单", notes = "用户端-用户id查询所有订单")
@GetMapping("/orders_show/{userId}")
public Result<List<Orders>> ordersShow(@PathVariable int userId){
return Result.success(ordersService.ordersShow(userId));
}

/**
* @methodDesc: 查询某订单状态的订单
* @Param: state,userId
* @return: Result<List<Orders>>
*/
@ApiOperation(value = "查询某状态订单", notes = "用户端-查询某订单状态的订单")
@GetMapping("/orders_state")
public Result<List<OrdersAndListGoodsDto>> ordersState(int state, int userId){
return Result.success(ordersService.ordersState(state,userId));
}

/**
* @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);
}


项目链接:
https://javayms.github.io?id=581222052008200vz
https://javayms.pages.dev?id=581222052008200vz