package com.cl.controller;
import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.text.ParseException;
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.cl.utils.ValidatorUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.format.annotation.DateTimeFormat;
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.cl.annotation.IgnoreAuth;
import com.cl.entity.ShipinbofangEntity;
import com.cl.entity.view.ShipinbofangView;
import com.cl.service.ShipinbofangService;
import com.cl.service.TokenService;
import com.cl.utils.PageUtils;
import com.cl.utils.R;
import com.cl.utils.EncryptUtil;
import com.cl.utils.MPUtil;
import com.cl.utils.CommonUtil;
import java.io.IOException;
import com.cl.service.StoreupService;
import com.cl.entity.StoreupEntity;
/**
* 视频播放
* 后端接口
* @author
* @email
* @date 2024-02-24 22:15:15
*/
@RestController
@RequestMapping("/shipinbofang")
public class ShipinbofangController {
@Autowired
private ShipinbofangService shipinbofangService;
@Autowired
private StoreupService storeupService;
/**
* 后端列表
*/
@RequestMapping("/page")
public R page(@RequestParam Map<String, Object> params,ShipinbofangEntity shipinbofang,
HttpServletRequest request){
EntityWrapper<ShipinbofangEntity> ew = new EntityWrapper<ShipinbofangEntity>();
PageUtils page = shipinbofangService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, shipinbofang), params), params));
return R.ok().put("data", page);
}
/**
* 前端列表
*/
@IgnoreAuth
@RequestMapping("/list")
public R list(@RequestParam Map<String, Object> params,ShipinbofangEntity shipinbofang,
HttpServletRequest request){
EntityWrapper<ShipinbofangEntity> ew = new EntityWrapper<ShipinbofangEntity>();
PageUtils page = shipinbofangService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, shipinbofang), params), params));
return R.ok().put("data", page);
}
/**
* 列表
*/
@RequestMapping("/lists")
public R list( ShipinbofangEntity shipinbofang){
EntityWrapper<ShipinbofangEntity> ew = new EntityWrapper<ShipinbofangEntity>();
ew.allEq(MPUtil.allEQMapPre( shipinbofang, "shipinbofang"));
return R.ok().put("data", shipinbofangService.selectListView(ew));
}
/**
* 查询
*/
@RequestMapping("/query")
public R query(ShipinbofangEntity shipinbofang){
EntityWrapper< ShipinbofangEntity> ew = new EntityWrapper< ShipinbofangEntity>();
ew.allEq(MPUtil.allEQMapPre( shipinbofang, "shipinbofang"));
ShipinbofangView shipinbofangView = shipinbofangService.selectView(ew);
return R.ok("查询视频播放成功").put("data", shipinbofangView);
}
/**
* 后端详情
*/
@RequestMapping("/info/{id}")
public R info(@PathVariable("id") Long id){
ShipinbofangEntity shipinbofang = shipinbofangService.selectById(id);
shipinbofang.setClicknum(shipinbofang.getClicknum()+1);
shipinbofang.setClicktime(new Date());
shipinbofangService.updateById(shipinbofang);
shipinbofang = shipinbofangService.selectView(new EntityWrapper<ShipinbofangEntity>().eq("id", id));
return R.ok().put("data", shipinbofang);
}
/**
* 前端详情
*/
@IgnoreAuth
@RequestMapping("/detail/{id}")
public R detail(@PathVariable("id") Long id){
ShipinbofangEntity shipinbofang = shipinbofangService.selectById(id);
shipinbofang.setClicknum(shipinbofang.getClicknum()+1);
shipinbofang.setClicktime(new Date());
shipinbofangService.updateById(shipinbofang);
shipinbofang = shipinbofangService.selectView(new EntityWrapper<ShipinbofangEntity>().eq("id", id));
return R.ok().put("data", shipinbofang);
}
/**
* 后端保存
*/
@RequestMapping("/save")
public R save(@RequestBody ShipinbofangEntity shipinbofang, HttpServletRequest request){
shipinbofang.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(shipinbofang);
shipinbofangService.insert(shipinbofang);
return R.ok();
}
/**
* 前端保存
*/
@RequestMapping("/add")
public R add(@RequestBody ShipinbofangEntity shipinbofang, HttpServletRequest request){
shipinbofang.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(shipinbofang);
shipinbofangService.insert(shipinbofang);
return R.ok();
}
/**
* 修改
*/
@RequestMapping("/update")
@Transactional
public R update(@RequestBody ShipinbofangEntity shipinbofang, HttpServletRequest request){
//ValidatorUtils.validateEntity(shipinbofang);
shipinbofangService.updateById(shipinbofang);//全部更新
return R.ok();
}
/**
* 删除
*/
@RequestMapping("/delete")
public R delete(@RequestBody Long[] ids){
shipinbofangService.deleteBatchIds(Arrays.asList(ids));
return R.ok();
}
/**
* 前端智能排序
*/
@IgnoreAuth
@RequestMapping("/autoSort")
public R autoSort(@RequestParam Map<String, Object> params,ShipinbofangEntity shipinbofang, HttpServletRequest request,String pre){
EntityWrapper<ShipinbofangEntity> ew = new EntityWrapper<ShipinbofangEntity>();
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 = shipinbofangService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, shipinbofang), params), params));
return R.ok().put("data", page);
}
/**
* (按值统计)
*/
@RequestMapping("/value/{xColumnName}/{yColumnName}")
public R value(@PathVariable("yColumnName") String yColumnName, @PathVariable("xColumnName") String xColumnName,HttpServletRequest request) {
Map<String, Object> params = new HashMap<String, Object>();
params.put("xColumn", xColumnName);
params.put("yColumn", yColumnName);
EntityWrapper<ShipinbofangEntity> ew = new EntityWrapper<ShipinbofangEntity>();
List<Map<String, Object>> result = shipinbofangService.selectValue(params, ew);
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
for(Map<String, Object> m : result) {
for(String k : m.
没有合适的资源?快使用搜索试试~ 我知道了~
基于SpringBoot+Vue.JS前后端分离的中国戏曲文化传播系统 源码+数据库+录屏(毕业设计)
共369个文件
java:100个
vue:75个
png:46个
需积分: 0 3 下载量 52 浏览量
2024-09-21
10:10:28
上传
评论 1
收藏 45.41MB ZIP 举报
温馨提示
中国戏曲文化传播系统是一个旨在通过现代技术手段推广和传承中国戏曲文化的平台。该系统采用Vue.js作为前端框架,利用其响应式和组件化的特点,为用户提供一个直观、流畅的交互界面。Vue.js的易用性和灵活性使得开发团队能够快速构建出具有良好用户体验的网页应用。后端则采用SpringBoot框架,它是一个基于Spring框架的项目,提供了快速开发、部署和运行的能力,同时支持微服务架构,使得系统能够高效地处理数据和业务逻辑。结合Vue.js和SpringBoot,中国戏曲文化传播系统能够为用户提供一个稳定、安全且功能丰富的戏曲文化学习与交流环境,让更多人能够方便地接触和了解这一传统艺术形式。 启动教程:https://www.bilibili.com/video/BV1SzbFe7EGZ
资源推荐
资源详情
资源评论
收起资源包目录
基于SpringBoot+Vue.JS前后端分离的中国戏曲文化传播系统 源码+数据库+录屏(毕业设计) (369个子文件)
chunk-vendors.83167ee3.css 339KB
chunk-vendors.9650af1e.css 319KB
app.1e0f59e1.css 180KB
app.2c270225.css 136KB
690.a9557c54.css 10KB
92.0d3bc16e.css 3KB
338.8ab757ca.css 3KB
438.48f3b04f.css 1KB
iconfont.css 622B
canvas-bg-1.css 391B
canvas-bg-1.css 391B
canvas-bg-2.css 83B
canvas-bg-2.css 83B
canvas-bg-4.css 61B
canvas-bg-5.css 61B
canvas-bg-3.css 61B
canvas-bg-4.css 61B
canvas-bg-5.css 61B
canvas-bg-3.css 61B
.env.development 193B
.env.development 193B
数据库表结构文档.doc 974KB
.gitignore 231B
index.html 783B
index.html 780B
index.html 698B
index.html 695B
favicon.ico 4KB
favicon.ico 4KB
favicon.ico 4KB
favicon.ico 4KB
YinpinbofangController.java 13KB
ShipinbofangController.java 13KB
BaiduUtil.java 8KB
YonghuController.java 8KB
EncryptUtil.java 8KB
CommonController.java 8KB
DiscussyinpinbofangController.java 7KB
DiscussshipinbofangController.java 7KB
MenuController.java 6KB
StoreupController.java 5KB
XiqufenleiController.java 5KB
YishujiaController.java 5KB
UsersController.java 5KB
MPUtil.java 5KB
NewsController.java 5KB
ShipinbofangEntity.java 5KB
YinpinbofangEntity.java 5KB
FileController.java 4KB
YishujiaEntity.java 4KB
CommonUtil.java 4KB
StoreupEntity.java 4KB
YonghuEntity.java 3KB
AuthorizationInterceptor.java 3KB
DiscussshipinbofangEntity.java 3KB
DiscussyinpinbofangEntity.java 3KB
ConfigController.java 3KB
HttpClientUtils.java 3KB
NewsEntity.java 3KB
Query.java 3KB
TokenServiceImpl.java 2KB
ShipinbofangServiceImpl.java 2KB
YinpinbofangServiceImpl.java 2KB
TokenEntity.java 2KB
XiqufenleiEntity.java 2KB
MenuEntity.java 2KB
PageUtils.java 2KB
DiscussshipinbofangServiceImpl.java 2KB
DiscussyinpinbofangServiceImpl.java 2KB
XiqufenleiServiceImpl.java 2KB
YishujiaServiceImpl.java 2KB
StoreupServiceImpl.java 2KB
YonghuServiceImpl.java 2KB
NewsServiceImpl.java 2KB
MenuServiceImpl.java 2KB
InterceptorConfig.java 1KB
CommonServiceImpl.java 1KB
UsersServiceImpl.java 1KB
ShipinbofangDao.java 1KB
YinpinbofangDao.java 1KB
UsersEntity.java 1KB
YinpinbofangService.java 1KB
ShipinbofangService.java 1KB
SpringContextUtils.java 1KB
ValidatorUtils.java 1KB
DiscussshipinbofangView.java 1KB
DiscussyinpinbofangView.java 1KB
SQLFilter.java 1KB
ShipinbofangView.java 1020B
YinpinbofangView.java 1020B
XiqufenleiView.java 1002B
YishujiaView.java 981B
StoreupView.java 975B
YonghuView.java 960B
NewsView.java 948B
MenuView.java 942B
ConfigServiceImpl.java 934B
DiscussshipinbofangService.java 919B
DiscussyinpinbofangService.java 919B
DiscussyinpinbofangDao.java 909B
共 369 条
- 1
- 2
- 3
- 4
资源评论
杨荧
- 粉丝: 2w+
- 资源: 2372
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功