From 1c1f5a03a44a811bd9c8e43fa664981f22cf21bd Mon Sep 17 00:00:00 2001
From: zqy <2522236926@qq.com>
Date: 星期四, 25 四月 2024 21:27:52 +0800
Subject: [PATCH] 修改代码
---
ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZHonorController.java | 21 +++++++++++++++++----
1 files changed, 17 insertions(+), 4 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 5c7b625..6e909fe 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
@@ -50,10 +50,23 @@
return zHonorService.selectDataList(zHonor,pageNum,pageSize);
}
+ @GetMapping("/type")
+ public AjaxResult listType(){
+ return zHonorService.listType();
+ }
+
+ /**
+ * 鏍规嵁id鏌ヨ
+ */
+ @GetMapping()
+ public AjaxResult listById(Long id){
+ return AjaxResult.success(zHonorService.getById(id));
+ }
+
/**
* 妯℃澘
*/
- @GetMapping("/model")
+ @PostMapping("/model")
public void getModel(HttpServletResponse response){
ZHonor zHonor = new ZHonor();
List<ZHonor> emptyList = Collections.singletonList(zHonor);
@@ -66,10 +79,10 @@
*/
// @PreAuthorize("@ss.hasPermi('system:property:export')")
@Log(title = "璇佷欢銆佽崳瑾夈�佽祫璐ㄨ褰�", businessType = BusinessType.EXPORT)
- @PostMapping("/export")
- public void export(HttpServletResponse response, ZHonor zHonor)
+ @PostMapping(value = {"/export/{ids}","/export"})
+ public void export(HttpServletResponse response,@PathVariable(required = false) Long[] ids)
{
- List<ZHonor> list = zHonorService.selectCondition(zHonor);
+ List<ZHonor> list = zHonorService.selectByIds(ids);
log.info("瀵煎嚭璁板綍涓�:{}",list);
ExcelUtil<ZHonor> util = new ExcelUtil<>(ZHonor.class);
util.exportExcel(response, list, "璇佷欢銆佽崳瑾夈�佽祫璐ㄨ褰曟暟鎹�");
--
Gitblit v1.9.1