From 72aba428d578e43466f4e14dca74dc2a7a3e8089 Mon Sep 17 00:00:00 2001 From: "kuang.yife" Date: Mon, 6 Nov 2023 11:39:11 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=86=E9=A2=91=E7=B4=A0=E6=9D=90+=E5=9B=BE?= =?UTF-8?q?=E7=89=87=E7=B4=A0=E6=9D=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/system/ClewImgController.java | 138 ++++++++++++++++++ .../system/ClewVideoController.java | 135 +++++++++++++++++ .../resources/templates/system/img/add.html | 63 ++++++++ .../resources/templates/system/img/edit.html | 38 +++++ .../resources/templates/system/img/img.html | 90 ++++++++++++ .../resources/templates/system/video/add.html | 105 +++++++++++++ .../templates/system/video/edit.html | 50 +++++++ .../templates/system/video/video.html | 110 ++++++++++++++ .../ruoyi/framework/config/ShiroConfig.java | 4 + .../java/com/ruoyi/system/domain/ClewImg.java | 26 ++++ .../com/ruoyi/system/domain/ClewVideo.java | 36 +++++ .../ruoyi/system/mapper/ClewImgMapper.java | 61 ++++++++ .../ruoyi/system/mapper/ClewVideoMapper.java | 61 ++++++++ .../ruoyi/system/service/IClewImgService.java | 61 ++++++++ .../system/service/IClewVideoService.java | 61 ++++++++ .../service/impl/ClewImgServiceImpl.java | 97 ++++++++++++ .../service/impl/ClewVideoServiceImpl.java | 97 ++++++++++++ .../resources/mapper/system/ClewImgMapper.xml | 77 ++++++++++ .../mapper/system/ClewVideoMapper.xml | 91 ++++++++++++ 19 files changed, 1401 insertions(+) create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/ClewImgController.java create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/ClewVideoController.java create mode 100644 ruoyi-admin/src/main/resources/templates/system/img/add.html create mode 100644 ruoyi-admin/src/main/resources/templates/system/img/edit.html create mode 100644 ruoyi-admin/src/main/resources/templates/system/img/img.html create mode 100644 ruoyi-admin/src/main/resources/templates/system/video/add.html create mode 100644 ruoyi-admin/src/main/resources/templates/system/video/edit.html create mode 100644 ruoyi-admin/src/main/resources/templates/system/video/video.html create mode 100644 ruoyi-system/src/main/java/com/ruoyi/system/domain/ClewImg.java create mode 100644 ruoyi-system/src/main/java/com/ruoyi/system/domain/ClewVideo.java create mode 100644 ruoyi-system/src/main/java/com/ruoyi/system/mapper/ClewImgMapper.java create mode 100644 ruoyi-system/src/main/java/com/ruoyi/system/mapper/ClewVideoMapper.java create mode 100644 ruoyi-system/src/main/java/com/ruoyi/system/service/IClewImgService.java create mode 100644 ruoyi-system/src/main/java/com/ruoyi/system/service/IClewVideoService.java create mode 100644 ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ClewImgServiceImpl.java create mode 100644 ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ClewVideoServiceImpl.java create mode 100644 ruoyi-system/src/main/resources/mapper/system/ClewImgMapper.xml create mode 100644 ruoyi-system/src/main/resources/mapper/system/ClewVideoMapper.xml diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/ClewImgController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/ClewImgController.java new file mode 100644 index 00000000..fed48466 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/ClewImgController.java @@ -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 list = clewImgService.selectClewImgList(clewImg); + return getDataTable(list); + } + + @GetMapping("/app/list") + @ResponseBody + public AjaxResult getAppList() + { + List list = clewImgService.selectClewImgList(new ClewImg()); + List 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 list = clewImgService.selectClewImgList(clewImg); + ExcelUtil util = new ExcelUtil(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)); + } +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/ClewVideoController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/ClewVideoController.java new file mode 100644 index 00000000..38ef8a4c --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/ClewVideoController.java @@ -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 list = clewVideoService.selectClewVideoList(clewVideo); + return getDataTable(list); + } + + @GetMapping("/app/list") + @ResponseBody + public AjaxResult getAppList() + { + List 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 list = clewVideoService.selectClewVideoList(clewVideo); + ExcelUtil util = new ExcelUtil(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)); + } +} diff --git a/ruoyi-admin/src/main/resources/templates/system/img/add.html b/ruoyi-admin/src/main/resources/templates/system/img/add.html new file mode 100644 index 00000000..c44ceda4 --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/system/img/add.html @@ -0,0 +1,63 @@ + + + + + + + +
+
+
+ +
+ + +
+
+
+ +
+ +
+
+
+
+ + + + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/system/img/edit.html b/ruoyi-admin/src/main/resources/templates/system/img/edit.html new file mode 100644 index 00000000..d83836a5 --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/system/img/edit.html @@ -0,0 +1,38 @@ + + + + + + +
+
+ +
+ +
+ +
+
+
+ +
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/system/img/img.html b/ruoyi-admin/src/main/resources/templates/system/img/img.html new file mode 100644 index 00000000..3d3fe194 --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/system/img/img.html @@ -0,0 +1,90 @@ + + + + + + +
+
+
+
+
+ +
+
+
+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/system/video/add.html b/ruoyi-admin/src/main/resources/templates/system/video/add.html new file mode 100644 index 00000000..ea78b569 --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/system/video/add.html @@ -0,0 +1,105 @@ + + + + + + + +
+
+
+ +
+ + +
+
+
+ +
+ + +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+ + + + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/system/video/edit.html b/ruoyi-admin/src/main/resources/templates/system/video/edit.html new file mode 100644 index 00000000..6154fc75 --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/system/video/edit.html @@ -0,0 +1,50 @@ + + + + + + +
+
+ +
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/system/video/video.html b/ruoyi-admin/src/main/resources/templates/system/video/video.html new file mode 100644 index 00000000..0afcf199 --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/system/video/video.html @@ -0,0 +1,110 @@ + + + + + + +
+
+
+
+
+
    +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • +  搜索 +  重置 +
  • +
+
+
+
+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/ShiroConfig.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/ShiroConfig.java index eaec4863..b59f52de 100644 --- a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/ShiroConfig.java +++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/ShiroConfig.java @@ -298,6 +298,10 @@ public class ShiroConfig filterChainDefinitionMap.put("/system/app/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"); // 退出 logout地址,shiro去清除session diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain/ClewImg.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain/ClewImg.java new file mode 100644 index 00000000..1195640e --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain/ClewImg.java @@ -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; + +} + diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain/ClewVideo.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain/ClewVideo.java new file mode 100644 index 00000000..7fce8cb0 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain/ClewVideo.java @@ -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; + +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ClewImgMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ClewImgMapper.java new file mode 100644 index 00000000..3c00f615 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ClewImgMapper.java @@ -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 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); +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ClewVideoMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ClewVideoMapper.java new file mode 100644 index 00000000..988908dc --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ClewVideoMapper.java @@ -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 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); +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/IClewImgService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/IClewImgService.java new file mode 100644 index 00000000..62e9491b --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/IClewImgService.java @@ -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 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); +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/IClewVideoService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/IClewVideoService.java new file mode 100644 index 00000000..2a620c07 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/IClewVideoService.java @@ -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 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); +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ClewImgServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ClewImgServiceImpl.java new file mode 100644 index 00000000..a788c703 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ClewImgServiceImpl.java @@ -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 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); + } +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ClewVideoServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ClewVideoServiceImpl.java new file mode 100644 index 00000000..f63dbf5d --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ClewVideoServiceImpl.java @@ -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 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); + } +} diff --git a/ruoyi-system/src/main/resources/mapper/system/ClewImgMapper.xml b/ruoyi-system/src/main/resources/mapper/system/ClewImgMapper.xml new file mode 100644 index 00000000..9c6829cd --- /dev/null +++ b/ruoyi-system/src/main/resources/mapper/system/ClewImgMapper.xml @@ -0,0 +1,77 @@ + + + + + + + + + + + + + + + + select id, img_url, create_time, create_by, update_time, update_by, remark from clew_img + + + + + + + + insert into clew_img + + img_url, + create_time, + create_by, + update_time, + update_by, + remark, + + + #{imgUrl}, + #{createTime}, + #{createBy}, + #{updateTime}, + #{updateBy}, + #{remark}, + + + + + update clew_img + + img_url = #{imgUrl}, + create_time = #{createTime}, + create_by = #{createBy}, + update_time = #{updateTime}, + update_by = #{updateBy}, + remark = #{remark}, + + where id = #{id} + + + + delete from clew_img where id = #{id} + + + + delete from clew_img where id in + + #{id} + + + + \ No newline at end of file diff --git a/ruoyi-system/src/main/resources/mapper/system/ClewVideoMapper.xml b/ruoyi-system/src/main/resources/mapper/system/ClewVideoMapper.xml new file mode 100644 index 00000000..6dda54e9 --- /dev/null +++ b/ruoyi-system/src/main/resources/mapper/system/ClewVideoMapper.xml @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + + select id, video_url, video_img, video_title, video_show_date, create_time, create_by, update_time, update_by, remark from clew_video + + + + + + + + insert into clew_video + + video_url, + video_img, + video_title, + video_show_date, + create_time, + create_by, + update_time, + update_by, + remark, + + + #{videoUrl}, + #{videoImg}, + #{videoTitle}, + #{videoShowDate}, + #{createTime}, + #{createBy}, + #{updateTime}, + #{updateBy}, + #{remark}, + + + + + update clew_video + + video_url = #{videoUrl}, + video_img = #{videoImg}, + video_title = #{videoTitle}, + video_show_date = #{videoShowDate}, + create_time = #{createTime}, + create_by = #{createBy}, + update_time = #{updateTime}, + update_by = #{updateBy}, + remark = #{remark}, + + where id = #{id} + + + + delete from clew_video where id = #{id} + + + + delete from clew_video where id in + + #{id} + + + + \ No newline at end of file