From db0b87b36c44a5a9bc32a915769024f0c9db7c05 Mon Sep 17 00:00:00 2001 From: 龚焕茏 <2842157468@qq.com> Date: 星期四, 11 四月 2024 15:10:49 +0800 Subject: [PATCH] 运维单位绑定账号 --- ycl-server/src/main/java/com/ycl/platform/controller/CheckPublishController.java | 99 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 99 insertions(+), 0 deletions(-) diff --git a/ycl-server/src/main/java/com/ycl/platform/controller/CheckPublishController.java b/ycl-server/src/main/java/com/ycl/platform/controller/CheckPublishController.java new file mode 100644 index 0000000..06fbe5c --- /dev/null +++ b/ycl-server/src/main/java/com/ycl/platform/controller/CheckPublishController.java @@ -0,0 +1,99 @@ +package com.ycl.platform.controller; + +import annotation.Log; +import com.ycl.platform.domain.entity.CheckPublish; +import com.ycl.platform.service.ICheckPublishService; +import com.ycl.system.AjaxResult; +import com.ycl.system.controller.BaseController; +import com.ycl.system.page.TableDataInfo; +import com.ycl.utils.poi.ExcelUtil; +import enumeration.BusinessType; +import jakarta.servlet.http.HttpServletResponse; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + + +/** + * 鑰冩牳鍙戝竷Controller + * + * @author ruoyi + * @date 2024-04-01 + */ +@RestController +@RequestMapping("/check/publish") +public class CheckPublishController extends BaseController +{ + @Autowired + private ICheckPublishService checkPublishService; + + /** + * 鏌ヨ鑰冩牳鍙戝竷鍒楄〃 + */ + @PreAuthorize("@ss.hasPermi('system:publish:list')") + @GetMapping("/list") + public TableDataInfo list(CheckPublish checkPublish) + { + startPage(); + List<CheckPublish> list = checkPublishService.selectCheckPublishList(checkPublish); + return getDataTable(list); + } + + /** + * 瀵煎嚭鑰冩牳鍙戝竷鍒楄〃 + */ + @PreAuthorize("@ss.hasPermi('system:publish:export')") + @Log(title = "鑰冩牳鍙戝竷", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, CheckPublish checkPublish) + { + List<CheckPublish> list = checkPublishService.selectCheckPublishList(checkPublish); + ExcelUtil<CheckPublish> util = new ExcelUtil<CheckPublish>(CheckPublish.class); + util.exportExcel(response, list, "鑰冩牳鍙戝竷鏁版嵁"); + } + + /** + * 鑾峰彇鑰冩牳鍙戝竷璇︾粏淇℃伅 + */ + @PreAuthorize("@ss.hasPermi('system:publish:query')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) + { + return success(checkPublishService.selectCheckPublishById(id)); + } + + /** + * 鏂板鑰冩牳鍙戝竷 + */ + @PreAuthorize("@ss.hasPermi('system:publish:add')") + @Log(title = "鑰冩牳鍙戝竷", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody CheckPublish checkPublish) + { + return toAjax(checkPublishService.insertCheckPublish(checkPublish)); + } + + /** + * 淇敼鑰冩牳鍙戝竷 + */ + @PreAuthorize("@ss.hasPermi('system:publish:edit')") + @Log(title = "鑰冩牳鍙戝竷", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody CheckPublish checkPublish) + { + return toAjax(checkPublishService.updateCheckPublish(checkPublish)); + } + + /** + * 鍒犻櫎鑰冩牳鍙戝竷 + */ + @PreAuthorize("@ss.hasPermi('system:publish:remove')") + @Log(title = "鑰冩牳鍙戝竷", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) + { + return toAjax(checkPublishService.deleteCheckPublishByIds(ids)); + } +} -- Gitblit v1.8.0