From a93e8214d3a5a7235416f936505740648b55e061 Mon Sep 17 00:00:00 2001 From: ls Date: Thu, 23 Jan 2025 00:18:53 +0800 Subject: [PATCH] update --- physical-launcher/pom.xml | 37 ++++++++++ .../src/main/assembly/assembly.xml | 71 +++++++++++++++++++ .../src/main/resources/application-dev.yml | 4 ++ .../src/main/resources/application-prod.yml | 3 + .../main/resources/application-release.yml | 3 + .../controller/NasaDataRecordController.java | 40 ++++++++++- .../database/entity/NasaDataRecord.java | 6 +- 7 files changed, 161 insertions(+), 3 deletions(-) create mode 100644 physical-launcher/src/main/assembly/assembly.xml diff --git a/physical-launcher/pom.xml b/physical-launcher/pom.xml index 599becb..2bbf6cb 100644 --- a/physical-launcher/pom.xml +++ b/physical-launcher/pom.xml @@ -44,6 +44,43 @@ org.springframework.boot spring-boot-maven-plugin + + ZIP + + + physical-launcher + org.jeecgframework.boot + + + + + + + org.apache.maven.plugins + maven-assembly-plugin + + + + src/main/assembly/assembly.xml + + + + + make-assembly + package + + single + + + + + + + org.apache.maven.plugins + maven-surefire-plugin + + true + diff --git a/physical-launcher/src/main/assembly/assembly.xml b/physical-launcher/src/main/assembly/assembly.xml new file mode 100644 index 0000000..ebc6bd1 --- /dev/null +++ b/physical-launcher/src/main/assembly/assembly.xml @@ -0,0 +1,71 @@ + + + bin + + + + zip + + + + false + + + + + false + lib + false + + runtime + + + + + + + ${project.basedir} + + + README* + LICENSE* + NOTICE* + db* + templates* + + + + + + ${project.basedir}/src/main/resources + config + + test + test/* + *.properties + + + + + + ${project.basedir}/src/main/bin + + + + + + ${project.build.directory} + + + *.jar + + + + diff --git a/physical-launcher/src/main/resources/application-dev.yml b/physical-launcher/src/main/resources/application-dev.yml index 87ef459..afcc277 100644 --- a/physical-launcher/src/main/resources/application-dev.yml +++ b/physical-launcher/src/main/resources/application-dev.yml @@ -265,6 +265,10 @@ jeecg: # host: "http://127.0.0.1" # port: "7890" #Mybatis输出sql日志 + +#cas单点登录 +cas: + prefixUrl: http://cas.example.org:8443/cas logging: level: org.flywaydb: debug diff --git a/physical-launcher/src/main/resources/application-prod.yml b/physical-launcher/src/main/resources/application-prod.yml index 49dcbc5..ebea8f3 100644 --- a/physical-launcher/src/main/resources/application-prod.yml +++ b/physical-launcher/src/main/resources/application-prod.yml @@ -263,6 +263,9 @@ jeecg: type: STANDALONE enabled: true #Mybatis输出sql日志 +#cas单点登录 +cas: + prefixUrl: http://cas.example.org:8443/cas logging: level: org.flywaydb: debug diff --git a/physical-launcher/src/main/resources/application-release.yml b/physical-launcher/src/main/resources/application-release.yml index 561b52d..82168ab 100644 --- a/physical-launcher/src/main/resources/application-release.yml +++ b/physical-launcher/src/main/resources/application-release.yml @@ -262,6 +262,9 @@ jeecg: password: type: STANDALONE enabled: true +#cas单点登录 +cas: + prefixUrl: http://cas.example.org:8443/cas #Mybatis输出sql日志 logging: level: diff --git a/physical-module-system/physical-system-biz/src/main/java/org/jeecg/modules/database/controller/NasaDataRecordController.java b/physical-module-system/physical-system-biz/src/main/java/org/jeecg/modules/database/controller/NasaDataRecordController.java index d7c9bf3..f27f4bb 100644 --- a/physical-module-system/physical-system-biz/src/main/java/org/jeecg/modules/database/controller/NasaDataRecordController.java +++ b/physical-module-system/physical-system-biz/src/main/java/org/jeecg/modules/database/controller/NasaDataRecordController.java @@ -1,5 +1,7 @@ package org.jeecg.modules.database.controller; +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.TypeReference; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; @@ -8,6 +10,7 @@ import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServletResponse; import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.jeecg.common.api.vo.Result; import org.jeecg.common.aspect.annotation.AutoLog; @@ -19,7 +22,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import org.springframework.web.servlet.ModelAndView; -import java.util.Arrays; +import java.util.*; /** * @Description: NASA数据管理 @@ -54,6 +57,13 @@ public class NasaDataRecordController extends JeecgController queryWrapper = QueryGenerator.initQueryWrapper(nasaDataRecord, req.getParameterMap()); Page page = new Page(pageNo, pageSize); IPage pageList = nasaDataRecordService.page(page, queryWrapper); + pageList.getRecords().forEach(nr -> { + String fileList = nr.getFileList(); + if (StringUtils.isNotBlank(fileList)) { + Map files = JSON.parseObject(fileList, Map.class); + nr.setFileMap(files); + } + }); return Result.OK(pageList); } @@ -72,6 +82,23 @@ public class NasaDataRecordController extends JeecgController fix() { + List list = nasaDataRecordService.list(); + list.forEach(nr -> { + String fileList = nr.getFileList(); + if (StringUtils.isNotBlank(fileList)) { + List> list1 = JSON.parseObject(fileList, new TypeReference<>() {}); + Map files = new HashMap<>(); + list1.forEach(files::putAll); + nr.setFileMap(files); + nr.setFileList(JSON.toJSONString(files)); + nasaDataRecordService.updateById(nr); + } + }); + return Result.OK("fix成功!"); + } + /** * 编辑 * @@ -83,6 +110,10 @@ public class NasaDataRecordController extends JeecgController edit(@RequestBody NasaDataRecord nasaDataRecord) { + Map fileMap = nasaDataRecord.getFileMap(); + if (Objects.nonNull(fileMap)) { + nasaDataRecord.setFileList(JSON.toJSONString(fileMap)); + } nasaDataRecordService.updateById(nasaDataRecord); return Result.OK("编辑成功!"); } @@ -131,6 +162,11 @@ public class NasaDataRecordController extends JeecgController files = JSON.parseObject(fileList, Map.class); + nasaDataRecord.setFileMap(files); + } return Result.OK(nasaDataRecord); } @@ -140,7 +176,7 @@ public class NasaDataRecordController extends JeecgController fileMap; /** * 原始数据 */ @Excel(name = "原始数据", width = 15) @Schema(description = "原始数据") - private String originData; + private String originData; }