From 134f7c82005fb755183b279ccacac29a8e37cd4b Mon Sep 17 00:00:00 2001 From: huxin Date: Fri, 24 Jan 2025 15:01:53 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=86=E9=A2=91=E5=88=97=E8=A1=A8controller?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/DklVideoDataController.java | 112 ++++++++++++++++++ 1 file changed, 112 insertions(+) create mode 100644 Dkl-Vue-master/dkl-large/src/main/java/com/dkl/large/controller/DklVideoDataController.java diff --git a/Dkl-Vue-master/dkl-large/src/main/java/com/dkl/large/controller/DklVideoDataController.java b/Dkl-Vue-master/dkl-large/src/main/java/com/dkl/large/controller/DklVideoDataController.java new file mode 100644 index 0000000..2c984fd --- /dev/null +++ b/Dkl-Vue-master/dkl-large/src/main/java/com/dkl/large/controller/DklVideoDataController.java @@ -0,0 +1,112 @@ +package com.dkl.large.controller; + +import java.util.Date; +import java.util.List; +import javax.servlet.http.HttpServletResponse; +import com.dkl.common.annotation.DataScope; +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.dkl.common.annotation.Log; +import com.dkl.common.core.controller.BaseController; +import com.dkl.common.core.domain.AjaxResult; +import com.dkl.common.enums.BusinessType; +import com.dkl.large.domain.DklVideoData; +import com.dkl.large.service.IDklVideoDataService; +import com.dkl.common.utils.poi.ExcelUtil; +import com.dkl.common.core.page.TableDataInfo; + +/** + * 大客流视频数据获取Controller + * + * @author Dkl + * @date 2025-06-06 + */ +@RestController +@RequestMapping("/large/data") +public class DklVideoDataController extends BaseController +{ + @Autowired + private IDklVideoDataService dklVideoDataService; + + /** + * 查询大客流视频数据获取列表 + */ + @GetMapping("/list") + @DataScope(deptAlias = "d") + @PreAuthorize("@ss.hasPermi('large:data:list')") + public TableDataInfo list(DklVideoData dklVideoData) + { + startPage(); + List list = dklVideoDataService.selectDklVideoDataList(dklVideoData); + return getDataTable(list); + } + + /** + * 导出大客流视频数据获取列表 + */ + @Log(title = "大客流视频数据获取", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, DklVideoData dklVideoData) + { + List list = dklVideoDataService.selectDklVideoDataList(dklVideoData); + ExcelUtil util = new ExcelUtil(DklVideoData.class); + util.exportExcel(response, list, "大客流视频数据获取数据"); + } + + /** + * 获取大客流视频数据获取详细信息 + */ + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") int id) + { + return success(dklVideoDataService.selectDklVideoDataById(id)); + } + + /** + * 新增大客流视频数据获取 + */ + @Log(title = "大客流视频数据获取", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody DklVideoData dklVideoData) + { + //添加系统信息 + dklVideoData.setDelFlag("0"); + dklVideoData.setCreateTime(new Date()); + dklVideoData.setCreateBy(getUsername()); + dklVideoData.setDeptId(getDeptId()); + dklVideoData.setUpdateTime(new Date()); + dklVideoData.setUpdateBy(getUsername()); + return toAjax(dklVideoDataService.insertDklVideoData(dklVideoData)); + } + + /** + * 修改大客流视频数据获取 + */ + @Log(title = "大客流视频数据获取", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody DklVideoData dklVideoData) + { + //添加系统信息 + dklVideoData.setUpdateTime(new Date()); + dklVideoData.setUpdateBy(getUsername()); + return toAjax(dklVideoDataService.updateDklVideoData(dklVideoData)); + } + + /** + * 删除大客流视频数据获取 + */ + @Log(title = "大客流视频数据获取", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable int[] ids) + { + return toAjax(dklVideoDataService.deleteDklVideoDataByIds(ids)); + } +}