大家好!我是岛上程序猿,感谢您阅读本文,欢迎一键三连哦。
💞当前专栏:Java毕业设计
精彩专栏推荐👇🏻👇🏻👇🏻
开发环境
开发语言:Java
框架:ssm
JDK版本:JDK1.8
服务器:tomcat7
数据库:mysql 5.7
数据库工具:Navicat12
开发软件:eclipse/myeclipse/idea
Maven包:Maven3.3.9
浏览器:谷歌浏览器
演示视频
jsp_SSM的弹幕视频网站
原版高清演示视频:
https://pan.quark.cn/s/e1d358d6de36
源码下载地址:
https://download.csdn.net/download/m0_46388260/88010169
LW目录
【如需全文请按文末获取联系】
目录
一、项目简介
(1)管理员功能要求:个人中心、用户管理、视频信息管理、商品信息管理、论坛交流、系统管理、订单管理。
前台首页:首页、视频信息、商品信息、论坛信息、我的、跳转到后台、购物车、客服。
用户后台;个人中心、我的收藏管理、订单管理等功能模块。
二、系统设计
2.1软件功能模块设计
弹幕视频网站结构图,如图4-3所示。
2.2数据库设计
管理员信息属性图如图4-5所示。
用户管理属性图如图4-6所示
视频信息管理属性图如图4-7所示。
商品信息管理实体属性图如图4-8所示。
三、系统项目部分截图
3.1前台首页功能模块
弹幕视频网站,在弹幕视频网站可以查看首页、视频信息、商品信息、论坛信息、我的、跳转到后台、购物车、客服等内容,如图5-1所示。
视频信息,在视频信息页面可以查看视频名称、图片、视频、视频简介、发布日期等信息,并进行收藏、搜索等,如图5-3所示。
个人信息,在个人信息页面可以查看用户名、密码、姓名、性别、手机号码、邮箱、余额进行充值操作等,并进行更改个人信息等,如图5-5所示。
3.2用户功能模块
用户,通过填写用户名、密码等信息,输入完成后选择登录即可进入弹幕视频网站如图5-6所示。
我的订单管理,在我的订单管理页面可以查看订单编号、商品编号、商品名称、购买数量、价格/积分、总价格/总积分、折扣总价格、支付类型、状态、地址等支付详情信息操作,如图5-8所示。
3.3管理员功能模块
管理员登录,通过填写用户名、密码等信息,输入完成后选择登录即可进入弹幕视频网站,如图5-9所示。
弹幕视频网站,在弹幕视频网站可以查看个人中心、用户管理、视频信息管理、商品信息管理、论坛交流、系统管理、订单管理,如图5-10所示。
视频信息管理,在视频信息页面可以查看视频名称、图片、视频、视频简介、发布日期等信息进行修改、删除、查看,如图5-12所示。
四、部分核心代码
4.1 用户部分
package com.controller;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Calendar;
import java.util.Map;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Date;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import com.utils.ValidatorUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.annotation.IgnoreAuth;
import com.entity.ShipinxinxiEntity;
import com.entity.view.ShipinxinxiView;
import com.service.ShipinxinxiService;
import com.service.TokenService;
import com.utils.PageUtils;
import com.utils.R;
import com.utils.MD5Util;
import com.utils.MPUtil;
import com.utils.CommonUtil;
/**
* 视频信息
* 后端接口
* @author
* @email
* @date 2021-03-01 10:31:57
*/
@RestController
@RequestMapping("/shipinxinxi")
public class ShipinxinxiController {
@Autowired
private ShipinxinxiService shipinxinxiService;
/**
* 后端列表
*/
@RequestMapping("/page")
public R page(@RequestParam Map<String, Object> params,ShipinxinxiEntity shipinxinxi, HttpServletRequest request){
EntityWrapper<ShipinxinxiEntity> ew = new EntityWrapper<ShipinxinxiEntity>();
PageUtils page = shipinxinxiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, shipinxinxi), params), params));
request.setAttribute("data", page);
return R.ok().put("data", page);
}
/**
* 前端列表
*/
@IgnoreAuth
@RequestMapping("/list")
public R list(@RequestParam Map<String, Object> params,ShipinxinxiEntity shipinxinxi, HttpServletRequest request){
EntityWrapper<ShipinxinxiEntity> ew = new EntityWrapper<ShipinxinxiEntity>();
PageUtils page = shipinxinxiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, shipinxinxi), params), params));
request.setAttribute("data", page);
return R.ok().put("data", page);
}
/**
* 列表
*/
@RequestMapping("/lists")
public R list( ShipinxinxiEntity shipinxinxi){
EntityWrapper<ShipinxinxiEntity> ew = new EntityWrapper<ShipinxinxiEntity>();
ew.allEq(MPUtil.allEQMapPre( shipinxinxi, "shipinxinxi"));
return R.ok().put("data", shipinxinxiService.selectListView(ew));
}
/**
* 查询
*/
@RequestMapping("/query")
public R query(ShipinxinxiEntity shipinxinxi){
EntityWrapper< ShipinxinxiEntity> ew = new EntityWrapper< ShipinxinxiEntity>();
ew.allEq(MPUtil.allEQMapPre( shipinxinxi, "shipinxinxi"));
ShipinxinxiView shipinxinxiView = shipinxinxiService.selectView(ew);
return R.ok("查询视频信息成功").put("data", shipinxinxiView);
}
/**
* 后端详情
*/
@RequestMapping("/info/{id}")
public R info(@PathVariable("id") Long id){
ShipinxinxiEntity shipinxinxi = shipinxinxiService.selectById(id);
shipinxinxi.setClicknum(shipinxinxi.getClicknum()+1);
shipinxinxi.setClicktime(new Date());
shipinxinxiService.updateById(shipinxinxi);
return R.ok().put("data", shipinxinxi);
}
/**
* 前端详情
*/
@IgnoreAuth
@RequestMapping("/detail/{id}")
public R detail(@PathVariable("id") Long id){
ShipinxinxiEntity shipinxinxi = shipinxinxiService.selectById(id);
shipinxinxi.setClicknum(shipinxinxi.getClicknum()+1);
shipinxinxi.setClicktime(new Date());
shipinxinxiService.updateById(shipinxinxi);
return R.ok().put("data", shipinxinxi);
}
/**
* 后端保存
*/
@RequestMapping("/save")
public R save(@RequestBody ShipinxinxiEntity shipinxinxi, HttpServletRequest request){
shipinxinxi.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(shipinxinxi);
shipinxinxiService.insert(shipinxinxi);
return R.ok();
}
/**
* 前端保存
*/
@RequestMapping("/add")
public R add(@RequestBody ShipinxinxiEntity shipinxinxi, HttpServletRequest request){
shipinxinxi.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(shipinxinxi);
shipinxinxiService.insert(shipinxinxi);
return R.ok();
}
/**
* 修改
*/
@RequestMapping("/update")
public R update(@RequestBody ShipinxinxiEntity shipinxinxi, HttpServletRequest request){
//ValidatorUtils.validateEntity(shipinxinxi);
shipinxinxiService.updateById(shipinxinxi);//全部更新
return R.ok();
}
/**
* 删除
*/
@RequestMapping("/delete")
public R delete(@RequestBody Long[] ids){
shipinxinxiService.deleteBatchIds(Arrays.asList(ids));
return R.ok();
}
/**
* 提醒接口
*/
@RequestMapping("/remind/{columnName}/{type}")
public R remindCount(@PathVariable("columnName") String columnName, HttpServletRequest request,
@PathVariable("type") String type,@RequestParam Map<String, Object> map) {
map.put("column", columnName);
map.put("type", type);
if(type.equals("2")) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
Calendar c = Calendar.getInstance();
Date remindStartDate = null;
Date remindEndDate = null;
if(map.get("remindstart")!=null) {
Integer remindStart = Integer.parseInt(map.get("remindstart").toString());
c.setTime(new Date());
c.add(Calendar.DAY_OF_MONTH,remindStart);
remindStartDate = c.getTime();
map.put("remindstart", sdf.format(remindStartDate));
}
if(map.get("remindend")!=null) {
Integer remindEnd = Integer.parseInt(map.get("remindend").toString());
c.setTime(new Date());
c.add(Calendar.DAY_OF_MONTH,remindEnd);
remindEndDate = c.getTime();
map.put("remindend", sdf.format(remindEndDate));
}
}
Wrapper<ShipinxinxiEntity> wrapper = new EntityWrapper<ShipinxinxiEntity>();
if(map.get("remindstart")!=null) {
wrapper.ge(columnName, map.get("remindstart"));
}
if(map.get("remindend")!=null) {
wrapper.le(columnName, map.get("remindend"));
}
int count = shipinxinxiService.selectCount(wrapper);
return R.ok().put("count", count);
}
/**
* 前端智能排序
*/
@IgnoreAuth
@RequestMapping("/autoSort")
public R autoSort(@RequestParam Map<String, Object> params,ShipinxinxiEntity shipinxinxi, HttpServletRequest request,String pre){
EntityWrapper<ShipinxinxiEntity> ew = new EntityWrapper<ShipinxinxiEntity>();
Map<String, Object> newMap = new HashMap<String, Object>();
Map<String, Object> param = new HashMap<String, Object>();
Iterator<Map.Entry<String, Object>> it = param.entrySet().iterator();
while (it.hasNext()) {
Map.Entry<String, Object> entry = it.next();
String key = entry.getKey();
String newKey = entry.getKey();
if (pre.endsWith(".")) {
newMap.put(pre + newKey, entry.getValue());
} else if (StringUtils.isEmpty(pre)) {
newMap.put(newKey, entry.getValue());
} else {
newMap.put(pre + "." + newKey, entry.getValue());
}
}
params.put("sort", "clicknum");
params.put("order", "desc");
PageUtils page = shipinxinxiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, shipinxinxi), params), params));
return R.ok().put("data", page);
}
}
获取源码或论文
如需对应的LW或源码,以及其他定制需求,也可以下方V.X撩我wenruo0209。