From 784ce3c64aebecd7e30ab9d4c88043e89c37b35d Mon Sep 17 00:00:00 2001 From: dengzedong <dengzedong@email> Date: 星期一, 25 十一月 2024 18:05:40 +0800 Subject: [PATCH] 添加方法的默认参数(pyFile,模型路径)bug --- iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mpk/controller/admin/MpkFileController.java | 9 +++++++-- 1 files changed, 7 insertions(+), 2 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 9853437..9de4bee 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,8 +48,12 @@ 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); } -- Gitblit v1.9.3