基于javaweb的SpringBoot无人智慧超市管理系统(java+springboot+maven+mybaits+vue+elementui+mysql)

运行环境

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

开发工具

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

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

适用

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

功能说明

091524122608

101524122608

111524122608

121524122608

141524122608

151524122608

161524122608

171524122608

181524122608

191524122608

基于javaweb的SpringBoot无人智慧超市管理系统(java+springboot+maven+mybaits+vue+elementui+mysql)

项目介绍

基于Springboot+vue实现的无人智慧超市管理系统

本项目分为前后台,分为用户和管理员两个角色

用户:登录、注册、商品信息(在商品信息列表页面的输入栏中输入商品名称、商品分类和价格进行查询,可以查看到商品信息详细,并根据需要对商品信息详情信息进行添加到购物车、立即购买、收藏、赞一下、踩一下或评论)、个人中心、我的订单、我的收藏等功能

管理员:登录、个人中心、用户管理、商品分类管理、商品信息管理、仓储信息管理、系统管理、订单管理等功能

技术栈

后端:SpringBoot+Mybaits

前端:Vue+elementui

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


/**
* 上传文件映射表
*/
@RestController
@RequestMapping("file")
@SuppressWarnings({"unchecked","rawtypes"})
public class FileController{
@Autowired
private ConfigService configService;
/**
* 上传文件
*/
@RequestMapping("/upload")
@IgnoreAuth
public R upload(@RequestParam("file") MultipartFile file,String type) throws Exception {
if (file.isEmpty()) {
throw new EIException("上传文件不能为空");
}
String fileExt = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")+1);
File path = new File(ResourceUtils.getURL("classpath:static").getPath());
if(!path.exists()) {
path = new File("");
}
File upload = new File(path.getAbsolutePath(),"/upload/");
if(!upload.exists()) {
upload.mkdirs();
}
String fileName = new Date().getTime()+"."+fileExt;
if(StringUtils.isNotBlank(type) && type.contains("_template")) {
fileName = type + "."+fileExt;
new File(upload.getAbsolutePath()+"/"+fileName).deleteOnExit();
}
File dest = new File(upload.getAbsolutePath()+"/"+fileName);
file.transferTo(dest);
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.error("用户已存在");
}
userService.insert(user);
return R.ok();
}

/**
* 修改
*/
@RequestMapping("/update")
public R update(@RequestBody UsersEntity user){
// ValidatorUtils.validateEntity(user);
UsersEntity u = userService.selectOne(new EntityWrapper<UsersEntity>().eq("username", user.getUsername()));
if(u!=null && u.getId()!=user.getId() && u.getUsername().equals(user.getUsername())) {
return R.error("用户名已存在。");
}
userService.updateById(user);//全部更新
return R.ok();
}

/**
* 删除
*/
@RequestMapping("/delete")
public R delete(@RequestBody Long[] ids){
userService.deleteBatchIds(Arrays.asList(ids));
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
     * 删除
*/
@RequestMapping("/delete")
public R delete(@RequestBody Long[] ids){
discussshangpinxinxiService.deleteBatchIds(Arrays.asList(ids));
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53

PageUtils page = aboutusService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, aboutus), params), params));
return R.ok().put("data", page);
}

/**
* 列表
*/
@RequestMapping("/lists")
public R list( AboutusEntity aboutus){
EntityWrapper<AboutusEntity> ew = new EntityWrapper<AboutusEntity>();
ew.allEq(MPUtil.allEQMapPre( aboutus, "aboutus"));
return R.ok().put("data", aboutusService.selectListView(ew));
}

/**
* 查询
*/
@RequestMapping("/query")
public R query(AboutusEntity aboutus){
EntityWrapper< AboutusEntity> ew = new EntityWrapper< AboutusEntity>();
ew.allEq(MPUtil.allEQMapPre( aboutus, "aboutus"));
AboutusView aboutusView = aboutusService.selectView(ew);
return R.ok("查询关于我们成功").put("data", aboutusView);
}

/**
* 后端详情
*/
@RequestMapping("/info/{id}")
public R info(@PathVariable("id") Long id){
AboutusEntity aboutus = aboutusService.selectById(id);
return R.ok().put("data", aboutus);
}

/**
* 前端详情
*/
@IgnoreAuth
@RequestMapping("/detail/{id}")
public R detail(@PathVariable("id") Long id){
AboutusEntity aboutus = aboutusService.selectById(id);
return R.ok().put("data", aboutus);
}




/**
* 后端保存
*/
@RequestMapping("/save")
public R save(@RequestBody AboutusEntity aboutus, 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
		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);
}

/**
* (按值统计)时间统计类型
*/
@IgnoreAuth
@RequestMapping("/value/{tableName}/{xColumnName}/{yColumnName}/{timeStatType}")
public R valueDay(@PathVariable("tableName") String tableName, @PathVariable("yColumnName") String yColumnName, @PathVariable("xColumnName") String xColumnName, @PathVariable("timeStatType") String timeStatType) {
Map<String, Object> params = new HashMap<String, Object>();
params.put("table", tableName);
params.put("xColumn", xColumnName);
params.put("yColumn", yColumnName);
params.put("timeStatType", timeStatType);
List<Map<String, Object>> result = commonService.selectTimeStatValue(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);
}



}


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