From e126ec9be7a8f8d2c351f2843a9a184d1bcc8703 Mon Sep 17 00:00:00 2001
From: zqy <252236926@qq.com>
Date: 星期五, 30 五月 2025 16:48:52 +0800
Subject: [PATCH] 修改用户
---
ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZHonorController.java | 22 +++++++++++++++++++---
1 files changed, 19 insertions(+), 3 deletions(-)
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZHonorController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZHonorController.java
index c64c92b..e946234 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZHonorController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZHonorController.java
@@ -11,7 +11,9 @@
import com.ruoyi.common.utils.ServletUtils;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.domain.ZHonor;
+import com.ruoyi.service.ZHonorDownloadService;
import com.ruoyi.service.ZHonorService;
+import com.ruoyi.service.ZHonorShareService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@@ -40,6 +42,12 @@
@Autowired
private ZHonorService zHonorService;
+ @Autowired
+ private ZHonorDownloadService zHonorDownloadService;
+
+ @Autowired
+ private ZHonorShareService zHonorShareService;
+
/**
* 鏌ヨ鎵�鏈夎褰�
*/
@@ -48,6 +56,11 @@
Integer pageNum = Convert.toInt(ServletUtils.getParameter(PAGE_NUM), 1);
Integer pageSize = Convert.toInt(ServletUtils.getParameter(PAGE_SIZE), 10);
return zHonorService.selectDataList(zHonor,pageNum,pageSize);
+ }
+
+ @GetMapping("/type")
+ public AjaxResult listType(){
+ return zHonorService.listType();
}
/**
@@ -61,7 +74,7 @@
/**
* 妯℃澘
*/
- @GetMapping("/model")
+ @PostMapping("/model")
public void getModel(HttpServletResponse response){
ZHonor zHonor = new ZHonor();
List<ZHonor> emptyList = Collections.singletonList(zHonor);
@@ -74,8 +87,8 @@
*/
// @PreAuthorize("@ss.hasPermi('system:property:export')")
@Log(title = "璇佷欢銆佽崳瑾夈�佽祫璐ㄨ褰�", businessType = BusinessType.EXPORT)
- @PostMapping("/export/{ids}")
- public void export(HttpServletResponse response,@PathVariable Long[] ids)
+ @PostMapping(value = {"/export/{ids}","/export"})
+ public void export(HttpServletResponse response,@PathVariable(required = false) Long[] ids)
{
List<ZHonor> list = zHonorService.selectByIds(ids);
log.info("瀵煎嚭璁板綍涓�:{}",list);
@@ -123,6 +136,9 @@
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
+ if (! (zHonorDownloadService.deleteData(ids) && zHonorShareService.deleteByContentId(ids) ) ){
+ return AjaxResult.error();
+ }
return toAjax(zHonorService.removeByIds(Arrays.asList(ids)));
}
--
Gitblit v1.9.1