基于javaweb的SpringBoot网上商城系统(java+springboot+maven+vue+vuerouter+elementui+axios+mysql+redis)

运行环境

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

开发工具

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

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

适用

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

功能说明

001424140701

011424140701

021424140701

031424140701

581424130701

591424130701

基于javaweb的SpringBoot网上商城系统(java+springboot+maven+vue+vuerouter+elementui+axios+mysql+redis)

1
2
3
4
5
6
管理员
admin 123456

用户
user1 123456
user2 123456

项目介绍

角色:普通用户、管理员角色 整体功能包含用户登录注册,商品浏览,商品检索,添加商品,意见反馈,个人中心,地址管理,个人收藏管理,商品下单,订单管理,用户管理,统计图表,用户信息管理,地址管理,商品信息管理,商品分类管理,收藏商品管理,购物车管理,足迹管理,订单发货,退换货,订单处理等。

环境需要

1.运行环境:最好是java jdk 1.8,我们在这个平台上运行的。其他版本理论上也可以。 2.IDE环境:IDEA,Eclipse,Myeclipse都可以。推荐IDEA; 3.硬件环境:windows 7/8/10 1G内存以上;或者 Mac OS; 4.数据库:MySql 5.7/8.0版本均可; 5.是否Maven项目:是;

技术栈

后台:SpringBoot+Mybatis

前端:Vue+Vue Router+ELementUI+Axios

使用说明

项目运行: 1. 使用Navicat或者其它工具,在mysql中创建对应sql文件名称的数据库,并导入项目的sql文件; 2. 使用IDEA/Eclipse/MyEclipse导入项目,导入成功后请执行maven clean;maven install命令,然后运行; 3. 将项目中application.yml配置文件中的数据库配置改为自己的配置;

商城首页展示:

登录首页展示: 

商品详情信息展示: 

 订单详情展示:

后台模块展示:

后台统计信息展示:

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
    @GetMapping("/find/{productId}")
public Result<?> findProductId(@RequestParam(defaultValue = "1") Integer pageNum,
@RequestParam(defaultValue = "5") Integer pageSize,
@PathVariable Integer productId){
Page<Comment> page = commentMapper.selectPage(new Page<>(pageNum, pageSize), Wrappers.<Comment>lambdaQuery().eq(Comment::getProductId, productId));
return Result.success(page);
}


@GetMapping("/page")
public Result<?> findPage(@RequestParam(defaultValue = "1") Integer pageNum,
@RequestParam(defaultValue = "10") Integer pageSize,
@RequestParam(defaultValue = "") String search){
new Page<>(pageNum,pageSize);
Page<Comment> customerInfoPage = commentMapper.selectPage(new Page<>(pageNum, pageSize), Wrappers.<Comment>lambdaQuery().like(Comment::getCustomerName,search));
LambdaQueryWrapper<Comment> query = Wrappers.<Comment>lambdaQuery().orderByDesc(Comment::getCommentId);
if (StrUtil.isNotBlank(search)) {
query.like(Comment::getCustomerName, search);
}
return Result.success(customerInfoPage);
}

}








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


/**
* <p>
* 前端控制器
* </p>
*
*/
@RestController
@RequestMapping("/collection")
public class CollectionController {

@Resource
private CollectionMapper collectionMapper;

@GetMapping("/findAll")
public List<Collection> findAll(){
List<Collection> collections = collectionMapper.selectList(null);
return collections;
}

@DeleteMapping("/delete/{id}")
public Result<?> delete(@PathVariable("id") Integer id){
collectionMapper.deleteById(id);
return Result.success();
}

@GetMapping("/find/{id}")
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
 */
@RestController
@RequestMapping("/collection")
public class CollectionController {

@Resource
private CollectionMapper collectionMapper;

@GetMapping("/findAll")
public List<Collection> findAll(){
List<Collection> collections = collectionMapper.selectList(null);
return collections;
}

@DeleteMapping("/delete/{id}")
public Result<?> delete(@PathVariable("id") Integer id){
collectionMapper.deleteById(id);
return Result.success();
}

@GetMapping("/find/{id}")
public Collection find(@PathVariable("id") Integer id){
return this.collectionMapper.selectById(id);
}

@PutMapping("/update")
public Result<?> update(@RequestBody Collection collection){
collectionMapper.updateById(collection);
return Result.success();
}
@GetMapping("/finds/{customerId}")
public Result<?> findCustomerId(@RequestParam(defaultValue = "1") Integer pageNum,
@RequestParam(defaultValue = "5") Integer pageSize,
@PathVariable Integer customerId){
Page<Collection> page = collectionMapper.selectPage(new Page<>(pageNum, pageSize), Wrappers.<Collection>lambdaQuery().eq(Collection::getCustomerId, customerId));
return Result.success(page);
}

@PostMapping("/add")
public Result<?> insert(@RequestBody Collection collection){
collectionMapper.insert(collection);
return Result.success();
}

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
                                    @RequestParam(defaultValue = "1000") Integer pageSize,
@PathVariable Integer customerId){
Page<Good> page = goodMapper.selectPage(new Page<>(pageNum, pageSize), Wrappers.<Good>lambdaQuery().eq(Good::getCustomerId, customerId));
return Result.success(page);
}

@PutMapping("/update")
public Result<?> update(@RequestBody Good good){
goodMapper.updateById(good);
return Result.success();
}
@PostMapping("/add")
public Result<?> insert(@RequestBody Good good){
goodMapper.insert(good);
return Result.success();
}

@PostMapping("/deleteBatch")
public Result<?> deleteBatch(@RequestBody List<Integer> ids){
goodMapper.deleteBatchIds(ids);
return Result.success();
}
@GetMapping("/find/{id}")
public Good find(@PathVariable("id") Integer id){
return this.goodMapper.selectById(id);
}

@GetMapping("/page")
public Result<?> findPage(@RequestParam(defaultValue = "1") Integer pageNum,
@RequestParam(defaultValue = "10") Integer pageSize,
@RequestParam(defaultValue = "") String search) {
new Page<>(pageNum, pageSize);
Page<Good> goodPage = goodMapper.selectPage(new Page<>(pageNum, pageSize), Wrappers.<Good>lambdaQuery().like(Good::getGoodDescribe, search));
LambdaQueryWrapper<Good> query = Wrappers.<Good>lambdaQuery().orderByDesc(Good::getGoodId);
if (StrUtil.isNotBlank(search)) {
query.like(Good::getGoodDescribe, search);
}
return Result.success(goodPage);
}
}


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
ProductCategorySerivce productCategorySerivce;

@Resource
ProductCategoryMapper productCategoryMapper;

@GetMapping("/list")
public Result<?> list(){
List<ProductCategoryVO> all = productCategorySerivce.getAllProductCategoryVO();
return Result.success(all);
}
@GetMapping("/{id}")
public Result<?> findId(@PathVariable Integer id){
ProductCategory byId = productCategorySerivce.getById(id);
return Result.success(byId);
}
@GetMapping("/parent/{id}")
public Result findPId(@PathVariable Integer id){
List<ProductCategory> list = productCategorySerivce.list(Wrappers.<ProductCategory>lambdaQuery().eq(ProductCategory::getParentId, id));
return Result.success(list);
}
@PostMapping
public Result<?> save(@RequestBody ProductCategory productCategory){
productCategory.setCreateTime(new Date());
productCategory.setUpdateTime(new Date());
productCategorySerivce.save(productCategory);
return Result.success();
}

@PutMapping
public Result<?> update(@RequestBody ProductCategory productCategory){
productCategorySerivce.updateById(productCategory);
return Result.success();
}
@DeleteMapping("/{categoryId}")
public Result<?> delete(@PathVariable Integer categoryId){
productCategorySerivce.removeById(categoryId);
return Result.success();

}
@PostMapping("/deleteBatch")
public Result<?> deleteBatch(@RequestBody List<Integer> ids){
productCategorySerivce.removeByIds(ids);
return Result.success();
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

@DeleteMapping("/delete/{id}")
public Result delete(@PathVariable("id") Integer id){
imgMapper.deleteById(id);
return Result.success();
}

@GetMapping("/find/{id}")
public Img find(@PathVariable("id") Integer id){
return this.imgMapper.selectById(id);
}

@PutMapping("/update")
public Result update(@RequestBody Img img){
imgMapper.updateById(img);
return Result.success();
}

@PostMapping("/add")
public Result insert(@RequestBody Img img){
imgMapper.insert(img);
return Result.success();
}
@PostMapping("/deleteBatch")
public Result deleteBatch(@RequestBody List<Integer> ids){
imgMapper.deleteBatchIds(ids);
return Result.success();
}
@GetMapping("/finds/{customerId}")
public Result<?> findCustomerId(@RequestParam(defaultValue = "1") Integer pageNum,
@RequestParam(defaultValue = "5") Integer pageSize,
@PathVariable Integer customerId){
Page<Img> page = imgMapper.selectPage(new Page<>(pageNum, pageSize), Wrappers.<Img>lambdaQuery().eq(Img::getCustomerId, customerId).orderByDesc(Img::getCreateTime));
return Result.success(page);
}

@GetMapping("/page")
public Result<?> findPage(@RequestParam(defaultValue = "1") Integer pageNum,
@RequestParam(defaultValue = "10") Integer pageSize,
@RequestParam(defaultValue = "") String search) {


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