视频素材+图片素材
This commit is contained in:
parent
64c8599c57
commit
72aba428d5
|
|
@ -0,0 +1,138 @@
|
||||||
|
package com.ruoyi.web.controller.system;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Controller;
|
||||||
|
import org.springframework.ui.ModelMap;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.ResponseBody;
|
||||||
|
import com.ruoyi.common.annotation.Log;
|
||||||
|
import com.ruoyi.common.enums.BusinessType;
|
||||||
|
import com.ruoyi.system.domain.ClewImg;
|
||||||
|
import com.ruoyi.system.service.IClewImgService;
|
||||||
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
|
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||||
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 线索图片Controller
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2023-11-06
|
||||||
|
*/
|
||||||
|
@Controller
|
||||||
|
@RequestMapping("/system/img")
|
||||||
|
public class ClewImgController extends BaseController
|
||||||
|
{
|
||||||
|
private String prefix = "system/img";
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IClewImgService clewImgService;
|
||||||
|
|
||||||
|
@RequiresPermissions("system:img:view")
|
||||||
|
@GetMapping()
|
||||||
|
public String img()
|
||||||
|
{
|
||||||
|
return prefix + "/img";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询线索图片列表
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("system:img:list")
|
||||||
|
@PostMapping("/list")
|
||||||
|
@ResponseBody
|
||||||
|
public TableDataInfo list(ClewImg clewImg)
|
||||||
|
{
|
||||||
|
startPage();
|
||||||
|
List<ClewImg> list = clewImgService.selectClewImgList(clewImg);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/app/list")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult getAppList()
|
||||||
|
{
|
||||||
|
List<ClewImg> list = clewImgService.selectClewImgList(new ClewImg());
|
||||||
|
List<String> imgList = list.stream().map(ClewImg::getImgUrl).collect(Collectors.toList());
|
||||||
|
return AjaxResult.success(imgList);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出线索图片列表
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("system:img:export")
|
||||||
|
@Log(title = "线索图片", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult export(ClewImg clewImg)
|
||||||
|
{
|
||||||
|
List<ClewImg> list = clewImgService.selectClewImgList(clewImg);
|
||||||
|
ExcelUtil<ClewImg> util = new ExcelUtil<ClewImg>(ClewImg.class);
|
||||||
|
return util.exportExcel(list, "线索图片数据");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增线索图片
|
||||||
|
*/
|
||||||
|
@GetMapping("/add")
|
||||||
|
public String add()
|
||||||
|
{
|
||||||
|
return prefix + "/add";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增保存线索图片
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("system:img:add")
|
||||||
|
@Log(title = "线索图片", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping("/add")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult addSave(ClewImg clewImg)
|
||||||
|
{
|
||||||
|
return toAjax(clewImgService.insertClewImg(clewImg));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改线索图片
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("system:img:edit")
|
||||||
|
@GetMapping("/edit/{id}")
|
||||||
|
public String edit(@PathVariable("id") Long id, ModelMap mmap)
|
||||||
|
{
|
||||||
|
ClewImg clewImg = clewImgService.selectClewImgById(id);
|
||||||
|
mmap.put("clewImg", clewImg);
|
||||||
|
return prefix + "/edit";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改保存线索图片
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("system:img:edit")
|
||||||
|
@Log(title = "线索图片", businessType = BusinessType.UPDATE)
|
||||||
|
@PostMapping("/edit")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult editSave(ClewImg clewImg)
|
||||||
|
{
|
||||||
|
return toAjax(clewImgService.updateClewImg(clewImg));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除线索图片
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("system:img:remove")
|
||||||
|
@Log(title = "线索图片", businessType = BusinessType.DELETE)
|
||||||
|
@PostMapping( "/remove")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult remove(String ids)
|
||||||
|
{
|
||||||
|
return toAjax(clewImgService.deleteClewImgByIds(ids));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,135 @@
|
||||||
|
package com.ruoyi.web.controller.system;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Controller;
|
||||||
|
import org.springframework.ui.ModelMap;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.ResponseBody;
|
||||||
|
import com.ruoyi.common.annotation.Log;
|
||||||
|
import com.ruoyi.common.enums.BusinessType;
|
||||||
|
import com.ruoyi.system.domain.ClewVideo;
|
||||||
|
import com.ruoyi.system.service.IClewVideoService;
|
||||||
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
|
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||||
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 线索视频Controller
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2023-11-06
|
||||||
|
*/
|
||||||
|
@Controller
|
||||||
|
@RequestMapping("/system/video")
|
||||||
|
public class ClewVideoController extends BaseController
|
||||||
|
{
|
||||||
|
private String prefix = "system/video";
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IClewVideoService clewVideoService;
|
||||||
|
|
||||||
|
@RequiresPermissions("system:video:view")
|
||||||
|
@GetMapping()
|
||||||
|
public String video()
|
||||||
|
{
|
||||||
|
return prefix + "/video";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询线索视频列表
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("system:video:list")
|
||||||
|
@PostMapping("/list")
|
||||||
|
@ResponseBody
|
||||||
|
public TableDataInfo list(ClewVideo clewVideo)
|
||||||
|
{
|
||||||
|
startPage();
|
||||||
|
List<ClewVideo> list = clewVideoService.selectClewVideoList(clewVideo);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/app/list")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult getAppList()
|
||||||
|
{
|
||||||
|
List<ClewVideo> list = clewVideoService.selectClewVideoList(new ClewVideo());
|
||||||
|
return AjaxResult.success(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出线索视频列表
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("system:video:export")
|
||||||
|
@Log(title = "线索视频", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult export(ClewVideo clewVideo)
|
||||||
|
{
|
||||||
|
List<ClewVideo> list = clewVideoService.selectClewVideoList(clewVideo);
|
||||||
|
ExcelUtil<ClewVideo> util = new ExcelUtil<ClewVideo>(ClewVideo.class);
|
||||||
|
return util.exportExcel(list, "线索视频数据");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增线索视频
|
||||||
|
*/
|
||||||
|
@GetMapping("/add")
|
||||||
|
public String add()
|
||||||
|
{
|
||||||
|
return prefix + "/add";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增保存线索视频
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("system:video:add")
|
||||||
|
@Log(title = "线索视频", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping("/add")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult addSave(ClewVideo clewVideo)
|
||||||
|
{
|
||||||
|
return toAjax(clewVideoService.insertClewVideo(clewVideo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改线索视频
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("system:video:edit")
|
||||||
|
@GetMapping("/edit/{id}")
|
||||||
|
public String edit(@PathVariable("id") Long id, ModelMap mmap)
|
||||||
|
{
|
||||||
|
ClewVideo clewVideo = clewVideoService.selectClewVideoById(id);
|
||||||
|
mmap.put("clewVideo", clewVideo);
|
||||||
|
return prefix + "/edit";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改保存线索视频
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("system:video:edit")
|
||||||
|
@Log(title = "线索视频", businessType = BusinessType.UPDATE)
|
||||||
|
@PostMapping("/edit")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult editSave(ClewVideo clewVideo)
|
||||||
|
{
|
||||||
|
return toAjax(clewVideoService.updateClewVideo(clewVideo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除线索视频
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("system:video:remove")
|
||||||
|
@Log(title = "线索视频", businessType = BusinessType.DELETE)
|
||||||
|
@PostMapping( "/remove")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult remove(String ids)
|
||||||
|
{
|
||||||
|
return toAjax(clewVideoService.deleteClewVideoByIds(ids));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,63 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||||
|
<head>
|
||||||
|
<th:block th:include="include :: header('新增线索图片')" />
|
||||||
|
<th:block th:include="include :: bootstrap-fileinput-css"/>
|
||||||
|
</head>
|
||||||
|
<body class="white-bg">
|
||||||
|
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||||
|
<form class="form-horizontal m" id="form-img-add">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">图片链接:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="imgUrl" type="text" value="" hidden>
|
||||||
|
<input type="file" name="imgUrlImg" id="imgUrlImg" multiple class="file" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">备注:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="remark" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<th:block th:include="include :: footer" />
|
||||||
|
<th:block th:include="include :: bootstrap-fileinput-js"/>
|
||||||
|
<script th:inline="javascript">
|
||||||
|
var prefix = ctx + "system/img"
|
||||||
|
$("#form-img-add").validate({
|
||||||
|
focusCleanup: true
|
||||||
|
});
|
||||||
|
|
||||||
|
// 素材logo
|
||||||
|
$('#imgUrlImg').fileinput({
|
||||||
|
language: 'zh', //设置语言
|
||||||
|
dropZoneEnabled: false, //是否显示拖拽区域
|
||||||
|
showPreview: false,
|
||||||
|
uploadExtraData: {
|
||||||
|
"name": "imgUrlImg"
|
||||||
|
},
|
||||||
|
dropZoneTitle: "可以将图片拖放到这里", //拖拽区域显示文字
|
||||||
|
uploadUrl: ctx + 'tool/qiniu/upload', //上传路径
|
||||||
|
allowedFileExtensions: ['jpg', 'png', 'gif', 'jpeg'], //指定上传文件类型
|
||||||
|
maxFileSize: 0,
|
||||||
|
maxFileSize: 10240, //上传文件最大值,单位kb
|
||||||
|
uploadAsync: true, //异步上传
|
||||||
|
maxFileCount: 1 //上传文件最大个数。
|
||||||
|
}).on("fileuploaded", function(event,data) { //异步上传成功后回调
|
||||||
|
if(data.response.code === 0){
|
||||||
|
$("input[name='imgUrl']").val(data.response.url)
|
||||||
|
}else {
|
||||||
|
alert("上传失败!");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
function submitHandler() {
|
||||||
|
if ($.validate.form()) {
|
||||||
|
$.operate.save(prefix + "/add", $('#form-img-add').serialize());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
@ -0,0 +1,38 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||||
|
<head>
|
||||||
|
<th:block th:include="include :: header('修改线索图片')" />
|
||||||
|
</head>
|
||||||
|
<body class="white-bg">
|
||||||
|
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||||
|
<form class="form-horizontal m" id="form-img-edit" th:object="${clewImg}">
|
||||||
|
<input name="id" th:field="*{id}" type="hidden">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">图片链接:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="imgUrl" th:field="*{imgUrl}" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">备注:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="remark" th:field="*{remark}" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<th:block th:include="include :: footer" />
|
||||||
|
<script th:inline="javascript">
|
||||||
|
var prefix = ctx + "system/img";
|
||||||
|
$("#form-img-edit").validate({
|
||||||
|
focusCleanup: true
|
||||||
|
});
|
||||||
|
|
||||||
|
function submitHandler() {
|
||||||
|
if ($.validate.form()) {
|
||||||
|
$.operate.save(prefix + "/edit", $('#form-img-edit').serialize());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
@ -0,0 +1,90 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||||
|
<head>
|
||||||
|
<th:block th:include="include :: header('线索图片列表')" />
|
||||||
|
</head>
|
||||||
|
<body class="gray-bg">
|
||||||
|
<div class="container-div">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12 search-collapse">
|
||||||
|
<form id="formId">
|
||||||
|
<div class="select-list">
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
<label>图片链接:</label>
|
||||||
|
<input type="text" name="imgUrl"/>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a>
|
||||||
|
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="btn-group-sm" id="toolbar" role="group">
|
||||||
|
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="system:img:add">
|
||||||
|
<i class="fa fa-plus"></i> 添加
|
||||||
|
</a>
|
||||||
|
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="system:img:edit">
|
||||||
|
<i class="fa fa-edit"></i> 修改
|
||||||
|
</a>
|
||||||
|
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:img:remove">
|
||||||
|
<i class="fa fa-remove"></i> 删除
|
||||||
|
</a>
|
||||||
|
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:img:export">
|
||||||
|
<i class="fa fa-download"></i> 导出
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 select-table table-striped">
|
||||||
|
<table id="bootstrap-table"></table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<th:block th:include="include :: footer" />
|
||||||
|
<script th:inline="javascript">
|
||||||
|
var editFlag = [[${@permission.hasPermi('system:img:edit')}]];
|
||||||
|
var removeFlag = [[${@permission.hasPermi('system:img:remove')}]];
|
||||||
|
var prefix = ctx + "system/img";
|
||||||
|
|
||||||
|
$(function() {
|
||||||
|
var options = {
|
||||||
|
url: prefix + "/list",
|
||||||
|
createUrl: prefix + "/add",
|
||||||
|
updateUrl: prefix + "/edit/{id}",
|
||||||
|
removeUrl: prefix + "/remove",
|
||||||
|
exportUrl: prefix + "/export",
|
||||||
|
modalName: "线索图片",
|
||||||
|
columns: [{
|
||||||
|
checkbox: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'id',
|
||||||
|
title: '主键',
|
||||||
|
visible: false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'imgUrl',
|
||||||
|
title: '图片链接'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'remark',
|
||||||
|
title: '备注'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '操作',
|
||||||
|
align: 'center',
|
||||||
|
formatter: function(value, row, index) {
|
||||||
|
var actions = [];
|
||||||
|
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
|
||||||
|
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
|
||||||
|
return actions.join('');
|
||||||
|
}
|
||||||
|
}]
|
||||||
|
};
|
||||||
|
$.table.init(options);
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
@ -0,0 +1,105 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||||
|
<head>
|
||||||
|
<th:block th:include="include :: header('新增线索视频')" />
|
||||||
|
<th:block th:include="include :: bootstrap-fileinput-css"/>
|
||||||
|
</head>
|
||||||
|
<body class="white-bg">
|
||||||
|
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||||
|
<form class="form-horizontal m" id="form-video-add">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">视频:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="videoUrl" type="text" value="" hidden>
|
||||||
|
<input type="file" name="videoUrlImg" id="videoUrlImg" multiple class="file" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">视频封面:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="videoImg" type="text" value="" hidden>
|
||||||
|
<input type="file" name="videoImgImg" id="videoImgImg" multiple class="file" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">视频标题:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="videoTitle" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">显示时间:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="videoShowDate" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">备注:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="remark" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<th:block th:include="include :: footer" />
|
||||||
|
<th:block th:include="include :: bootstrap-fileinput-js"/>
|
||||||
|
<script th:inline="javascript">
|
||||||
|
var prefix = ctx + "system/video"
|
||||||
|
$("#form-video-add").validate({
|
||||||
|
focusCleanup: true
|
||||||
|
});
|
||||||
|
|
||||||
|
function submitHandler() {
|
||||||
|
if ($.validate.form()) {
|
||||||
|
$.operate.save(prefix + "/add", $('#form-video-add').serialize());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 封面
|
||||||
|
$('#videoImgImg').fileinput({
|
||||||
|
language: 'zh', //设置语言
|
||||||
|
dropZoneEnabled: false, //是否显示拖拽区域
|
||||||
|
showPreview: false,
|
||||||
|
uploadExtraData: {
|
||||||
|
"name": "videoImgImg"
|
||||||
|
},
|
||||||
|
dropZoneTitle: "可以将图片拖放到这里", //拖拽区域显示文字
|
||||||
|
uploadUrl: ctx + 'tool/qiniu/upload', //上传路径
|
||||||
|
allowedFileExtensions: ['jpg', 'png', 'gif', 'jpeg'], //指定上传文件类型
|
||||||
|
maxFileSize: 0,
|
||||||
|
maxFileSize: 10240, //上传文件最大值,单位kb
|
||||||
|
uploadAsync: true, //异步上传
|
||||||
|
maxFileCount: 1 //上传文件最大个数。
|
||||||
|
}).on("fileuploaded", function(event,data) { //异步上传成功后回调
|
||||||
|
if(data.response.code === 0){
|
||||||
|
$("input[name='videoImg']").val(data.response.url)
|
||||||
|
}else {
|
||||||
|
alert("上传失败!");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// 视频素材
|
||||||
|
$('#videoUrlImg').fileinput({
|
||||||
|
language: 'zh', //设置语言
|
||||||
|
dropZoneEnabled: false, //是否显示拖拽区域
|
||||||
|
showPreview: false,
|
||||||
|
uploadExtraData: {
|
||||||
|
"name": "videoUrlImg"
|
||||||
|
},
|
||||||
|
dropZoneTitle: "可以将视频拖放到这里", //拖拽区域显示文字
|
||||||
|
uploadUrl: ctx + 'tool/qiniu/upload', //上传路径
|
||||||
|
allowedFileExtensions: ['mp4', 'wmv', 'm4v', 'avi'], //指定上传文件类型
|
||||||
|
maxFileSize: 0,
|
||||||
|
maxFileSize: 204800, //上传文件最大值,单位kb
|
||||||
|
uploadAsync: true, //异步上传
|
||||||
|
maxFileCount: 1 //上传文件最大个数。
|
||||||
|
}).on("fileuploaded", function(event,data) { //异步上传成功后回调
|
||||||
|
if(data.response.code === 0){
|
||||||
|
$("input[name='videoUrl']").val(data.response.url)
|
||||||
|
}else {
|
||||||
|
alert("上传失败!");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
@ -0,0 +1,50 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||||
|
<head>
|
||||||
|
<th:block th:include="include :: header('修改线索视频')" />
|
||||||
|
</head>
|
||||||
|
<body class="white-bg">
|
||||||
|
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||||
|
<form class="form-horizontal m" id="form-video-edit" th:object="${clewVideo}">
|
||||||
|
<input name="id" th:field="*{id}" type="hidden">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">视频链接:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="videoUrl" th:field="*{videoUrl}" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">视频标题:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="videoTitle" th:field="*{videoTitle}" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">显示时间:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="videoShowDate" th:field="*{videoShowDate}" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">备注:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="remark" th:field="*{remark}" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<th:block th:include="include :: footer" />
|
||||||
|
<script th:inline="javascript">
|
||||||
|
var prefix = ctx + "system/video";
|
||||||
|
$("#form-video-edit").validate({
|
||||||
|
focusCleanup: true
|
||||||
|
});
|
||||||
|
|
||||||
|
function submitHandler() {
|
||||||
|
if ($.validate.form()) {
|
||||||
|
$.operate.save(prefix + "/edit", $('#form-video-edit').serialize());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
@ -0,0 +1,110 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||||
|
<head>
|
||||||
|
<th:block th:include="include :: header('线索视频列表')" />
|
||||||
|
</head>
|
||||||
|
<body class="gray-bg">
|
||||||
|
<div class="container-div">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12 search-collapse">
|
||||||
|
<form id="formId">
|
||||||
|
<div class="select-list">
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
<label>视频链接:</label>
|
||||||
|
<input type="text" name="videoUrl"/>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<label>视频标题:</label>
|
||||||
|
<input type="text" name="videoTitle"/>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<label>显示时间:</label>
|
||||||
|
<input type="text" name="videoShowDate"/>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a>
|
||||||
|
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="btn-group-sm" id="toolbar" role="group">
|
||||||
|
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="system:video:add">
|
||||||
|
<i class="fa fa-plus"></i> 添加
|
||||||
|
</a>
|
||||||
|
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="system:video:edit">
|
||||||
|
<i class="fa fa-edit"></i> 修改
|
||||||
|
</a>
|
||||||
|
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:video:remove">
|
||||||
|
<i class="fa fa-remove"></i> 删除
|
||||||
|
</a>
|
||||||
|
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:video:export">
|
||||||
|
<i class="fa fa-download"></i> 导出
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 select-table table-striped">
|
||||||
|
<table id="bootstrap-table"></table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<th:block th:include="include :: footer" />
|
||||||
|
<script th:inline="javascript">
|
||||||
|
var editFlag = [[${@permission.hasPermi('system:video:edit')}]];
|
||||||
|
var removeFlag = [[${@permission.hasPermi('system:video:remove')}]];
|
||||||
|
var prefix = ctx + "system/video";
|
||||||
|
|
||||||
|
$(function() {
|
||||||
|
var options = {
|
||||||
|
url: prefix + "/list",
|
||||||
|
createUrl: prefix + "/add",
|
||||||
|
updateUrl: prefix + "/edit/{id}",
|
||||||
|
removeUrl: prefix + "/remove",
|
||||||
|
exportUrl: prefix + "/export",
|
||||||
|
modalName: "线索视频",
|
||||||
|
columns: [{
|
||||||
|
checkbox: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'id',
|
||||||
|
title: '主键',
|
||||||
|
visible: false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'videoUrl',
|
||||||
|
title: '视频链接'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'videoImg',
|
||||||
|
title: '视频封面'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'videoTitle',
|
||||||
|
title: '视频标题'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'videoShowDate',
|
||||||
|
title: '显示时间'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'remark',
|
||||||
|
title: '备注'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '操作',
|
||||||
|
align: 'center',
|
||||||
|
formatter: function(value, row, index) {
|
||||||
|
var actions = [];
|
||||||
|
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
|
||||||
|
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
|
||||||
|
return actions.join('');
|
||||||
|
}
|
||||||
|
}]
|
||||||
|
};
|
||||||
|
$.table.init(options);
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
@ -298,6 +298,10 @@ public class ShiroConfig
|
||||||
filterChainDefinitionMap.put("/system/app/app/**", "anon");
|
filterChainDefinitionMap.put("/system/app/app/**", "anon");
|
||||||
// 线索接口
|
// 线索接口
|
||||||
filterChainDefinitionMap.put("/system/clew/app/**", "anon");
|
filterChainDefinitionMap.put("/system/clew/app/**", "anon");
|
||||||
|
//
|
||||||
|
filterChainDefinitionMap.put("/system/img/app/**", "anon");
|
||||||
|
//
|
||||||
|
filterChainDefinitionMap.put("/system/video/app/**", "anon");
|
||||||
// 素材接口
|
// 素材接口
|
||||||
filterChainDefinitionMap.put("/system/material/app/**", "anon");
|
filterChainDefinitionMap.put("/system/material/app/**", "anon");
|
||||||
// 退出 logout地址,shiro去清除session
|
// 退出 logout地址,shiro去清除session
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,26 @@
|
||||||
|
package com.ruoyi.system.domain;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import com.ruoyi.common.annotation.Excel;
|
||||||
|
import com.ruoyi.common.core.domain.BaseEntity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 线索图片对象 clew_img
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2023-11-06
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class ClewImg extends BaseEntity
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** 主键 */
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/** 图片链接 */
|
||||||
|
@Excel(name = "图片链接")
|
||||||
|
private String imgUrl;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -0,0 +1,36 @@
|
||||||
|
package com.ruoyi.system.domain;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import com.ruoyi.common.annotation.Excel;
|
||||||
|
import com.ruoyi.common.core.domain.BaseEntity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 线索视频对象 clew_video
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2023-11-06
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class ClewVideo extends BaseEntity
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** 主键 */
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/** 视频链接 */
|
||||||
|
@Excel(name = "视频链接")
|
||||||
|
private String videoUrl;
|
||||||
|
|
||||||
|
@Excel(name = "视频封面")
|
||||||
|
private String videoImg;
|
||||||
|
|
||||||
|
/** 视频标题 */
|
||||||
|
@Excel(name = "视频标题")
|
||||||
|
private String videoTitle;
|
||||||
|
|
||||||
|
/** 显示时间 */
|
||||||
|
@Excel(name = "显示时间")
|
||||||
|
private String videoShowDate;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,61 @@
|
||||||
|
package com.ruoyi.system.mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.ruoyi.system.domain.ClewImg;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 线索图片Mapper接口
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2023-11-06
|
||||||
|
*/
|
||||||
|
public interface ClewImgMapper
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询线索图片
|
||||||
|
*
|
||||||
|
* @param id 线索图片主键
|
||||||
|
* @return 线索图片
|
||||||
|
*/
|
||||||
|
public ClewImg selectClewImgById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询线索图片列表
|
||||||
|
*
|
||||||
|
* @param clewImg 线索图片
|
||||||
|
* @return 线索图片集合
|
||||||
|
*/
|
||||||
|
public List<ClewImg> selectClewImgList(ClewImg clewImg);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增线索图片
|
||||||
|
*
|
||||||
|
* @param clewImg 线索图片
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertClewImg(ClewImg clewImg);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改线索图片
|
||||||
|
*
|
||||||
|
* @param clewImg 线索图片
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateClewImg(ClewImg clewImg);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除线索图片
|
||||||
|
*
|
||||||
|
* @param id 线索图片主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteClewImgById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除线索图片
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的数据主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteClewImgByIds(String[] ids);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,61 @@
|
||||||
|
package com.ruoyi.system.mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.ruoyi.system.domain.ClewVideo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 线索视频Mapper接口
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2023-11-06
|
||||||
|
*/
|
||||||
|
public interface ClewVideoMapper
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询线索视频
|
||||||
|
*
|
||||||
|
* @param id 线索视频主键
|
||||||
|
* @return 线索视频
|
||||||
|
*/
|
||||||
|
public ClewVideo selectClewVideoById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询线索视频列表
|
||||||
|
*
|
||||||
|
* @param clewVideo 线索视频
|
||||||
|
* @return 线索视频集合
|
||||||
|
*/
|
||||||
|
public List<ClewVideo> selectClewVideoList(ClewVideo clewVideo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增线索视频
|
||||||
|
*
|
||||||
|
* @param clewVideo 线索视频
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertClewVideo(ClewVideo clewVideo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改线索视频
|
||||||
|
*
|
||||||
|
* @param clewVideo 线索视频
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateClewVideo(ClewVideo clewVideo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除线索视频
|
||||||
|
*
|
||||||
|
* @param id 线索视频主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteClewVideoById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除线索视频
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的数据主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteClewVideoByIds(String[] ids);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,61 @@
|
||||||
|
package com.ruoyi.system.service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.ruoyi.system.domain.ClewImg;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 线索图片Service接口
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2023-11-06
|
||||||
|
*/
|
||||||
|
public interface IClewImgService
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询线索图片
|
||||||
|
*
|
||||||
|
* @param id 线索图片主键
|
||||||
|
* @return 线索图片
|
||||||
|
*/
|
||||||
|
public ClewImg selectClewImgById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询线索图片列表
|
||||||
|
*
|
||||||
|
* @param clewImg 线索图片
|
||||||
|
* @return 线索图片集合
|
||||||
|
*/
|
||||||
|
public List<ClewImg> selectClewImgList(ClewImg clewImg);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增线索图片
|
||||||
|
*
|
||||||
|
* @param clewImg 线索图片
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertClewImg(ClewImg clewImg);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改线索图片
|
||||||
|
*
|
||||||
|
* @param clewImg 线索图片
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateClewImg(ClewImg clewImg);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除线索图片
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的线索图片主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteClewImgByIds(String ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除线索图片信息
|
||||||
|
*
|
||||||
|
* @param id 线索图片主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteClewImgById(Long id);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,61 @@
|
||||||
|
package com.ruoyi.system.service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.ruoyi.system.domain.ClewVideo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 线索视频Service接口
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2023-11-06
|
||||||
|
*/
|
||||||
|
public interface IClewVideoService
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询线索视频
|
||||||
|
*
|
||||||
|
* @param id 线索视频主键
|
||||||
|
* @return 线索视频
|
||||||
|
*/
|
||||||
|
public ClewVideo selectClewVideoById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询线索视频列表
|
||||||
|
*
|
||||||
|
* @param clewVideo 线索视频
|
||||||
|
* @return 线索视频集合
|
||||||
|
*/
|
||||||
|
public List<ClewVideo> selectClewVideoList(ClewVideo clewVideo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增线索视频
|
||||||
|
*
|
||||||
|
* @param clewVideo 线索视频
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertClewVideo(ClewVideo clewVideo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改线索视频
|
||||||
|
*
|
||||||
|
* @param clewVideo 线索视频
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateClewVideo(ClewVideo clewVideo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除线索视频
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的线索视频主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteClewVideoByIds(String ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除线索视频信息
|
||||||
|
*
|
||||||
|
* @param id 线索视频主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteClewVideoById(Long id);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,97 @@
|
||||||
|
package com.ruoyi.system.service.impl;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.ruoyi.common.utils.DateUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import com.ruoyi.system.mapper.ClewImgMapper;
|
||||||
|
import com.ruoyi.system.domain.ClewImg;
|
||||||
|
import com.ruoyi.system.service.IClewImgService;
|
||||||
|
import com.ruoyi.common.core.text.Convert;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 线索图片Service业务层处理
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2023-11-06
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class ClewImgServiceImpl implements IClewImgService
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private ClewImgMapper clewImgMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询线索图片
|
||||||
|
*
|
||||||
|
* @param id 线索图片主键
|
||||||
|
* @return 线索图片
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ClewImg selectClewImgById(Long id)
|
||||||
|
{
|
||||||
|
return clewImgMapper.selectClewImgById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询线索图片列表
|
||||||
|
*
|
||||||
|
* @param clewImg 线索图片
|
||||||
|
* @return 线索图片
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<ClewImg> selectClewImgList(ClewImg clewImg)
|
||||||
|
{
|
||||||
|
return clewImgMapper.selectClewImgList(clewImg);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增线索图片
|
||||||
|
*
|
||||||
|
* @param clewImg 线索图片
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int insertClewImg(ClewImg clewImg)
|
||||||
|
{
|
||||||
|
clewImg.setCreateTime(DateUtils.getNowDate());
|
||||||
|
return clewImgMapper.insertClewImg(clewImg);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改线索图片
|
||||||
|
*
|
||||||
|
* @param clewImg 线索图片
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int updateClewImg(ClewImg clewImg)
|
||||||
|
{
|
||||||
|
clewImg.setUpdateTime(DateUtils.getNowDate());
|
||||||
|
return clewImgMapper.updateClewImg(clewImg);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除线索图片
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的线索图片主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteClewImgByIds(String ids)
|
||||||
|
{
|
||||||
|
return clewImgMapper.deleteClewImgByIds(Convert.toStrArray(ids));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除线索图片信息
|
||||||
|
*
|
||||||
|
* @param id 线索图片主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteClewImgById(Long id)
|
||||||
|
{
|
||||||
|
return clewImgMapper.deleteClewImgById(id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,97 @@
|
||||||
|
package com.ruoyi.system.service.impl;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.ruoyi.common.utils.DateUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import com.ruoyi.system.mapper.ClewVideoMapper;
|
||||||
|
import com.ruoyi.system.domain.ClewVideo;
|
||||||
|
import com.ruoyi.system.service.IClewVideoService;
|
||||||
|
import com.ruoyi.common.core.text.Convert;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 线索视频Service业务层处理
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2023-11-06
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class ClewVideoServiceImpl implements IClewVideoService
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private ClewVideoMapper clewVideoMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询线索视频
|
||||||
|
*
|
||||||
|
* @param id 线索视频主键
|
||||||
|
* @return 线索视频
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ClewVideo selectClewVideoById(Long id)
|
||||||
|
{
|
||||||
|
return clewVideoMapper.selectClewVideoById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询线索视频列表
|
||||||
|
*
|
||||||
|
* @param clewVideo 线索视频
|
||||||
|
* @return 线索视频
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<ClewVideo> selectClewVideoList(ClewVideo clewVideo)
|
||||||
|
{
|
||||||
|
return clewVideoMapper.selectClewVideoList(clewVideo);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增线索视频
|
||||||
|
*
|
||||||
|
* @param clewVideo 线索视频
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int insertClewVideo(ClewVideo clewVideo)
|
||||||
|
{
|
||||||
|
clewVideo.setCreateTime(DateUtils.getNowDate());
|
||||||
|
return clewVideoMapper.insertClewVideo(clewVideo);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改线索视频
|
||||||
|
*
|
||||||
|
* @param clewVideo 线索视频
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int updateClewVideo(ClewVideo clewVideo)
|
||||||
|
{
|
||||||
|
clewVideo.setUpdateTime(DateUtils.getNowDate());
|
||||||
|
return clewVideoMapper.updateClewVideo(clewVideo);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除线索视频
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的线索视频主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteClewVideoByIds(String ids)
|
||||||
|
{
|
||||||
|
return clewVideoMapper.deleteClewVideoByIds(Convert.toStrArray(ids));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除线索视频信息
|
||||||
|
*
|
||||||
|
* @param id 线索视频主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteClewVideoById(Long id)
|
||||||
|
{
|
||||||
|
return clewVideoMapper.deleteClewVideoById(id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,77 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE mapper
|
||||||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.ruoyi.system.mapper.ClewImgMapper">
|
||||||
|
|
||||||
|
<resultMap type="ClewImg" id="ClewImgResult">
|
||||||
|
<result property="id" column="id" />
|
||||||
|
<result property="imgUrl" column="img_url" />
|
||||||
|
<result property="createTime" column="create_time" />
|
||||||
|
<result property="createBy" column="create_by" />
|
||||||
|
<result property="updateTime" column="update_time" />
|
||||||
|
<result property="updateBy" column="update_by" />
|
||||||
|
<result property="remark" column="remark" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="selectClewImgVo">
|
||||||
|
select id, img_url, create_time, create_by, update_time, update_by, remark from clew_img
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectClewImgList" parameterType="ClewImg" resultMap="ClewImgResult">
|
||||||
|
<include refid="selectClewImgVo"/>
|
||||||
|
<where>
|
||||||
|
<if test="imgUrl != null and imgUrl != ''"> and img_url = #{imgUrl}</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectClewImgById" parameterType="Long" resultMap="ClewImgResult">
|
||||||
|
<include refid="selectClewImgVo"/>
|
||||||
|
where id = #{id}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertClewImg" parameterType="ClewImg" useGeneratedKeys="true" keyProperty="id">
|
||||||
|
insert into clew_img
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="imgUrl != null">img_url,</if>
|
||||||
|
<if test="createTime != null">create_time,</if>
|
||||||
|
<if test="createBy != null">create_by,</if>
|
||||||
|
<if test="updateTime != null">update_time,</if>
|
||||||
|
<if test="updateBy != null">update_by,</if>
|
||||||
|
<if test="remark != null">remark,</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="imgUrl != null">#{imgUrl},</if>
|
||||||
|
<if test="createTime != null">#{createTime},</if>
|
||||||
|
<if test="createBy != null">#{createBy},</if>
|
||||||
|
<if test="updateTime != null">#{updateTime},</if>
|
||||||
|
<if test="updateBy != null">#{updateBy},</if>
|
||||||
|
<if test="remark != null">#{remark},</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="updateClewImg" parameterType="ClewImg">
|
||||||
|
update clew_img
|
||||||
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="imgUrl != null">img_url = #{imgUrl},</if>
|
||||||
|
<if test="createTime != null">create_time = #{createTime},</if>
|
||||||
|
<if test="createBy != null">create_by = #{createBy},</if>
|
||||||
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||||
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||||
|
<if test="remark != null">remark = #{remark},</if>
|
||||||
|
</trim>
|
||||||
|
where id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<delete id="deleteClewImgById" parameterType="Long">
|
||||||
|
delete from clew_img where id = #{id}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteClewImgByIds" parameterType="String">
|
||||||
|
delete from clew_img where id in
|
||||||
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
|
|
@ -0,0 +1,91 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE mapper
|
||||||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.ruoyi.system.mapper.ClewVideoMapper">
|
||||||
|
|
||||||
|
<resultMap type="ClewVideo" id="ClewVideoResult">
|
||||||
|
<result property="id" column="id" />
|
||||||
|
<result property="videoUrl" column="video_url" />
|
||||||
|
<result property="videoImg" column="video_img" />
|
||||||
|
<result property="videoTitle" column="video_title" />
|
||||||
|
<result property="videoShowDate" column="video_show_date" />
|
||||||
|
<result property="createTime" column="create_time" />
|
||||||
|
<result property="createBy" column="create_by" />
|
||||||
|
<result property="updateTime" column="update_time" />
|
||||||
|
<result property="updateBy" column="update_by" />
|
||||||
|
<result property="remark" column="remark" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="selectClewVideoVo">
|
||||||
|
select id, video_url, video_img, video_title, video_show_date, create_time, create_by, update_time, update_by, remark from clew_video
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectClewVideoList" parameterType="ClewVideo" resultMap="ClewVideoResult">
|
||||||
|
<include refid="selectClewVideoVo"/>
|
||||||
|
<where>
|
||||||
|
<if test="videoUrl != null and videoUrl != ''"> and video_url = #{videoUrl}</if>
|
||||||
|
<if test="videoTitle != null and videoTitle != ''"> and video_title = #{videoTitle}</if>
|
||||||
|
<if test="videoShowDate != null and videoShowDate != ''"> and video_show_date = #{videoShowDate}</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectClewVideoById" parameterType="Long" resultMap="ClewVideoResult">
|
||||||
|
<include refid="selectClewVideoVo"/>
|
||||||
|
where id = #{id}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertClewVideo" parameterType="ClewVideo" useGeneratedKeys="true" keyProperty="id">
|
||||||
|
insert into clew_video
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="videoUrl != null">video_url,</if>
|
||||||
|
<if test="videoImg != null">video_img,</if>
|
||||||
|
<if test="videoTitle != null">video_title,</if>
|
||||||
|
<if test="videoShowDate != null">video_show_date,</if>
|
||||||
|
<if test="createTime != null">create_time,</if>
|
||||||
|
<if test="createBy != null">create_by,</if>
|
||||||
|
<if test="updateTime != null">update_time,</if>
|
||||||
|
<if test="updateBy != null">update_by,</if>
|
||||||
|
<if test="remark != null">remark,</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="videoUrl != null">#{videoUrl},</if>
|
||||||
|
<if test="videoImg != null">#{videoImg},</if>
|
||||||
|
<if test="videoTitle != null">#{videoTitle},</if>
|
||||||
|
<if test="videoShowDate != null">#{videoShowDate},</if>
|
||||||
|
<if test="createTime != null">#{createTime},</if>
|
||||||
|
<if test="createBy != null">#{createBy},</if>
|
||||||
|
<if test="updateTime != null">#{updateTime},</if>
|
||||||
|
<if test="updateBy != null">#{updateBy},</if>
|
||||||
|
<if test="remark != null">#{remark},</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="updateClewVideo" parameterType="ClewVideo">
|
||||||
|
update clew_video
|
||||||
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="videoUrl != null">video_url = #{videoUrl},</if>
|
||||||
|
<if test="videoImg != null">video_img = #{videoImg},</if>
|
||||||
|
<if test="videoTitle != null">video_title = #{videoTitle},</if>
|
||||||
|
<if test="videoShowDate != null">video_show_date = #{videoShowDate},</if>
|
||||||
|
<if test="createTime != null">create_time = #{createTime},</if>
|
||||||
|
<if test="createBy != null">create_by = #{createBy},</if>
|
||||||
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||||
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||||
|
<if test="remark != null">remark = #{remark},</if>
|
||||||
|
</trim>
|
||||||
|
where id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<delete id="deleteClewVideoById" parameterType="Long">
|
||||||
|
delete from clew_video where id = #{id}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteClewVideoByIds" parameterType="String">
|
||||||
|
delete from clew_video where id in
|
||||||
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
Loading…
Reference in New Issue