update
This commit is contained in:
@@ -44,6 +44,43 @@
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<configuration>
|
||||
<layout>ZIP</layout>
|
||||
<includes>
|
||||
<include>
|
||||
<artifactId>physical-launcher</artifactId>
|
||||
<groupId>org.jeecgframework.boot</groupId>
|
||||
</include>
|
||||
</includes>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-assembly-plugin</artifactId>
|
||||
<configuration>
|
||||
<descriptors>
|
||||
<!-- assembly配置文件位置 -->
|
||||
<descriptor>src/main/assembly/assembly.xml</descriptor>
|
||||
</descriptors>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>make-assembly</id>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>single</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<configuration>
|
||||
<skipTests>true</skipTests>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
71
physical-launcher/src/main/assembly/assembly.xml
Normal file
71
physical-launcher/src/main/assembly/assembly.xml
Normal file
@@ -0,0 +1,71 @@
|
||||
<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2
|
||||
http://maven.apache.org/xsd/assembly-1.1.2.xsd">
|
||||
<!--
|
||||
必须写,否则打包时会有 assembly ID must be present and non-empty 错误
|
||||
这个名字最终会追加到打包的名字的末尾,如项目的名字为 speed-api-0.0.1-SNAPSHOT,
|
||||
则最终生成的包名为 speed-api-0.0.1-SNAPSHOT-bin.zip
|
||||
-->
|
||||
<id>bin</id>
|
||||
|
||||
<!-- 打包后的文件格式,可以是zip,tar,tar.gz,tar.bz2,jar,war,dir -->
|
||||
<formats>
|
||||
<format>zip</format>
|
||||
</formats>
|
||||
|
||||
<!-- 压缩包下是否生成和项目名相同的根目录 -->
|
||||
<includeBaseDirectory>false</includeBaseDirectory>
|
||||
|
||||
<dependencySets>
|
||||
<dependencySet>
|
||||
<!-- 不使用项目的artifact,第三方jar不要解压,打包进zip文件的lib目录 -->
|
||||
<useProjectArtifact>false</useProjectArtifact>
|
||||
<outputDirectory>lib</outputDirectory>
|
||||
<unpack>false</unpack>
|
||||
<!-- 将scope为runtime的依赖包打包到lib目录下。 -->
|
||||
<scope>runtime</scope>
|
||||
</dependencySet>
|
||||
</dependencySets>
|
||||
|
||||
<fileSets>
|
||||
<!-- 把项目相关的说明文件,打包进zip文件的根目录 -->
|
||||
<fileSet>
|
||||
<directory>${project.basedir}</directory>
|
||||
<outputDirectory></outputDirectory>
|
||||
<includes>
|
||||
<include>README*</include>
|
||||
<include>LICENSE*</include>
|
||||
<include>NOTICE*</include>
|
||||
<include>db*</include>
|
||||
<include>templates*</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
|
||||
<!-- 把项目的配置文件,打包进zip文件的config目录 -->
|
||||
<fileSet>
|
||||
<directory>${project.basedir}/src/main/resources</directory>
|
||||
<outputDirectory>config</outputDirectory>
|
||||
<excludes>
|
||||
<exclude>test</exclude>
|
||||
<exclude>test/*</exclude>
|
||||
<exclude>*.properties</exclude>
|
||||
</excludes>
|
||||
</fileSet>
|
||||
|
||||
<!-- 把项目的脚本文件,打包进zip文件的bin目录 -->
|
||||
<fileSet>
|
||||
<directory>${project.basedir}/src/main/bin</directory>
|
||||
<outputDirectory></outputDirectory>
|
||||
</fileSet>
|
||||
|
||||
<!-- 把项目自己编译出来的jar文件,打包进zip文件的根目录 -->
|
||||
<fileSet>
|
||||
<directory>${project.build.directory}</directory>
|
||||
<outputDirectory></outputDirectory>
|
||||
<includes>
|
||||
<include>*.jar</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
</fileSets>
|
||||
</assembly>
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -262,6 +262,9 @@ jeecg:
|
||||
password:
|
||||
type: STANDALONE
|
||||
enabled: true
|
||||
#cas单点登录
|
||||
cas:
|
||||
prefixUrl: http://cas.example.org:8443/cas
|
||||
#Mybatis输出sql日志
|
||||
logging:
|
||||
level:
|
||||
|
||||
@@ -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<NasaDataRecord, IN
|
||||
QueryWrapper<NasaDataRecord> queryWrapper = QueryGenerator.initQueryWrapper(nasaDataRecord, req.getParameterMap());
|
||||
Page<NasaDataRecord> page = new Page<NasaDataRecord>(pageNo, pageSize);
|
||||
IPage<NasaDataRecord> pageList = nasaDataRecordService.page(page, queryWrapper);
|
||||
pageList.getRecords().forEach(nr -> {
|
||||
String fileList = nr.getFileList();
|
||||
if (StringUtils.isNotBlank(fileList)) {
|
||||
Map<String, String> files = JSON.parseObject(fileList, Map.class);
|
||||
nr.setFileMap(files);
|
||||
}
|
||||
});
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
@@ -72,6 +82,23 @@ public class NasaDataRecordController extends JeecgController<NasaDataRecord, IN
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
@GetMapping(value = "/fix")
|
||||
public Result<String> fix() {
|
||||
List<NasaDataRecord> list = nasaDataRecordService.list();
|
||||
list.forEach(nr -> {
|
||||
String fileList = nr.getFileList();
|
||||
if (StringUtils.isNotBlank(fileList)) {
|
||||
List<Map<String, String>> list1 = JSON.parseObject(fileList, new TypeReference<>() {});
|
||||
Map<String, String> 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<NasaDataRecord, IN
|
||||
@RequiresPermissions("database:nasa_data_record:edit")
|
||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST})
|
||||
public Result<String> edit(@RequestBody NasaDataRecord nasaDataRecord) {
|
||||
Map<String, String> 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<NasaDataRecord, IN
|
||||
if (nasaDataRecord == null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
String fileList = nasaDataRecord.getFileList();
|
||||
if (StringUtils.isNotBlank(fileList)) {
|
||||
Map<String, String> files = JSON.parseObject(fileList, Map.class);
|
||||
nasaDataRecord.setFileMap(files);
|
||||
}
|
||||
return Result.OK(nasaDataRecord);
|
||||
}
|
||||
|
||||
@@ -140,7 +176,7 @@ public class NasaDataRecordController extends JeecgController<NasaDataRecord, IN
|
||||
* @param request
|
||||
* @param nasaDataRecord
|
||||
*/
|
||||
|
||||
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, NasaDataRecord nasaDataRecord) {
|
||||
return super.exportXls(request, nasaDataRecord, NasaDataRecord.class, "NASA数据管理");
|
||||
|
||||
@@ -11,6 +11,7 @@ import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @Description: NASA数据管理
|
||||
@@ -133,10 +134,13 @@ public class NasaDataRecord implements Serializable {
|
||||
@Excel(name = "附件IDs", width = 15)
|
||||
@Schema(description = "附件IDs")
|
||||
private String fileList;
|
||||
|
||||
@TableField(exist = false)
|
||||
private Map<String, String> fileMap;
|
||||
/**
|
||||
* 原始数据
|
||||
*/
|
||||
@Excel(name = "原始数据", width = 15)
|
||||
@Schema(description = "原始数据")
|
||||
private String originData;
|
||||
private String originData;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user