From 8fab73eb25b8e99de46c33b9eeacfdff57381be9 Mon Sep 17 00:00:00 2001 From: paidaxing444 <12qwaszx> Date: Mon, 25 May 2020 21:41:40 +0800 Subject: [PATCH] =?UTF-8?q?20200525-zlp-1=20=E5=9F=B9=E8=AE=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/package.json | 1 + ruoyi-ui/src/main.js | 5 + ruoyi-ui/src/router/index.js | 48 +++--- ruoyi-ui/src/views/index.vue | 22 +-- .../controller/ByLecturerController.java | 108 +++++++++++++ .../controller/ByTrainVideoController.java | 103 ++++++++++++ .../project/benyi/domain/ByLecturer.java | 111 +++++++++++++ .../project/benyi/domain/ByTrainVideo.java | 153 ++++++++++++++++++ .../benyi/mapper/ByLecturerMapper.java | 61 +++++++ .../benyi/mapper/ByTrainVideoMapper.java | 61 +++++++ .../benyi/service/IByLecturerService.java | 61 +++++++ .../benyi/service/IByTrainVideoService.java | 61 +++++++ .../service/impl/ByLecturerServiceImpl.java | 93 +++++++++++ .../service/impl/ByTrainVideoServiceImpl.java | 93 +++++++++++ .../mybatis/benyi/ByLecturerMapper.xml | 79 +++++++++ .../mybatis/benyi/ByTrainVideoMapper.xml | 92 +++++++++++ 16 files changed, 1117 insertions(+), 35 deletions(-) create mode 100644 ruoyi/src/main/java/com/ruoyi/project/benyi/controller/ByLecturerController.java create mode 100644 ruoyi/src/main/java/com/ruoyi/project/benyi/controller/ByTrainVideoController.java create mode 100644 ruoyi/src/main/java/com/ruoyi/project/benyi/domain/ByLecturer.java create mode 100644 ruoyi/src/main/java/com/ruoyi/project/benyi/domain/ByTrainVideo.java create mode 100644 ruoyi/src/main/java/com/ruoyi/project/benyi/mapper/ByLecturerMapper.java create mode 100644 ruoyi/src/main/java/com/ruoyi/project/benyi/mapper/ByTrainVideoMapper.java create mode 100644 ruoyi/src/main/java/com/ruoyi/project/benyi/service/IByLecturerService.java create mode 100644 ruoyi/src/main/java/com/ruoyi/project/benyi/service/IByTrainVideoService.java create mode 100644 ruoyi/src/main/java/com/ruoyi/project/benyi/service/impl/ByLecturerServiceImpl.java create mode 100644 ruoyi/src/main/java/com/ruoyi/project/benyi/service/impl/ByTrainVideoServiceImpl.java create mode 100644 ruoyi/src/main/resources/mybatis/benyi/ByLecturerMapper.xml create mode 100644 ruoyi/src/main/resources/mybatis/benyi/ByTrainVideoMapper.xml diff --git a/ruoyi-ui/package.json b/ruoyi-ui/package.json index 4852ccf01..ad0b5bf1a 100644 --- a/ruoyi-ui/package.json +++ b/ruoyi-ui/package.json @@ -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", diff --git a/ruoyi-ui/src/main.js b/ruoyi-ui/src/main.js index c2834bf76..c379aab41 100644 --- a/ruoyi-ui/src/main.js +++ b/ruoyi-ui/src/main.js @@ -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" }); } diff --git a/ruoyi-ui/src/router/index.js b/ruoyi-ui/src/router/index.js index c84d803d5..88a1f1aea 100644 --- a/ruoyi-ui/src/router/index.js +++ b/ruoyi-ui/src/router/index.js @@ -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, diff --git a/ruoyi-ui/src/views/index.vue b/ruoyi-ui/src/views/index.vue index 6002cf75e..5484a5b80 100644 --- a/ruoyi-ui/src/views/index.vue +++ b/ruoyi-ui/src/views/index.vue @@ -18,11 +18,11 @@ - + - @@ -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; + // }); + // } } }; diff --git a/ruoyi/src/main/java/com/ruoyi/project/benyi/controller/ByLecturerController.java b/ruoyi/src/main/java/com/ruoyi/project/benyi/controller/ByLecturerController.java new file mode 100644 index 000000000..b86b719f9 --- /dev/null +++ b/ruoyi/src/main/java/com/ruoyi/project/benyi/controller/ByLecturerController.java @@ -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 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 list = byLecturerService.selectByLecturerList(byLecturer); + ExcelUtil util = new ExcelUtil(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)); + } +} diff --git a/ruoyi/src/main/java/com/ruoyi/project/benyi/controller/ByTrainVideoController.java b/ruoyi/src/main/java/com/ruoyi/project/benyi/controller/ByTrainVideoController.java new file mode 100644 index 000000000..5f673c5dc --- /dev/null +++ b/ruoyi/src/main/java/com/ruoyi/project/benyi/controller/ByTrainVideoController.java @@ -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 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 list = byTrainVideoService.selectByTrainVideoList(byTrainVideo); + ExcelUtil util = new ExcelUtil(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)); + } +} diff --git a/ruoyi/src/main/java/com/ruoyi/project/benyi/domain/ByLecturer.java b/ruoyi/src/main/java/com/ruoyi/project/benyi/domain/ByLecturer.java new file mode 100644 index 000000000..adc0e7183 --- /dev/null +++ b/ruoyi/src/main/java/com/ruoyi/project/benyi/domain/ByLecturer.java @@ -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(); + } +} diff --git a/ruoyi/src/main/java/com/ruoyi/project/benyi/domain/ByTrainVideo.java b/ruoyi/src/main/java/com/ruoyi/project/benyi/domain/ByTrainVideo.java new file mode 100644 index 000000000..9acd32605 --- /dev/null +++ b/ruoyi/src/main/java/com/ruoyi/project/benyi/domain/ByTrainVideo.java @@ -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(); + } +} diff --git a/ruoyi/src/main/java/com/ruoyi/project/benyi/mapper/ByLecturerMapper.java b/ruoyi/src/main/java/com/ruoyi/project/benyi/mapper/ByLecturerMapper.java new file mode 100644 index 000000000..756bb6d15 --- /dev/null +++ b/ruoyi/src/main/java/com/ruoyi/project/benyi/mapper/ByLecturerMapper.java @@ -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 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); +} diff --git a/ruoyi/src/main/java/com/ruoyi/project/benyi/mapper/ByTrainVideoMapper.java b/ruoyi/src/main/java/com/ruoyi/project/benyi/mapper/ByTrainVideoMapper.java new file mode 100644 index 000000000..d535034fe --- /dev/null +++ b/ruoyi/src/main/java/com/ruoyi/project/benyi/mapper/ByTrainVideoMapper.java @@ -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 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); +} diff --git a/ruoyi/src/main/java/com/ruoyi/project/benyi/service/IByLecturerService.java b/ruoyi/src/main/java/com/ruoyi/project/benyi/service/IByLecturerService.java new file mode 100644 index 000000000..be7016e6f --- /dev/null +++ b/ruoyi/src/main/java/com/ruoyi/project/benyi/service/IByLecturerService.java @@ -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 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); +} diff --git a/ruoyi/src/main/java/com/ruoyi/project/benyi/service/IByTrainVideoService.java b/ruoyi/src/main/java/com/ruoyi/project/benyi/service/IByTrainVideoService.java new file mode 100644 index 000000000..2dec21202 --- /dev/null +++ b/ruoyi/src/main/java/com/ruoyi/project/benyi/service/IByTrainVideoService.java @@ -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 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); +} diff --git a/ruoyi/src/main/java/com/ruoyi/project/benyi/service/impl/ByLecturerServiceImpl.java b/ruoyi/src/main/java/com/ruoyi/project/benyi/service/impl/ByLecturerServiceImpl.java new file mode 100644 index 000000000..f603a27a3 --- /dev/null +++ b/ruoyi/src/main/java/com/ruoyi/project/benyi/service/impl/ByLecturerServiceImpl.java @@ -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 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); + } +} diff --git a/ruoyi/src/main/java/com/ruoyi/project/benyi/service/impl/ByTrainVideoServiceImpl.java b/ruoyi/src/main/java/com/ruoyi/project/benyi/service/impl/ByTrainVideoServiceImpl.java new file mode 100644 index 000000000..41e86fef7 --- /dev/null +++ b/ruoyi/src/main/java/com/ruoyi/project/benyi/service/impl/ByTrainVideoServiceImpl.java @@ -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 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); + } +} diff --git a/ruoyi/src/main/resources/mybatis/benyi/ByLecturerMapper.xml b/ruoyi/src/main/resources/mybatis/benyi/ByLecturerMapper.xml new file mode 100644 index 000000000..62177b713 --- /dev/null +++ b/ruoyi/src/main/resources/mybatis/benyi/ByLecturerMapper.xml @@ -0,0 +1,79 @@ + + + + + + + + + + + + + + + select id, name, information, imgurl, createuserid, createtime from by_lecturer + + + + + + + + insert into by_lecturer + + id, + name, + information, + imgurl, + createuserid, + createtime, + + + #{id}, + #{name}, + #{information}, + #{imgurl}, + #{createuserid}, + #{createtime}, + + + + + update by_lecturer + + name = #{name}, + information = #{information}, + imgurl = #{imgurl}, + createuserid = #{createuserid}, + createtime = #{createtime}, + + where id = #{id} + + + + delete from by_lecturer where id = #{id} + + + + delete from by_lecturer where id in + + #{id} + + + + \ No newline at end of file diff --git a/ruoyi/src/main/resources/mybatis/benyi/ByTrainVideoMapper.xml b/ruoyi/src/main/resources/mybatis/benyi/ByTrainVideoMapper.xml new file mode 100644 index 000000000..08244c7ee --- /dev/null +++ b/ruoyi/src/main/resources/mybatis/benyi/ByTrainVideoMapper.xml @@ -0,0 +1,92 @@ + + + + + + + + + + + + + + + + + + select id, title, information, lecturer, videourl, type, classtype, createuserid, createtime from by_train_video + + + + + + + + insert into by_train_video + + title, + information, + lecturer, + videourl, + type, + classtype, + createuserid, + createtime, + + + #{title}, + #{information}, + #{lecturer}, + #{videourl}, + #{type}, + #{classtype}, + #{createuserid}, + #{createtime}, + + + + + update by_train_video + + title = #{title}, + information = #{information}, + lecturer = #{lecturer}, + videourl = #{videourl}, + type = #{type}, + classtype = #{classtype}, + createuserid = #{createuserid}, + createtime = #{createtime}, + + where id = #{id} + + + + delete from by_train_video where id = #{id} + + + + delete from by_train_video where id in + + #{id} + + + + \ No newline at end of file