20200525-zlp-1
培训
This commit is contained in:
parent
43d425e94d
commit
8fab73eb25
@ -63,6 +63,7 @@
|
||||
"screenfull": "4.2.0",
|
||||
"sortablejs": "1.8.4",
|
||||
"v-distpicker": "^1.2.2",
|
||||
"video.js": "^7.7.6",
|
||||
"vue": "2.6.10",
|
||||
"vue-count-to": "1.0.13",
|
||||
"vue-cropper": "0.4.9",
|
||||
|
@ -21,6 +21,9 @@ import { getConfigKey } from "@/api/system/config";
|
||||
import { parseTime, resetForm, addDateRange, selectDictLabel, download, handleTree } from "@/utils/ruoyi";
|
||||
import Pagination from "@/components/Pagination";
|
||||
|
||||
import Video from 'video.js'
|
||||
import 'video.js/dist/video-js.css'
|
||||
|
||||
// 全局方法挂载
|
||||
Vue.prototype.getDicts = getDicts
|
||||
Vue.prototype.getConfigKey = getConfigKey
|
||||
@ -31,6 +34,8 @@ Vue.prototype.selectDictLabel = selectDictLabel
|
||||
Vue.prototype.download = download
|
||||
Vue.prototype.handleTree = handleTree
|
||||
|
||||
Vue.prototype.$video = Video
|
||||
|
||||
Vue.prototype.msgSuccess = function (msg) {
|
||||
this.$message({ showClose: true, message: msg, type: "success" });
|
||||
}
|
||||
|
@ -90,30 +90,30 @@ export const constantRoutes = [{
|
||||
meta: { title: '字典数据', icon: '' }
|
||||
}]
|
||||
},
|
||||
{
|
||||
path: '/dayflow',
|
||||
component: Layout,
|
||||
hidden: true,
|
||||
children: [{
|
||||
path: 'dayflowmanger/dayflowtask/:id(\\d+)',
|
||||
component: () =>
|
||||
import ('@/views/benyi/dayflow/task'),
|
||||
name: 'Task',
|
||||
meta: { title: '一日流程任务', icon: '' }
|
||||
}]
|
||||
},
|
||||
{
|
||||
path: '/dayflow',
|
||||
component: Layout,
|
||||
hidden: true,
|
||||
children: [{
|
||||
path: 'dayflowmanger/dayflowtask/standard/:code(\\d+)',
|
||||
component: () =>
|
||||
import ('@/views/benyi/dayflow/standard'),
|
||||
name: 'Standard',
|
||||
meta: { title: '一日流程标准', icon: '' }
|
||||
}]
|
||||
},
|
||||
// {
|
||||
// path: '/dayflow',
|
||||
// component: Layout,
|
||||
// hidden: true,
|
||||
// children: [{
|
||||
// path: 'dayflowmanger/dayflowtask/:id(\\d+)',
|
||||
// component: () =>
|
||||
// import ('@/views/benyi/dayflow/task'),
|
||||
// name: 'Task',
|
||||
// meta: { title: '一日流程任务', icon: '' }
|
||||
// }]
|
||||
// },
|
||||
// {
|
||||
// path: '/dayflow',
|
||||
// component: Layout,
|
||||
// hidden: true,
|
||||
// children: [{
|
||||
// path: 'dayflowmanger/dayflowtask/standard/:code(\\d+)',
|
||||
// component: () =>
|
||||
// import ('@/views/benyi/dayflow/standard'),
|
||||
// name: 'Standard',
|
||||
// meta: { title: '一日流程标准', icon: '' }
|
||||
// }]
|
||||
// },
|
||||
{
|
||||
path: '/job',
|
||||
component: Layout,
|
||||
|
@ -18,11 +18,11 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="32">
|
||||
<el-calendar v-model="value" id="calendar">
|
||||
<!-- <el-calendar v-model="value" id="calendar">-->
|
||||
<!-- 这里使用的是 2.5 slot 语法,对于新项目请使用 2.6 slot 语法-->
|
||||
<template slot="dateCell" slot-scope="{date, data}">
|
||||
<!--<template slot="dateCell" slot-scope="{date, data}">-->
|
||||
<!--自定义内容-->
|
||||
<div>
|
||||
<!--<div>
|
||||
<div class="calendar-day">{{ data.day.split('-').slice(2).join('-') }}</div>
|
||||
<div v-for="(item,index) in calendarData" :key="index">
|
||||
<div v-if="(item.years).indexOf(data.day.split('-').slice(0)[0])!=-1">
|
||||
@ -40,7 +40,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</el-calendar>
|
||||
</el-calendar> -->
|
||||
</el-row>
|
||||
</div>
|
||||
</template>
|
||||
@ -49,7 +49,7 @@
|
||||
import RaddarChart from "./dashboard/RaddarChart";
|
||||
import PieChart from "./dashboard/PieChart";
|
||||
import BarChart from "./dashboard/BarChart";
|
||||
import { getSchoolCalendars } from "@/api/benyi/schoolcalendar";
|
||||
//import { getSchoolCalendars } from "@/api/benyi/schoolcalendar";
|
||||
//备用进行班级园历显示操作import { getSchoolCalendarsClass } from "@/api/benyi/schoolcalendarclass";
|
||||
|
||||
export default {
|
||||
@ -69,15 +69,15 @@ export default {
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getSchoolCalendarList();
|
||||
//this.getSchoolCalendarList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询园历列表 */
|
||||
getSchoolCalendarList() {
|
||||
getSchoolCalendars(this.queryParams).then(response => {
|
||||
this.calendarData = response.calendarData;
|
||||
});
|
||||
}
|
||||
// getSchoolCalendarList() {
|
||||
// getSchoolCalendars(this.queryParams).then(response => {
|
||||
// this.calendarData = response.calendarData;
|
||||
// });
|
||||
// }
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
@ -0,0 +1,108 @@
|
||||
package com.ruoyi.project.benyi.controller;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
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.RestController;
|
||||
import com.ruoyi.framework.aspectj.lang.annotation.Log;
|
||||
import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
|
||||
import com.ruoyi.project.benyi.domain.ByLecturer;
|
||||
import com.ruoyi.project.benyi.service.IByLecturerService;
|
||||
import com.ruoyi.framework.web.controller.BaseController;
|
||||
import com.ruoyi.framework.web.domain.AjaxResult;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.framework.web.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 讲师Controller
|
||||
*
|
||||
* @author tsbz
|
||||
* @date 2020-05-25
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/benyi/lecturer")
|
||||
public class ByLecturerController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IByLecturerService byLecturerService;
|
||||
|
||||
/**
|
||||
* 查询讲师列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('benyi:lecturer:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(ByLecturer byLecturer)
|
||||
{
|
||||
startPage();
|
||||
List<ByLecturer> list = byLecturerService.selectByLecturerList(byLecturer);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出讲师列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('benyi:lecturer:export')")
|
||||
@Log(title = "讲师", businessType = BusinessType.EXPORT)
|
||||
@GetMapping("/export")
|
||||
public AjaxResult export(ByLecturer byLecturer)
|
||||
{
|
||||
List<ByLecturer> list = byLecturerService.selectByLecturerList(byLecturer);
|
||||
ExcelUtil<ByLecturer> util = new ExcelUtil<ByLecturer>(ByLecturer.class);
|
||||
return util.exportExcel(list, "lecturer");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取讲师详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('benyi:lecturer:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return AjaxResult.success(byLecturerService.selectByLecturerById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增讲师
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('benyi:lecturer:add')")
|
||||
@Log(title = "讲师", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody ByLecturer byLecturer)
|
||||
{
|
||||
byLecturer.setCreatetime(new Date());
|
||||
byLecturer.setCreateuserid(SecurityUtils.getLoginUser().getUser().getUserId());
|
||||
return toAjax(byLecturerService.insertByLecturer(byLecturer));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改讲师
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('benyi:lecturer:edit')")
|
||||
@Log(title = "讲师", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody ByLecturer byLecturer)
|
||||
{
|
||||
return toAjax(byLecturerService.updateByLecturer(byLecturer));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除讲师
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('benyi:lecturer:remove')")
|
||||
@Log(title = "讲师", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(byLecturerService.deleteByLecturerByIds(ids));
|
||||
}
|
||||
}
|
@ -0,0 +1,103 @@
|
||||
package com.ruoyi.project.benyi.controller;
|
||||
|
||||
import java.util.List;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
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.RestController;
|
||||
import com.ruoyi.framework.aspectj.lang.annotation.Log;
|
||||
import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
|
||||
import com.ruoyi.project.benyi.domain.ByTrainVideo;
|
||||
import com.ruoyi.project.benyi.service.IByTrainVideoService;
|
||||
import com.ruoyi.framework.web.controller.BaseController;
|
||||
import com.ruoyi.framework.web.domain.AjaxResult;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.framework.web.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 培训Controller
|
||||
*
|
||||
* @author tsbz
|
||||
* @date 2020-05-25
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/benyi/video")
|
||||
public class ByTrainVideoController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IByTrainVideoService byTrainVideoService;
|
||||
|
||||
/**
|
||||
* 查询培训列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('benyi:video:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(ByTrainVideo byTrainVideo)
|
||||
{
|
||||
startPage();
|
||||
List<ByTrainVideo> list = byTrainVideoService.selectByTrainVideoList(byTrainVideo);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出培训列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('benyi:video:export')")
|
||||
@Log(title = "培训", businessType = BusinessType.EXPORT)
|
||||
@GetMapping("/export")
|
||||
public AjaxResult export(ByTrainVideo byTrainVideo)
|
||||
{
|
||||
List<ByTrainVideo> list = byTrainVideoService.selectByTrainVideoList(byTrainVideo);
|
||||
ExcelUtil<ByTrainVideo> util = new ExcelUtil<ByTrainVideo>(ByTrainVideo.class);
|
||||
return util.exportExcel(list, "video");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取培训详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('benyi:video:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return AjaxResult.success(byTrainVideoService.selectByTrainVideoById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增培训
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('benyi:video:add')")
|
||||
@Log(title = "培训", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody ByTrainVideo byTrainVideo)
|
||||
{
|
||||
return toAjax(byTrainVideoService.insertByTrainVideo(byTrainVideo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改培训
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('benyi:video:edit')")
|
||||
@Log(title = "培训", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody ByTrainVideo byTrainVideo)
|
||||
{
|
||||
return toAjax(byTrainVideoService.updateByTrainVideo(byTrainVideo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除培训
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('benyi:video:remove')")
|
||||
@Log(title = "培训", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(byTrainVideoService.deleteByTrainVideoByIds(ids));
|
||||
}
|
||||
}
|
@ -0,0 +1,111 @@
|
||||
package com.ruoyi.project.benyi.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.framework.aspectj.lang.annotation.Excel;
|
||||
import com.ruoyi.framework.web.domain.BaseEntity;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 讲师对象 by_lecturer
|
||||
*
|
||||
* @author tsbz
|
||||
* @date 2020-05-25
|
||||
*/
|
||||
public class ByLecturer extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 编号 */
|
||||
private Long id;
|
||||
|
||||
/** 姓名 */
|
||||
@Excel(name = "姓名")
|
||||
private String name;
|
||||
|
||||
/** 简介 */
|
||||
@Excel(name = "简介")
|
||||
private String information;
|
||||
|
||||
/** 照片 */
|
||||
@Excel(name = "照片")
|
||||
private String imgurl;
|
||||
|
||||
/** 创建人 */
|
||||
@Excel(name = "创建人")
|
||||
private Long createuserid;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date createtime;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setName(String name)
|
||||
{
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getName()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
public void setInformation(String information)
|
||||
{
|
||||
this.information = information;
|
||||
}
|
||||
|
||||
public String getInformation()
|
||||
{
|
||||
return information;
|
||||
}
|
||||
public void setImgurl(String imgurl)
|
||||
{
|
||||
this.imgurl = imgurl;
|
||||
}
|
||||
|
||||
public String getImgurl()
|
||||
{
|
||||
return imgurl;
|
||||
}
|
||||
public void setCreateuserid(Long createuserid)
|
||||
{
|
||||
this.createuserid = createuserid;
|
||||
}
|
||||
|
||||
public Long getCreateuserid()
|
||||
{
|
||||
return createuserid;
|
||||
}
|
||||
|
||||
public void setCreatetime(Date createtime) {
|
||||
this.createtime = createtime;
|
||||
}
|
||||
|
||||
public Date getCreatetime() {
|
||||
return createtime;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("name", getName())
|
||||
.append("information", getInformation())
|
||||
.append("imgurl", getImgurl())
|
||||
.append("createuserid", getCreateuserid())
|
||||
.append("createtime", getCreatetime())
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,153 @@
|
||||
package com.ruoyi.project.benyi.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.framework.aspectj.lang.annotation.Excel;
|
||||
import com.ruoyi.framework.web.domain.BaseEntity;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 培训对象 by_train_video
|
||||
*
|
||||
* @author tsbz
|
||||
* @date 2020-05-25
|
||||
*/
|
||||
public class ByTrainVideo extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 编号 */
|
||||
private Long id;
|
||||
|
||||
/** 培训视频标题 */
|
||||
@Excel(name = "培训视频标题")
|
||||
private String title;
|
||||
|
||||
/** 简介 */
|
||||
@Excel(name = "简介")
|
||||
private String information;
|
||||
|
||||
/** 讲师 */
|
||||
@Excel(name = "讲师")
|
||||
private String lecturer;
|
||||
|
||||
/** 视频路径 */
|
||||
@Excel(name = "视频路径")
|
||||
private String videourl;
|
||||
|
||||
/** 所属类别 */
|
||||
@Excel(name = "所属类别")
|
||||
private String type;
|
||||
|
||||
/** 适用班级 */
|
||||
@Excel(name = "适用班级")
|
||||
private String classtype;
|
||||
|
||||
/** 上传人员 */
|
||||
@Excel(name = "上传人员")
|
||||
private Long createuserid;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date createtime;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setTitle(String title)
|
||||
{
|
||||
this.title = title;
|
||||
}
|
||||
|
||||
public String getTitle()
|
||||
{
|
||||
return title;
|
||||
}
|
||||
public void setInformation(String information)
|
||||
{
|
||||
this.information = information;
|
||||
}
|
||||
|
||||
public String getInformation()
|
||||
{
|
||||
return information;
|
||||
}
|
||||
public void setLecturer(String lecturer)
|
||||
{
|
||||
this.lecturer = lecturer;
|
||||
}
|
||||
|
||||
public String getLecturer()
|
||||
{
|
||||
return lecturer;
|
||||
}
|
||||
public void setVideourl(String videourl)
|
||||
{
|
||||
this.videourl = videourl;
|
||||
}
|
||||
|
||||
public String getVideourl()
|
||||
{
|
||||
return videourl;
|
||||
}
|
||||
public void setType(String type)
|
||||
{
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public String getType()
|
||||
{
|
||||
return type;
|
||||
}
|
||||
public void setClasstype(String classtype)
|
||||
{
|
||||
this.classtype = classtype;
|
||||
}
|
||||
|
||||
public String getClasstype()
|
||||
{
|
||||
return classtype;
|
||||
}
|
||||
public void setCreateuserid(Long createuserid)
|
||||
{
|
||||
this.createuserid = createuserid;
|
||||
}
|
||||
|
||||
public Long getCreateuserid()
|
||||
{
|
||||
return createuserid;
|
||||
}
|
||||
|
||||
public void setCreatetime(Date createtime) {
|
||||
this.createtime = createtime;
|
||||
}
|
||||
|
||||
public Date getCreatetime() {
|
||||
return createtime;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("title", getTitle())
|
||||
.append("information", getInformation())
|
||||
.append("lecturer", getLecturer())
|
||||
.append("videourl", getVideourl())
|
||||
.append("type", getType())
|
||||
.append("classtype", getClasstype())
|
||||
.append("createuserid", getCreateuserid())
|
||||
.append("createtime", getCreatetime())
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.project.benyi.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.project.benyi.domain.ByLecturer;
|
||||
|
||||
/**
|
||||
* 讲师Mapper接口
|
||||
*
|
||||
* @author tsbz
|
||||
* @date 2020-05-25
|
||||
*/
|
||||
public interface ByLecturerMapper
|
||||
{
|
||||
/**
|
||||
* 查询讲师
|
||||
*
|
||||
* @param id 讲师ID
|
||||
* @return 讲师
|
||||
*/
|
||||
public ByLecturer selectByLecturerById(Long id);
|
||||
|
||||
/**
|
||||
* 查询讲师列表
|
||||
*
|
||||
* @param byLecturer 讲师
|
||||
* @return 讲师集合
|
||||
*/
|
||||
public List<ByLecturer> selectByLecturerList(ByLecturer byLecturer);
|
||||
|
||||
/**
|
||||
* 新增讲师
|
||||
*
|
||||
* @param byLecturer 讲师
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertByLecturer(ByLecturer byLecturer);
|
||||
|
||||
/**
|
||||
* 修改讲师
|
||||
*
|
||||
* @param byLecturer 讲师
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateByLecturer(ByLecturer byLecturer);
|
||||
|
||||
/**
|
||||
* 删除讲师
|
||||
*
|
||||
* @param id 讲师ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteByLecturerById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除讲师
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteByLecturerByIds(Long[] ids);
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.project.benyi.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.project.benyi.domain.ByTrainVideo;
|
||||
|
||||
/**
|
||||
* 培训Mapper接口
|
||||
*
|
||||
* @author tsbz
|
||||
* @date 2020-05-25
|
||||
*/
|
||||
public interface ByTrainVideoMapper
|
||||
{
|
||||
/**
|
||||
* 查询培训
|
||||
*
|
||||
* @param id 培训ID
|
||||
* @return 培训
|
||||
*/
|
||||
public ByTrainVideo selectByTrainVideoById(Long id);
|
||||
|
||||
/**
|
||||
* 查询培训列表
|
||||
*
|
||||
* @param byTrainVideo 培训
|
||||
* @return 培训集合
|
||||
*/
|
||||
public List<ByTrainVideo> selectByTrainVideoList(ByTrainVideo byTrainVideo);
|
||||
|
||||
/**
|
||||
* 新增培训
|
||||
*
|
||||
* @param byTrainVideo 培训
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertByTrainVideo(ByTrainVideo byTrainVideo);
|
||||
|
||||
/**
|
||||
* 修改培训
|
||||
*
|
||||
* @param byTrainVideo 培训
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateByTrainVideo(ByTrainVideo byTrainVideo);
|
||||
|
||||
/**
|
||||
* 删除培训
|
||||
*
|
||||
* @param id 培训ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteByTrainVideoById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除培训
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteByTrainVideoByIds(Long[] ids);
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.project.benyi.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.project.benyi.domain.ByLecturer;
|
||||
|
||||
/**
|
||||
* 讲师Service接口
|
||||
*
|
||||
* @author tsbz
|
||||
* @date 2020-05-25
|
||||
*/
|
||||
public interface IByLecturerService
|
||||
{
|
||||
/**
|
||||
* 查询讲师
|
||||
*
|
||||
* @param id 讲师ID
|
||||
* @return 讲师
|
||||
*/
|
||||
public ByLecturer selectByLecturerById(Long id);
|
||||
|
||||
/**
|
||||
* 查询讲师列表
|
||||
*
|
||||
* @param byLecturer 讲师
|
||||
* @return 讲师集合
|
||||
*/
|
||||
public List<ByLecturer> selectByLecturerList(ByLecturer byLecturer);
|
||||
|
||||
/**
|
||||
* 新增讲师
|
||||
*
|
||||
* @param byLecturer 讲师
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertByLecturer(ByLecturer byLecturer);
|
||||
|
||||
/**
|
||||
* 修改讲师
|
||||
*
|
||||
* @param byLecturer 讲师
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateByLecturer(ByLecturer byLecturer);
|
||||
|
||||
/**
|
||||
* 批量删除讲师
|
||||
*
|
||||
* @param ids 需要删除的讲师ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteByLecturerByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除讲师信息
|
||||
*
|
||||
* @param id 讲师ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteByLecturerById(Long id);
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.project.benyi.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.project.benyi.domain.ByTrainVideo;
|
||||
|
||||
/**
|
||||
* 培训Service接口
|
||||
*
|
||||
* @author tsbz
|
||||
* @date 2020-05-25
|
||||
*/
|
||||
public interface IByTrainVideoService
|
||||
{
|
||||
/**
|
||||
* 查询培训
|
||||
*
|
||||
* @param id 培训ID
|
||||
* @return 培训
|
||||
*/
|
||||
public ByTrainVideo selectByTrainVideoById(Long id);
|
||||
|
||||
/**
|
||||
* 查询培训列表
|
||||
*
|
||||
* @param byTrainVideo 培训
|
||||
* @return 培训集合
|
||||
*/
|
||||
public List<ByTrainVideo> selectByTrainVideoList(ByTrainVideo byTrainVideo);
|
||||
|
||||
/**
|
||||
* 新增培训
|
||||
*
|
||||
* @param byTrainVideo 培训
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertByTrainVideo(ByTrainVideo byTrainVideo);
|
||||
|
||||
/**
|
||||
* 修改培训
|
||||
*
|
||||
* @param byTrainVideo 培训
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateByTrainVideo(ByTrainVideo byTrainVideo);
|
||||
|
||||
/**
|
||||
* 批量删除培训
|
||||
*
|
||||
* @param ids 需要删除的培训ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteByTrainVideoByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除培训信息
|
||||
*
|
||||
* @param id 培训ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteByTrainVideoById(Long id);
|
||||
}
|
@ -0,0 +1,93 @@
|
||||
package com.ruoyi.project.benyi.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.project.benyi.mapper.ByLecturerMapper;
|
||||
import com.ruoyi.project.benyi.domain.ByLecturer;
|
||||
import com.ruoyi.project.benyi.service.IByLecturerService;
|
||||
|
||||
/**
|
||||
* 讲师Service业务层处理
|
||||
*
|
||||
* @author tsbz
|
||||
* @date 2020-05-25
|
||||
*/
|
||||
@Service
|
||||
public class ByLecturerServiceImpl implements IByLecturerService
|
||||
{
|
||||
@Autowired
|
||||
private ByLecturerMapper byLecturerMapper;
|
||||
|
||||
/**
|
||||
* 查询讲师
|
||||
*
|
||||
* @param id 讲师ID
|
||||
* @return 讲师
|
||||
*/
|
||||
@Override
|
||||
public ByLecturer selectByLecturerById(Long id)
|
||||
{
|
||||
return byLecturerMapper.selectByLecturerById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询讲师列表
|
||||
*
|
||||
* @param byLecturer 讲师
|
||||
* @return 讲师
|
||||
*/
|
||||
@Override
|
||||
public List<ByLecturer> selectByLecturerList(ByLecturer byLecturer)
|
||||
{
|
||||
return byLecturerMapper.selectByLecturerList(byLecturer);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增讲师
|
||||
*
|
||||
* @param byLecturer 讲师
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertByLecturer(ByLecturer byLecturer)
|
||||
{
|
||||
return byLecturerMapper.insertByLecturer(byLecturer);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改讲师
|
||||
*
|
||||
* @param byLecturer 讲师
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateByLecturer(ByLecturer byLecturer)
|
||||
{
|
||||
return byLecturerMapper.updateByLecturer(byLecturer);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除讲师
|
||||
*
|
||||
* @param ids 需要删除的讲师ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteByLecturerByIds(Long[] ids)
|
||||
{
|
||||
return byLecturerMapper.deleteByLecturerByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除讲师信息
|
||||
*
|
||||
* @param id 讲师ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteByLecturerById(Long id)
|
||||
{
|
||||
return byLecturerMapper.deleteByLecturerById(id);
|
||||
}
|
||||
}
|
@ -0,0 +1,93 @@
|
||||
package com.ruoyi.project.benyi.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.project.benyi.mapper.ByTrainVideoMapper;
|
||||
import com.ruoyi.project.benyi.domain.ByTrainVideo;
|
||||
import com.ruoyi.project.benyi.service.IByTrainVideoService;
|
||||
|
||||
/**
|
||||
* 培训Service业务层处理
|
||||
*
|
||||
* @author tsbz
|
||||
* @date 2020-05-25
|
||||
*/
|
||||
@Service
|
||||
public class ByTrainVideoServiceImpl implements IByTrainVideoService
|
||||
{
|
||||
@Autowired
|
||||
private ByTrainVideoMapper byTrainVideoMapper;
|
||||
|
||||
/**
|
||||
* 查询培训
|
||||
*
|
||||
* @param id 培训ID
|
||||
* @return 培训
|
||||
*/
|
||||
@Override
|
||||
public ByTrainVideo selectByTrainVideoById(Long id)
|
||||
{
|
||||
return byTrainVideoMapper.selectByTrainVideoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询培训列表
|
||||
*
|
||||
* @param byTrainVideo 培训
|
||||
* @return 培训
|
||||
*/
|
||||
@Override
|
||||
public List<ByTrainVideo> selectByTrainVideoList(ByTrainVideo byTrainVideo)
|
||||
{
|
||||
return byTrainVideoMapper.selectByTrainVideoList(byTrainVideo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增培训
|
||||
*
|
||||
* @param byTrainVideo 培训
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertByTrainVideo(ByTrainVideo byTrainVideo)
|
||||
{
|
||||
return byTrainVideoMapper.insertByTrainVideo(byTrainVideo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改培训
|
||||
*
|
||||
* @param byTrainVideo 培训
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateByTrainVideo(ByTrainVideo byTrainVideo)
|
||||
{
|
||||
return byTrainVideoMapper.updateByTrainVideo(byTrainVideo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除培训
|
||||
*
|
||||
* @param ids 需要删除的培训ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteByTrainVideoByIds(Long[] ids)
|
||||
{
|
||||
return byTrainVideoMapper.deleteByTrainVideoByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除培训信息
|
||||
*
|
||||
* @param id 培训ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteByTrainVideoById(Long id)
|
||||
{
|
||||
return byTrainVideoMapper.deleteByTrainVideoById(id);
|
||||
}
|
||||
}
|
79
ruoyi/src/main/resources/mybatis/benyi/ByLecturerMapper.xml
Normal file
79
ruoyi/src/main/resources/mybatis/benyi/ByLecturerMapper.xml
Normal file
@ -0,0 +1,79 @@
|
||||
<?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.project.benyi.mapper.ByLecturerMapper">
|
||||
|
||||
<resultMap type="ByLecturer" id="ByLecturerResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="name" column="name" />
|
||||
<result property="information" column="information" />
|
||||
<result property="imgurl" column="imgurl" />
|
||||
<result property="createuserid" column="createuserid" />
|
||||
<result property="createtime" column="createtime" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectByLecturerVo">
|
||||
select id, name, information, imgurl, createuserid, createtime from by_lecturer
|
||||
</sql>
|
||||
|
||||
<select id="selectByLecturerList" parameterType="ByLecturer" resultMap="ByLecturerResult">
|
||||
<include refid="selectByLecturerVo"/>
|
||||
<where>
|
||||
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
||||
<if test="information != null and information != ''"> and information = #{information}</if>
|
||||
<if test="imgurl != null and imgurl != ''"> and imgurl = #{imgurl}</if>
|
||||
<if test="createuserid != null "> and createuserid = #{createuserid}</if>
|
||||
<if test="createtime != null "> and createtime = #{createtime}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectByLecturerById" parameterType="Long" resultMap="ByLecturerResult">
|
||||
<include refid="selectByLecturerVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertByLecturer" parameterType="ByLecturer">
|
||||
insert into by_lecturer
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null ">id,</if>
|
||||
<if test="name != null and name != ''">name,</if>
|
||||
<if test="information != null and information != ''">information,</if>
|
||||
<if test="imgurl != null and imgurl != ''">imgurl,</if>
|
||||
<if test="createuserid != null ">createuserid,</if>
|
||||
<if test="createtime != null ">createtime,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null ">#{id},</if>
|
||||
<if test="name != null and name != ''">#{name},</if>
|
||||
<if test="information != null and information != ''">#{information},</if>
|
||||
<if test="imgurl != null and imgurl != ''">#{imgurl},</if>
|
||||
<if test="createuserid != null ">#{createuserid},</if>
|
||||
<if test="createtime != null ">#{createtime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateByLecturer" parameterType="ByLecturer">
|
||||
update by_lecturer
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="name != null and name != ''">name = #{name},</if>
|
||||
<if test="information != null and information != ''">information = #{information},</if>
|
||||
<if test="imgurl != null and imgurl != ''">imgurl = #{imgurl},</if>
|
||||
<if test="createuserid != null ">createuserid = #{createuserid},</if>
|
||||
<if test="createtime != null ">createtime = #{createtime},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteByLecturerById" parameterType="Long">
|
||||
delete from by_lecturer where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteByLecturerByIds" parameterType="String">
|
||||
delete from by_lecturer where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
@ -0,0 +1,92 @@
|
||||
<?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.project.benyi.mapper.ByTrainVideoMapper">
|
||||
|
||||
<resultMap type="ByTrainVideo" id="ByTrainVideoResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="title" column="title" />
|
||||
<result property="information" column="information" />
|
||||
<result property="lecturer" column="lecturer" />
|
||||
<result property="videourl" column="videourl" />
|
||||
<result property="type" column="type" />
|
||||
<result property="classtype" column="classtype" />
|
||||
<result property="createuserid" column="createuserid" />
|
||||
<result property="createtime" column="createtime" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectByTrainVideoVo">
|
||||
select id, title, information, lecturer, videourl, type, classtype, createuserid, createtime from by_train_video
|
||||
</sql>
|
||||
|
||||
<select id="selectByTrainVideoList" parameterType="ByTrainVideo" resultMap="ByTrainVideoResult">
|
||||
<include refid="selectByTrainVideoVo"/>
|
||||
<where>
|
||||
<if test="title != null and title != ''"> and title = #{title}</if>
|
||||
<if test="information != null and information != ''"> and information = #{information}</if>
|
||||
<if test="lecturer != null and lecturer != ''"> and lecturer = #{lecturer}</if>
|
||||
<if test="videourl != null and videourl != ''"> and videourl = #{videourl}</if>
|
||||
<if test="type != null and type != ''"> and type = #{type}</if>
|
||||
<if test="classtype != null and classtype != ''"> and classtype = #{classtype}</if>
|
||||
<if test="createuserid != null "> and createuserid = #{createuserid}</if>
|
||||
<if test="createtime != null "> and createtime = #{createtime}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectByTrainVideoById" parameterType="Long" resultMap="ByTrainVideoResult">
|
||||
<include refid="selectByTrainVideoVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertByTrainVideo" parameterType="ByTrainVideo" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into by_train_video
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="title != null and title != ''">title,</if>
|
||||
<if test="information != null and information != ''">information,</if>
|
||||
<if test="lecturer != null and lecturer != ''">lecturer,</if>
|
||||
<if test="videourl != null and videourl != ''">videourl,</if>
|
||||
<if test="type != null and type != ''">type,</if>
|
||||
<if test="classtype != null and classtype != ''">classtype,</if>
|
||||
<if test="createuserid != null ">createuserid,</if>
|
||||
<if test="createtime != null ">createtime,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="title != null and title != ''">#{title},</if>
|
||||
<if test="information != null and information != ''">#{information},</if>
|
||||
<if test="lecturer != null and lecturer != ''">#{lecturer},</if>
|
||||
<if test="videourl != null and videourl != ''">#{videourl},</if>
|
||||
<if test="type != null and type != ''">#{type},</if>
|
||||
<if test="classtype != null and classtype != ''">#{classtype},</if>
|
||||
<if test="createuserid != null ">#{createuserid},</if>
|
||||
<if test="createtime != null ">#{createtime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateByTrainVideo" parameterType="ByTrainVideo">
|
||||
update by_train_video
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="title != null and title != ''">title = #{title},</if>
|
||||
<if test="information != null and information != ''">information = #{information},</if>
|
||||
<if test="lecturer != null and lecturer != ''">lecturer = #{lecturer},</if>
|
||||
<if test="videourl != null and videourl != ''">videourl = #{videourl},</if>
|
||||
<if test="type != null and type != ''">type = #{type},</if>
|
||||
<if test="classtype != null and classtype != ''">classtype = #{classtype},</if>
|
||||
<if test="createuserid != null ">createuserid = #{createuserid},</if>
|
||||
<if test="createtime != null ">createtime = #{createtime},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteByTrainVideoById" parameterType="Long">
|
||||
delete from by_train_video where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteByTrainVideoByIds" parameterType="String">
|
||||
delete from by_train_video where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
Loading…
x
Reference in New Issue
Block a user