基于javaweb+SpringBoot的电影推荐系统(java+SpringBoot+html+easyui+bootstrap+mysql)

项目介绍
本系统采用企业级开发标准,使用SpringBoot架构,数据访问层采用Spring Data Jpa,业务控制层采用SpringMvc,安全框架采用Shiro,实现了完整权限系统,Controller方法采用shiro注解,来实现有效的权限控制;界面采用了Easyui技术;在该项目中可以收录电影,收录电影系统,电影系统动态信息以及通过关键字查询你想要看的电影。在后台可以添加电影信息,对电影信动态的管理,电影信息管理,系统信息的管理等。

环境需要
1.运行环境:最好是java jdk 1.8,我们在这个平台上运行的。其他版本理论上也可以。
2.IDE环境:IDEA,Eclipse,Myeclipse都可以。推荐IDEA;
3.tomcat环境:Tomcat 7.x,8.x,9.x版本均可
4.硬件环境:windows 7/8/10 1G内存以上;或者 Mac OS;
5.是否Maven项目: 是;查看源码目录中是否包含pom.xml;若包含,则为maven项目,否则为非maven项目

6.数据库:MySql 5.7版本;

技术栈

  1. 后端:SpringBoot+Spring Data Jpa+shiro

  2. 前端:html+easyui+bootstrap

使用说明

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

管理员账户:admin 密码:123456请添加图片描述
请添加图片描述
请添加图片描述
请添加图片描述
请添加图片描述
请添加图片描述
请添加图片描述

适用

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

		return Result.success(true);
	}
	
	/**
	 * 验证订单
	 * @param orderSn
	 * @param phone
	 * @return
	 */
	@RequestMapping(value="/auth_order",method=RequestMethod.POST)
	@ResponseBody
	public Result<Boolean> authOrder(@RequestParam(name="orderSn",required=true)String orderSn,@RequestParam(name="phone",required=true)String phone){
		if(orderSn.length() < 18){
			return Result.error(CodeMsg.ORDER_SN_ERROR);
		}
		if(phone.length() < 11){
			return Result.error(CodeMsg.PHONE_ERROR);
		}
	 */
	@RequestMapping(value="/operator_log_list")
	public String operatorLogList(Model model, OperaterLog operaterLog, PageBean<OperaterLog> pageBean){
		model.addAttribute("pageBean", operaterLogService.findList(operaterLog, pageBean));
		model.addAttribute("operator", operaterLog.getOperator());
		model.addAttribute("title", "日志列表");
		return "admin/system/operator_log_list";
	}
	
	/**
	 * 删除操作日志,可删除多个
	 * @param ids
	 * @return
	 */
	@RequestMapping(value="/delete_operator_log",method=RequestMethod.POST)
	@ResponseBody
	public Result<Boolean> delete(String ids){
		if(!StringUtils.isEmpty(ids)){
			String[] splitIds = ids.split(",");
	 */
	@RequestMapping(value="/edit",method=RequestMethod.POST)
	@ResponseBody
	public Result<Boolean> edit(User user){
		//用统一验证实体方法验证是否合法
		CodeMsg validate = ValidateEntityUtil.validate(user);
		if(validate.getCode() != CodeMsg.SUCCESS.getCode()){
			return Result.error(validate);
		}
		if(user.getRole() == null || user.getRole().getId() == null){
			return Result.error(CodeMsg.ADMIN_USER_ROLE_EMPTY);
		}
		if(user.getId() == null || user.getId().longValue() <= 0){
			return Result.error(CodeMsg.ADMIN_USE_NO_EXIST);
		}
		if(userService.isExistUsername(user.getUsername(), user.getId())){
			return Result.error(CodeMsg.ADMIN_USERNAME_EXIST);
		}
	public String operatorLogList(Model model, OperaterLog operaterLog, PageBean<OperaterLog> pageBean){
		model.addAttribute("pageBean", operaterLogService.findList(operaterLog, pageBean));
		model.addAttribute("operator", operaterLog.getOperator());
		model.addAttribute("title", "日志列表");
		return "admin/system/operator_log_list";
	}
	
	/**
	 * 删除操作日志,可删除多个
	 * @param ids
	 * @return
	 */
	@RequestMapping(value="/delete_operator_log",method=RequestMethod.POST)
	@ResponseBody
	public Result<Boolean> delete(String ids){
		if(!StringUtils.isEmpty(ids)){
			String[] splitIds = ids.split(",");
			for(String id : splitIds){
				operaterLogService.delete(Long.valueOf(id));
			}
			return Result.error(CodeMsg.ADMIN_AREA_SAVE_ERROR);
		}
		return Result.success(true);
	}
	
	/**
	 * 删除
	 * @param id
	 * @return
	 */
	@RequestMapping(value="/delete",method=RequestMethod.POST)
	@ResponseBody
	public Result<Boolean> delete(@RequestParam(name="id",required=true)Long id){
		try {
			movieService.delete(id);
		} catch (Exception e) {
			return Result.error(CodeMsg.ADMIN_MOVIE_DELETE_ERROR);
		}
		return Result.success(true);
	}
	
	
			movieService.delete(id);
		} catch (Exception e) {
			return Result.error(CodeMsg.ADMIN_MOVIE_DELETE_ERROR);
		}
		return Result.success(true);
	}
	
	
	/**
	 * ----------电影评价管理-------------
	 */
	/**
	 * 电影评价列表
	 * @param model
	 * @param movieComment
	 * @param pageBean
	 * @return
	 */
	@RequestMapping(value="/comment_list")
	public String list(Model model,MovieComment movieComment,PageBean<MovieComment> pageBean){
		model.addAttribute("pageBean", movieCommentService.findPage(movieComment, pageBean));
		model.addAttribute("content",movieComment.getContent());
		return "admin/movie/comment_list";
	}
	
	/**
 * 前台电影控制器
 * @author yy
 *
 */
@RequestMapping("/home/movie")
@Controller
public class HomeMovieController {
	@Autowired
	private MovieService movieService;
	@Autowired
	private MovieCommentService movieCommentService;
	@Autowired
	private NewsService newsService;
	@Autowired
	private CinemaHallSessionService cinemaHallSessionService;
	@Autowired
	private CinemaService cinemaService;
			return Result.error(validate);
		}
		if(user.getRole() == null || user.getRole().getId() == null){
			return Result.error(CodeMsg.ADMIN_USER_ROLE_EMPTY);
		}
		//判断用户名是否存在
		if(userService.isExistUsername(user.getUsername(), 0l)){
			return Result.error(CodeMsg.ADMIN_USERNAME_EXIST);
		}
		//到这说明一切符合条件,进行数据库新增
		if(userService.save(user) == null){
			return Result.error(CodeMsg.ADMIN_USE_ADD_ERROR);
		}
		model.addAttribute("movie", movieService.findById(id));
		model.addAttribute("topMovieList", movieService.findTopList(5));
		model.addAttribute("distinctCinemaHallSessionList", cinemaHallSessionService.findDistinctCinemaByMovieId(id));
		model.addAttribute("distinctShowDateCinemaHallSessionList", cinemaHallSessionService.findDistinctShowDateByMovieId(id));
		model.addAttribute("commentList", movieCommentService.findByMovie(id));
		return "home/movie/detail";
	}
	
	/**
	 * 选座页面
	 * @param model
	 * @param id
	 * @return
	 */
	@RequestMapping("/select_seat")
	public String selectSeat(Model model,@RequestParam(name="id",required=true) Long id){
		CinemaHallSession cinemaHallSession = cinemaHallSessionService.findById(id);
		model.addAttribute("cinemaHallSession", cinemaHallSession);
		model.addAttribute("cinemaHallSeatList", cinemaHallSeatService.findAll(cinemaHallSession.getCinemaHall().getId()));
		model.addAttribute("selectedSeatMax", selectedSeatMax);
		List<Order> findByCinemaHallSession = orderService.findByCinemaHallSession(id);
		model.addAttribute("orderSeatList", JSONArray.toJSONString(orderItemService.findOrderItemSeatIds(findByCinemaHallSession)));
		return "home/movie/select_seat";
	}
	
	/**
	 * 修改个人信息保存
	 * @param user
	 * @return
	 */
	@RequestMapping(value="/update_userinfo",method=RequestMethod.POST)
	public String updateUserInfo(User user){
		User loginedUser = SessionUtil.getLoginedUser();
		loginedUser.setEmail(user.getEmail());
		loginedUser.setMobile(user.getMobile());
		loginedUser.setHeadPic(user.getHeadPic());
		//首先保存到数据库
		userService.save(loginedUser);
		//更新session里的值
		SessionUtil.set(SessionConstant.SESSION_USER_LOGIN_KEY, loginedUser);
		return "redirect:update_userinfo";
	}
	
	/**
	 * 修改密码页面
	 * @return
	 */
	@RequestMapping(value="/update_pwd",method=RequestMethod.GET)
	public String updatePwd(){

  • 0
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值