diff --git a/Dkl-Vue-master/dkl-large/src/main/java/com/dkl/large/controller/VideoStorageInformationController.java b/Dkl-Vue-master/dkl-large/src/main/java/com/dkl/large/controller/VideoStorageInformationController.java new file mode 100644 index 0000000..2dc9b5a --- /dev/null +++ b/Dkl-Vue-master/dkl-large/src/main/java/com/dkl/large/controller/VideoStorageInformationController.java @@ -0,0 +1,150 @@ +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 com.dkl.common.annotation.Log; +import com.dkl.common.core.controller.BaseController; +import com.dkl.common.core.domain.AjaxResult; +import com.dkl.common.core.page.TableDataInfo; +import com.dkl.common.enums.BusinessType; +import com.dkl.common.utils.StringUtils; +import com.dkl.common.utils.poi.ExcelUtil; +import com.dkl.common.utils.uuid.IdUtils; +import com.dkl.large.domain.DklActivity; +import com.dkl.large.domain.VideoStorageInformation; +import com.dkl.large.service.IVideoStorageInformationService; +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 org.springframework.web.multipart.MultipartFile; + + +/** + * 大客流活动监控Controller + * + * @author JK + * @date 2025-05-30 + */ +@RestController +@RequestMapping("/large/videoStorageInformation") +public class VideoStorageInformationController extends BaseController +{ + @Autowired + private IVideoStorageInformationService videoStorageInformationService; + + /** + * 查询大客流活动监控列表 + */ + @GetMapping("/list") + @DataScope(deptAlias = "d") + @PreAuthorize("@ss.hasPermi('large:videoStorageInformation:list')") + public TableDataInfo list(VideoStorageInformation videoStorageInformation) + { + startPage(); + List list = videoStorageInformationService.selectVideoStorageInformationList(videoStorageInformation); + return getDataTable(list); + } + @GetMapping("/listAll") + @DataScope(deptAlias = "d") + @PreAuthorize("@ss.hasPermi('large:videoStorageInformation:list')") + public TableDataInfo listAll(VideoStorageInformation videoStorageInformation) + { + videoStorageInformation.setDelFlag("0"); + List list = videoStorageInformationService.selectVideoStorageInformationList(videoStorageInformation); + return getDataTable(list); + } + @GetMapping("/listOutAll") + public TableDataInfo listOutAll(VideoStorageInformation videoStorageInformation) + { + startPage(); + List list = videoStorageInformationService.selectVideoStorageInformationList(videoStorageInformation); + return getDataTable(list); + } + /** + * 导出大客流活动监控列表 + */ + @Log(title = "VideoStorageInformation", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, VideoStorageInformation videoStorageInformation) + { + List list = videoStorageInformationService.selectVideoStorageInformationList(videoStorageInformation); + ExcelUtil util = new ExcelUtil(VideoStorageInformation.class); + util.exportExcel(response, list, "VideoStorageInformation数据"); + } + + /** + * 获取大客流活动监控详细信息 + */ + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") int id) + { + return success(videoStorageInformationService.selectVideoStorageInformationById(id)); + } + + /** + * 新增大客流活动监控 + */ + @Log(title = "VideoStorageInformation", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody VideoStorageInformation videoStorageInformation) + { + //添加系统信息 + videoStorageInformation.setDelFlag("0"); + videoStorageInformation.setCreateTime(new Date()); + videoStorageInformation.setCreateBy(getUsername()); + videoStorageInformation.setDeptId(getDeptId()); + videoStorageInformation.setUpdateTime(new Date()); + videoStorageInformation.setUpdateBy(getUsername()); + return toAjax(videoStorageInformationService.insertVideoStorageInformation(videoStorageInformation)); + } + + /** + * 修改大客流活动监控 + */ + @Log(title = "VideoStorageInformation", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody VideoStorageInformation videoStorageInformation) + { + //添加系统信息 + videoStorageInformation.setUpdateTime(new Date()); + videoStorageInformation.setUpdateBy(getUsername()); + return toAjax(videoStorageInformationService.updateVideoStorageInformation(videoStorageInformation)); + } + + /** + * 删除大客流活动监控 + */ + @Log(title = "VideoStorageInformation", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable int[] ids) + { + return toAjax(videoStorageInformationService.deleteVideoStorageInformationByIds(ids)); + } + + @PostMapping("/importTemplate") + public void importTemplate(HttpServletResponse response) + { + ExcelUtil util = new ExcelUtil(VideoStorageInformation.class); + util.importTemplateExcel(response, "活动监控信息数据"); + } + + @PostMapping("/importData") + public AjaxResult importData(MultipartFile file) throws Exception + { + ExcelUtil util = new ExcelUtil(VideoStorageInformation.class); + List videoStorageInformationList = util.importExcel(file.getInputStream()); + String operName = getUsername(); + String message = videoStorageInformationService.importDate(videoStorageInformationList, operName); + return success(message); + } +}