From 730d1944e3a13c517c77df2b0712df05645a38dd Mon Sep 17 00:00:00 2001
From: dengzedong <dengzedong@email>
Date: 星期一, 06 一月 2025 16:00:58 +0800
Subject: [PATCH] chartParamList api

---
 iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mpk/controller/admin/MpkFileController.java |   21 +++++++++++++--------
 1 files changed, 13 insertions(+), 8 deletions(-)

diff --git a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mpk/controller/admin/MpkFileController.java b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mpk/controller/admin/MpkFileController.java
index 74f7a1b..382c140 100644
--- a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mpk/controller/admin/MpkFileController.java
+++ b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mpk/controller/admin/MpkFileController.java
@@ -7,6 +7,7 @@
 import com.iailab.module.model.mpk.service.PackService;
 import io.swagger.v3.oas.annotations.Operation;
 import org.apache.commons.io.IOUtils;
+import org.apache.commons.lang.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.util.CollectionUtils;
@@ -47,16 +48,20 @@
     public CommonResult<MpkFileDTO> info(@PathVariable("id") String id) {
         MpkFileDTO schedule = mpkFileService.get(id);
         List<String> menuAndGroup = new ArrayList<>();
-        menuAndGroup.add(schedule.getMenuName());
-        menuAndGroup.add(schedule.getGroupName());
+        if (StringUtils.isNotBlank(schedule.getMenuName())) {
+            menuAndGroup.add(schedule.getMenuName());
+        }
+        if (StringUtils.isNotBlank(schedule.getGroupName())) {
+            menuAndGroup.add(schedule.getGroupName());
+        }
         schedule.setMenuAndGroup(menuAndGroup);
         return success(schedule);
     }
 
     @PreAuthorize("@ss.hasPermission('mpk:file:query')")
     @GetMapping("list")
-    public CommonResult<List<MpkFileDTO>> list() {
-        List<MpkFileDTO> list = mpkFileService.list(new HashMap<>());
+    public CommonResult<List<MpkFileDTO>> list(@RequestParam Map<String, Object> params) {
+        List<MpkFileDTO> list = mpkFileService.list(params);
 
         return success(list);
     }
@@ -70,7 +75,7 @@
                 dto.setGroupName(dto.getMenuAndGroup().get(1));
             }
         }
-        dto.setPyModule(packService.getModelPath(dto.getClassName()));
+        dto.setPyModule(packService.getModelPath(dto.getPkgName()));
         mpkFileService.save(dto);
         return CommonResult.success(true);
     }
@@ -91,7 +96,7 @@
                 dto.setGroupName(dto.getMenuAndGroup().get(1));
             }
         }
-        dto.setPyModule(packService.getModelPath(dto.getClassName()));
+        dto.setPyModule(packService.getModelPath(dto.getPkgName()));
         mpkFileService.update(dto);
         return CommonResult.success(true);
     }
@@ -113,10 +118,10 @@
     }
 
     @GetMapping("packageModel")
-    public void packageModel(String ids ,String projectId,String log ,String projectName,String version,String zipFileName,HttpServletResponse response) throws IOException {
+    public void packageModel(String projectId,String log ,String projectName,String version,String zipFileName,HttpServletResponse response) throws IOException {
         byte[] data;
         try {
-            data = mpkFileService.packageModel(Arrays.asList(ids.split(",")),projectId,projectName,zipFileName,log,version);
+            data = mpkFileService.packageModel(projectId,projectName,zipFileName,log,version);
         } catch (InterruptedException e) {
             throw new RuntimeException("模型打包失败",e);
         }

--
Gitblit v1.9.3