基于javaweb的SpringBoot影视播放评分交流系统(java+springboot+maven+mysql+vue+element-ui)

运行环境

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

开发工具

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

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

适用

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

功能说明

061724153003

071724153003

081724153003

091724153003

101724153003

111724153003

121724153003

312124013108

基于javaweb的SpringBoot影视播放评分交流系统(java+springboot+maven+mysql+vue+element-ui)

/MovieSystem

管理员:
admin 123456

用户:
用户名1 123456
用户名2 123456
用户名3 123456
用户名4 123456
用户名5 123456
用户名6 123456

后端启动类:StartApplication
前端启动命令:npm run serve

前台:
http://localhost:8081/front/index.html

后台:
http://localhost:8081/

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
54
	HttpServletRequest request){
EntityWrapper<MessagesEntity> ew = new EntityWrapper<MessagesEntity>();
PageUtils page = messagesService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, messages), params), params));
return R.ok().put("data", page);
}

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

/**
* 查询
*/
@RequestMapping("/query")
public R query(MessagesEntity messages){
EntityWrapper< MessagesEntity> ew = new EntityWrapper< MessagesEntity>();
ew.allEq(MPUtil.allEQMapPre( messages, "messages"));
MessagesView messagesView = messagesService.selectView(ew);
return R.ok("查询留言交流成功").put("data", messagesView);
}

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

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




/**
* 后端保存
*/
@RequestMapping("/save")
public R save(@RequestBody MessagesEntity messages, 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
40
41
42
43
44
45
46
47
48
49
50
51
@IgnoreAuth
@RequestMapping("/detail/{id}")
public R detail(@PathVariable("id") Long id){
YonghuEntity yonghu = yonghuService.selectById(id);
return R.ok().put("data", yonghu);
}




/**
* 后端保存
*/
@RequestMapping("/save")
public R save(@RequestBody YonghuEntity yonghu, HttpServletRequest request){
yonghu.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(yonghu);
YonghuEntity user = yonghuService.selectOne(new EntityWrapper<YonghuEntity>().eq("yonghuming", yonghu.getYonghuming()));
if(user!=null) {
return R.error("用户已存在");
}
yonghu.setId(new Date().getTime());
yonghuService.insert(yonghu);
return R.ok();
}

/**
* 前端保存
*/
@RequestMapping("/add")
public R add(@RequestBody YonghuEntity yonghu, HttpServletRequest request){
yonghu.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(yonghu);
YonghuEntity user = yonghuService.selectOne(new EntityWrapper<YonghuEntity>().eq("yonghuming", yonghu.getYonghuming()));
if(user!=null) {
return R.error("用户已存在");
}
yonghu.setId(new Date().getTime());
yonghuService.insert(yonghu);
return R.ok();
}

/**
* 修改
*/
@RequestMapping("/update")
public R update(@RequestBody YonghuEntity yonghu, HttpServletRequest request){
//ValidatorUtils.validateEntity(yonghu);
yonghuService.updateById(yonghu);//全部更新
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


/**
* 留言交流
* 后端接口
* @email
*/
@RestController
@RequestMapping("/messages")
public class MessagesController {
@Autowired
private MessagesService messagesService;





/**
* 后端列表
*/
@RequestMapping("/page")
public R page(@RequestParam Map<String, Object> params,MessagesEntity messages,
HttpServletRequest request){
if(!request.getSession().getAttribute("role").toString().equals("管理员")) {
messages.setUserid((Long)request.getSession().getAttribute("userId"));
}
EntityWrapper<MessagesEntity> ew = new EntityWrapper<MessagesEntity>();
PageUtils page = messagesService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, messages), params), params));

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


/**
* 上传文件映射表
*/
@RestController
@RequestMapping("file")
@SuppressWarnings({"unchecked","rawtypes"})
public class FileController{
@Autowired
private ConfigService configService;
/**
* 上传文件
*/
@RequestMapping("/upload")
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;
File dest = new File(upload.getAbsolutePath()+"/"+fileName);
file.transferTo(dest);
/**
* 如果使用idea或者eclipse重启项目,发现之前上传的图片或者文件丢失,将下面一行代码注释打开
* 请将以下的"D:\\springbootq33sd\\src\\main\\resources\\static\\upload"替换成你本地项目的upload路径,
* 并且项目路径不能存在中文、空格等特殊字符
*/
// FileUtils.copyFile(dest, new File("D:\\springbootq33sd\\src\\main\\resources\\static\\upload"+"/"+fileName)); /**修改了路径以后请将该行最前面的//注释去掉**/
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

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

/**
* 查询
*/
@RequestMapping("/query")
public R query(YingpianfenleiEntity yingpianfenlei){
EntityWrapper< YingpianfenleiEntity> ew = new EntityWrapper< YingpianfenleiEntity>();
ew.allEq(MPUtil.allEQMapPre( yingpianfenlei, "yingpianfenlei"));
YingpianfenleiView yingpianfenleiView = yingpianfenleiService.selectView(ew);
return R.ok("查询影片分类成功").put("data", yingpianfenleiView);
}

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

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




/**
* 后端保存
*/
@RequestMapping("/save")


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