Raod 3 years ago
parent 7f92febe7d
commit 8224781011

@ -67,6 +67,13 @@
<artifactId>spring-boot-starter-gaea-log</artifactId> <artifactId>spring-boot-starter-gaea-log</artifactId>
</dependency> </dependency>
<dependency>
<groupId>org.flywaydb</groupId>
<artifactId>flyway-core</artifactId>
<version>5.2.1</version>
</dependency>
<dependency> <dependency>
<groupId>com.alibaba</groupId> <groupId>com.alibaba</groupId>

@ -11,10 +11,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
* @since 2021-02-03 * @since 2021-02-03
*/ */
@EnabledGaeaConfiguration @EnabledGaeaConfiguration
@SpringBootApplication(scanBasePackages = { @SpringBootApplication
"com.anjiplus.template.gaea",
"com.anji.plus"
})
@MapperScan(basePackages = { @MapperScan(basePackages = {
"com.anjiplus.template.gaea.business.modules.*.dao", "com.anjiplus.template.gaea.business.modules.*.dao",
"com.anjiplus.template.gaea.business.modules.*.**.dao", "com.anjiplus.template.gaea.business.modules.*.**.dao",

@ -65,4 +65,37 @@ public interface ResponseCode {
* *
*/ */
String COMPONENT_NOT_LOAD = "Component.load.check.error"; String COMPONENT_NOT_LOAD = "Component.load.check.error";
String AUTH_PASSWORD_NOTSAME = "1001";
String USER_PASSWORD_CONFIG_PASSWORD_CANOT_EQUAL = "1002";
String OLD_PASSWORD_ERROR = "1003";
String USER_ONTEXIST_ORGINFO = "1004";
String USER_ONTEXIST_ROLEINFO = "1005";
String MENU_TABLE_CODE_EXIST = "1006";
String USER_CODE_ISEXIST = "1007";
String ROLE_CODE_ISEXIST = "1008";
String MENU_CODE_ISEXIST = "1009";
String ORG_CODE_ISEXIST = "1010";
String SEARCHNAME_ISEXIST = "1011";
String SETTINGNAME_ISEXIST = "1012";
String DICCODE_ISEXIST = "1013";
String DEVICEID_LENGTH = "1014";
String USERINFO_EMPTY = "1015";
String FILE_EMPTY_FILENAME = "2001";
String FILE_SUFFIX_UNSUPPORTED = "2002";
String FILE_UPLOAD_ERROR = "2003";
String FILE_ONT_EXSIT = "2004";
String LIST_IS_EMPTY = "2005";
String PUSHCODE_NEED_UNIQUE = "3001";
String RECEIVER_IS_EMPTY = "3002";
String DATA_SOURCE_CONNECTION_FAILED = "4001";
String DATA_SOURCE_TYPE_DOES_NOT_MATCH_TEMPORARILY = "4002";
String EXECUTE_SQL_ERROR = "4003";
String INCOMPLETE_PARAMETER_REPLACEMENT_VALUES = "4004";
String EXECUTE_JS_ERROR = "4005";
String ANALYSIS_DATA_ERROR = "4006";
String REPORT_CODE_ISEXIST = "4007";
String SET_CODE_ISEXIST = "4008";
String SOURCE_CODE_ISEXIST = "4009";
String CLASS_NOT_FOUND = "4010";
} }

@ -2,15 +2,11 @@
package com.anjiplus.template.gaea.business.modules.data.dashboard.dao.entity; package com.anjiplus.template.gaea.business.modules.data.dashboard.dao.entity;
import com.anji.plus.gaea.annotation.Unique; import com.anji.plus.gaea.annotation.Unique;
import com.anjiplus.template.gaea.common.RespCommonCode;
import lombok.Data;
import io.swagger.annotations.ApiModelProperty;
import com.anji.plus.gaea.curd.entity.GaeaBaseEntity; import com.anji.plus.gaea.curd.entity.GaeaBaseEntity;
import com.anjiplus.template.gaea.business.code.ResponseCode;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;
import javax.validation.constraints.*; import lombok.Data;
import java.sql.Timestamp;
/** /**
* @description entity * @description entity
@ -21,7 +17,7 @@ import java.sql.Timestamp;
@Data @Data
public class ReportDashboard extends GaeaBaseEntity { public class ReportDashboard extends GaeaBaseEntity {
@ApiModelProperty(value = "报表编码") @ApiModelProperty(value = "报表编码")
@Unique(code = RespCommonCode.REPORT_CODE_ISEXIST) @Unique(code = ResponseCode.REPORT_CODE_ISEXIST)
private String reportCode; private String reportCode;
@ApiModelProperty(value = "看板标题") @ApiModelProperty(value = "看板标题")
@ -55,4 +51,4 @@ public class ReportDashboard extends GaeaBaseEntity {
private Integer sort; private Integer sort;
} }

@ -3,7 +3,7 @@ package com.anjiplus.template.gaea.business.modules.data.dataSet.dao.entity;
import com.anji.plus.gaea.annotation.Unique; import com.anji.plus.gaea.annotation.Unique;
import com.anji.plus.gaea.curd.entity.GaeaBaseEntity; import com.anji.plus.gaea.curd.entity.GaeaBaseEntity;
import com.anjiplus.template.gaea.common.RespCommonCode; import com.anjiplus.template.gaea.business.code.ResponseCode;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
@ -17,7 +17,7 @@ import lombok.Data;
@Data @Data
public class DataSet extends GaeaBaseEntity { public class DataSet extends GaeaBaseEntity {
@ApiModelProperty(value = "数据集编码") @ApiModelProperty(value = "数据集编码")
@Unique(code = RespCommonCode.SET_CODE_ISEXIST) @Unique(code = ResponseCode.SET_CODE_ISEXIST)
private String setCode; private String setCode;
@ApiModelProperty(value = "数据集名称") @ApiModelProperty(value = "数据集名称")

@ -8,7 +8,7 @@ import com.anjiplus.template.gaea.business.modules.data.dataSetParam.dao.DataSet
import com.anjiplus.template.gaea.business.modules.data.dataSetParam.dao.entity.DataSetParam; import com.anjiplus.template.gaea.business.modules.data.dataSetParam.dao.entity.DataSetParam;
import com.anjiplus.template.gaea.business.modules.data.dataSetParam.service.DataSetParamService; import com.anjiplus.template.gaea.business.modules.data.dataSetParam.service.DataSetParamService;
import com.anjiplus.template.gaea.business.modules.data.dataSetParam.util.ParamsResolverHelper; import com.anjiplus.template.gaea.business.modules.data.dataSetParam.util.ParamsResolverHelper;
import com.anjiplus.template.gaea.common.RespCommonCode; import com.anjiplus.template.gaea.business.code.ResponseCode;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -60,7 +60,7 @@ public class DataSetParamServiceImpl implements DataSetParamService {
dynSentence = ParamsResolverHelper.resolveParams(contextData, dynSentence); dynSentence = ParamsResolverHelper.resolveParams(contextData, dynSentence);
} }
if (dynSentence.contains("${")) { if (dynSentence.contains("${")) {
throw BusinessExceptionBuilder.build(RespCommonCode.INCOMPLETE_PARAMETER_REPLACEMENT_VALUES, dynSentence); throw BusinessExceptionBuilder.build(ResponseCode.INCOMPLETE_PARAMETER_REPLACEMENT_VALUES, dynSentence);
} }
return dynSentence; return dynSentence;
} }
@ -102,7 +102,7 @@ public class DataSetParamServiceImpl implements DataSetParamService {
return Boolean.parseBoolean(engine.get("result").toString()); return Boolean.parseBoolean(engine.get("result").toString());
} catch (Exception ex) { } catch (Exception ex) {
throw BusinessExceptionBuilder.build(RespCommonCode.EXECUTE_JS_ERROR, ex.getMessage()); throw BusinessExceptionBuilder.build(ResponseCode.EXECUTE_JS_ERROR, ex.getMessage());
} }
} }
@ -133,4 +133,4 @@ public class DataSetParamServiceImpl implements DataSetParamService {
return true; return true;
} }
} }

@ -4,7 +4,7 @@ import com.alibaba.fastjson.JSONObject;
import com.anji.plus.gaea.exception.BusinessExceptionBuilder; import com.anji.plus.gaea.exception.BusinessExceptionBuilder;
import com.anjiplus.template.gaea.business.modules.data.dataSetTransform.controller.dto.DataSetTransformDto; import com.anjiplus.template.gaea.business.modules.data.dataSetTransform.controller.dto.DataSetTransformDto;
import com.anjiplus.template.gaea.business.modules.data.dataSetTransform.service.TransformStrategy; import com.anjiplus.template.gaea.business.modules.data.dataSetTransform.service.TransformStrategy;
import com.anjiplus.template.gaea.common.RespCommonCode; import com.anjiplus.template.gaea.business.code.ResponseCode;
import jdk.nashorn.api.scripting.ScriptObjectMirror; import jdk.nashorn.api.scripting.ScriptObjectMirror;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
@ -56,7 +56,7 @@ public class JsTransformServiceImpl implements TransformStrategy {
ScriptObjectMirror result = (ScriptObjectMirror) engine.get("result"); ScriptObjectMirror result = (ScriptObjectMirror) engine.get("result");
return result.values().stream().map(o -> JSONObject.parseObject(JSONObject.toJSONString(o))).collect(Collectors.toList()); return result.values().stream().map(o -> JSONObject.parseObject(JSONObject.toJSONString(o))).collect(Collectors.toList());
} catch (Exception ex) { } catch (Exception ex) {
throw BusinessExceptionBuilder.build(RespCommonCode.EXECUTE_JS_ERROR, ex.getMessage()); throw BusinessExceptionBuilder.build(ResponseCode.EXECUTE_JS_ERROR, ex.getMessage());
} }
} }
} }

@ -3,7 +3,7 @@ package com.anjiplus.template.gaea.business.modules.data.dataSource.dao.entity;
import com.anji.plus.gaea.annotation.Unique; import com.anji.plus.gaea.annotation.Unique;
import com.anji.plus.gaea.curd.entity.GaeaBaseEntity; import com.anji.plus.gaea.curd.entity.GaeaBaseEntity;
import com.anjiplus.template.gaea.common.RespCommonCode; import com.anjiplus.template.gaea.business.code.ResponseCode;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
@ -17,7 +17,7 @@ import lombok.Data;
@Data @Data
public class DataSource extends GaeaBaseEntity { public class DataSource extends GaeaBaseEntity {
@ApiModelProperty(value = "数据源编码") @ApiModelProperty(value = "数据源编码")
@Unique(code = RespCommonCode.SOURCE_CODE_ISEXIST) @Unique(code = ResponseCode.SOURCE_CODE_ISEXIST)
private String sourceCode; private String sourceCode;
@ApiModelProperty(value = "数据源名称") @ApiModelProperty(value = "数据源名称")

@ -1,7 +1,7 @@
package com.anjiplus.template.gaea.business.modules.data.dataSource.pool.util; package com.anjiplus.template.gaea.business.modules.data.dataSource.pool.util;
import com.anji.plus.gaea.exception.BusinessExceptionBuilder; import com.anji.plus.gaea.exception.BusinessExceptionBuilder;
import com.anjiplus.template.gaea.common.RespCommonCode; import com.anjiplus.template.gaea.business.code.ResponseCode;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import java.util.HashMap; import java.util.HashMap;
@ -62,7 +62,7 @@ public final class DriverClassUtil {
try { try {
Class.forName(driverClass); Class.forName(driverClass);
} catch (ClassNotFoundException e) { } catch (ClassNotFoundException e) {
throw BusinessExceptionBuilder.build(RespCommonCode.CLASS_NOT_FOUND, e.getMessage()); throw BusinessExceptionBuilder.build(ResponseCode.CLASS_NOT_FOUND, e.getMessage());
} }
} }
@ -83,7 +83,7 @@ public final class DriverClassUtil {
} }
} }
throw BusinessExceptionBuilder.build(RespCommonCode.CLASS_NOT_FOUND, "Can't auto find match driver class for url: " + url); throw BusinessExceptionBuilder.build(ResponseCode.CLASS_NOT_FOUND, "Can't auto find match driver class for url: " + url);
} }
} }

@ -17,7 +17,7 @@ import com.anjiplus.template.gaea.business.modules.data.dataSource.dao.entity.Da
import com.anjiplus.template.gaea.business.modules.data.dataSource.pool.constant.JdbcConstants; import com.anjiplus.template.gaea.business.modules.data.dataSource.pool.constant.JdbcConstants;
import com.anjiplus.template.gaea.business.modules.data.dataSource.pool.util.JdbcUtil; import com.anjiplus.template.gaea.business.modules.data.dataSource.pool.util.JdbcUtil;
import com.anjiplus.template.gaea.business.modules.data.dataSource.service.DataSourceService; import com.anjiplus.template.gaea.business.modules.data.dataSource.service.DataSourceService;
import com.anjiplus.template.gaea.common.RespCommonCode; import com.anjiplus.template.gaea.business.code.ResponseCode;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
@ -99,7 +99,7 @@ public class DataSourceServiceImpl implements DataSourceService {
testHttp(dto); testHttp(dto);
break; break;
default: default:
throw BusinessExceptionBuilder.build(RespCommonCode.DATA_SOURCE_TYPE_DOES_NOT_MATCH_TEMPORARILY); throw BusinessExceptionBuilder.build(ResponseCode.DATA_SOURCE_TYPE_DOES_NOT_MATCH_TEMPORARILY);
} }
return true; return true;
@ -117,7 +117,7 @@ public class DataSourceServiceImpl implements DataSourceService {
case JdbcConstants.HTTP: case JdbcConstants.HTTP:
return executeHttp(dto); return executeHttp(dto);
default: default:
throw BusinessExceptionBuilder.build(RespCommonCode.DATA_SOURCE_TYPE_DOES_NOT_MATCH_TEMPORARILY); throw BusinessExceptionBuilder.build(ResponseCode.DATA_SOURCE_TYPE_DOES_NOT_MATCH_TEMPORARILY);
} }
} }
@ -137,7 +137,7 @@ public class DataSourceServiceImpl implements DataSourceService {
case JdbcConstants.MYSQL: case JdbcConstants.MYSQL:
return mysqlTotal(sourceDto, dto); return mysqlTotal(sourceDto, dto);
default: default:
throw BusinessExceptionBuilder.build(RespCommonCode.DATA_SOURCE_TYPE_DOES_NOT_MATCH_TEMPORARILY); throw BusinessExceptionBuilder.build(ResponseCode.DATA_SOURCE_TYPE_DOES_NOT_MATCH_TEMPORARILY);
} }
} }
@ -174,10 +174,10 @@ public class DataSourceServiceImpl implements DataSourceService {
try { try {
exchange = restTemplate.exchange(dto.getApiUrl(), HttpMethod.valueOf(dto.getMethod()), entity, JSONObject.class); exchange = restTemplate.exchange(dto.getApiUrl(), HttpMethod.valueOf(dto.getMethod()), entity, JSONObject.class);
} catch (Exception e) { } catch (Exception e) {
throw BusinessExceptionBuilder.build(RespCommonCode.DATA_SOURCE_CONNECTION_FAILED, e.getMessage()); throw BusinessExceptionBuilder.build(ResponseCode.DATA_SOURCE_CONNECTION_FAILED, e.getMessage());
} }
if (exchange.getStatusCode().isError()) { if (exchange.getStatusCode().isError()) {
throw BusinessExceptionBuilder.build(RespCommonCode.DATA_SOURCE_CONNECTION_FAILED, exchange.getBody()); throw BusinessExceptionBuilder.build(ResponseCode.DATA_SOURCE_CONNECTION_FAILED, exchange.getBody());
} }
List<JSONObject> result; List<JSONObject> result;
try { try {
@ -200,7 +200,7 @@ public class DataSourceServiceImpl implements DataSourceService {
result.add(jsonObject); result.add(jsonObject);
} }
} catch (Exception e) { } catch (Exception e) {
throw BusinessExceptionBuilder.build(RespCommonCode.ANALYSIS_DATA_ERROR, e.getMessage()); throw BusinessExceptionBuilder.build(ResponseCode.ANALYSIS_DATA_ERROR, e.getMessage());
} }
return result; return result;
} }
@ -229,19 +229,19 @@ public class DataSourceServiceImpl implements DataSourceService {
Object value = rs.getObject(t); Object value = rs.getObject(t);
jo.put(t, value); jo.put(t, value);
} catch (SQLException throwable) { } catch (SQLException throwable) {
throw BusinessExceptionBuilder.build(RespCommonCode.EXECUTE_SQL_ERROR, throwable.getMessage()); throw BusinessExceptionBuilder.build(ResponseCode.EXECUTE_SQL_ERROR, throwable.getMessage());
} }
}); });
list.add(jo); list.add(jo);
} }
return list; return list;
} catch (Exception throwable) { } catch (Exception throwable) {
throw BusinessExceptionBuilder.build(RespCommonCode.EXECUTE_SQL_ERROR, throwable.getMessage()); throw BusinessExceptionBuilder.build(ResponseCode.EXECUTE_SQL_ERROR, throwable.getMessage());
} finally { } finally {
try { try {
pooledConnection.close(); pooledConnection.close();
} catch (SQLException throwable) { } catch (SQLException throwable) {
throw BusinessExceptionBuilder.build(RespCommonCode.DATA_SOURCE_CONNECTION_FAILED, throwable.getMessage()); throw BusinessExceptionBuilder.build(ResponseCode.DATA_SOURCE_CONNECTION_FAILED, throwable.getMessage());
} }
} }
} }
@ -260,10 +260,10 @@ public class DataSourceServiceImpl implements DataSourceService {
try { try {
exchange = restTemplate.exchange(dto.getApiUrl(), HttpMethod.valueOf(dto.getMethod()), entity, JSONObject.class); exchange = restTemplate.exchange(dto.getApiUrl(), HttpMethod.valueOf(dto.getMethod()), entity, JSONObject.class);
} catch (Exception e) { } catch (Exception e) {
throw BusinessExceptionBuilder.build(RespCommonCode.DATA_SOURCE_CONNECTION_FAILED, e.getMessage()); throw BusinessExceptionBuilder.build(ResponseCode.DATA_SOURCE_CONNECTION_FAILED, e.getMessage());
} }
if (exchange.getStatusCode().isError()) { if (exchange.getStatusCode().isError()) {
throw BusinessExceptionBuilder.build(RespCommonCode.DATA_SOURCE_CONNECTION_FAILED, exchange.getBody()); throw BusinessExceptionBuilder.build(ResponseCode.DATA_SOURCE_CONNECTION_FAILED, exchange.getBody());
} }
JSONObject body = exchange.getBody(); JSONObject body = exchange.getBody();
List<JSONObject> result = new ArrayList<>(); List<JSONObject> result = new ArrayList<>();
@ -284,7 +284,7 @@ public class DataSourceServiceImpl implements DataSourceService {
log.info("数据库测试连接成功:{}", catalog); log.info("数据库测试连接成功:{}", catalog);
unPooledConnection.close(); unPooledConnection.close();
} catch (Exception e) { } catch (Exception e) {
throw BusinessExceptionBuilder.build(RespCommonCode.DATA_SOURCE_CONNECTION_FAILED, e.getMessage()); throw BusinessExceptionBuilder.build(ResponseCode.DATA_SOURCE_CONNECTION_FAILED, e.getMessage());
} }
} }
@ -305,10 +305,10 @@ public class DataSourceServiceImpl implements DataSourceService {
try { try {
exchange = restTemplate.exchange(apiUrl, HttpMethod.valueOf(method), entity, Object.class); exchange = restTemplate.exchange(apiUrl, HttpMethod.valueOf(method), entity, Object.class);
if (exchange.getStatusCode().isError()) { if (exchange.getStatusCode().isError()) {
throw BusinessExceptionBuilder.build(RespCommonCode.DATA_SOURCE_CONNECTION_FAILED, exchange.getBody()); throw BusinessExceptionBuilder.build(ResponseCode.DATA_SOURCE_CONNECTION_FAILED, exchange.getBody());
} }
} catch (RestClientException e) { } catch (RestClientException e) {
throw BusinessExceptionBuilder.build(RespCommonCode.DATA_SOURCE_CONNECTION_FAILED, e.getMessage()); throw BusinessExceptionBuilder.build(ResponseCode.DATA_SOURCE_CONNECTION_FAILED, e.getMessage());
} }
} }
@ -330,10 +330,10 @@ public class DataSourceServiceImpl implements DataSourceService {
try { try {
exchange = restTemplate.exchange(apiUrl, HttpMethod.valueOf(method), entity, Object.class); exchange = restTemplate.exchange(apiUrl, HttpMethod.valueOf(method), entity, Object.class);
if (exchange.getStatusCode().isError()) { if (exchange.getStatusCode().isError()) {
throw BusinessExceptionBuilder.build(RespCommonCode.DATA_SOURCE_CONNECTION_FAILED, exchange.getBody()); throw BusinessExceptionBuilder.build(ResponseCode.DATA_SOURCE_CONNECTION_FAILED, exchange.getBody());
} }
} catch (RestClientException e) { } catch (RestClientException e) {
throw BusinessExceptionBuilder.build(RespCommonCode.DATA_SOURCE_CONNECTION_FAILED, e.getMessage()); throw BusinessExceptionBuilder.build(ResponseCode.DATA_SOURCE_CONNECTION_FAILED, e.getMessage());
} }
} }
@ -381,4 +381,4 @@ public class DataSourceServiceImpl implements DataSourceService {
} }
} }

@ -2,7 +2,7 @@ package com.anjiplus.template.gaea.business.modules.data.report.dao.entity;
import com.anji.plus.gaea.annotation.Unique; import com.anji.plus.gaea.annotation.Unique;
import com.anji.plus.gaea.curd.entity.GaeaBaseEntity; import com.anji.plus.gaea.curd.entity.GaeaBaseEntity;
import com.anjiplus.template.gaea.common.RespCommonCode; import com.anjiplus.template.gaea.business.code.ResponseCode;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
@ -21,7 +21,7 @@ public class Report extends GaeaBaseEntity {
private String reportName; private String reportName;
@ApiModelProperty(value = "报表编码") @ApiModelProperty(value = "报表编码")
@Unique(code = RespCommonCode.REPORT_CODE_ISEXIST) @Unique(code = ResponseCode.REPORT_CODE_ISEXIST)
private String reportCode; private String reportCode;
@ApiModelProperty(value = "分组") @ApiModelProperty(value = "分组")

@ -2,7 +2,7 @@ package com.anjiplus.template.gaea.business.modules.dict.dao.entity;
import com.anji.plus.gaea.annotation.Unique; import com.anji.plus.gaea.annotation.Unique;
import com.anji.plus.gaea.curd.entity.GaeaBaseEntity; import com.anji.plus.gaea.curd.entity.GaeaBaseEntity;
import com.anjiplus.template.gaea.common.RespCommonCode; import com.anjiplus.template.gaea.business.code.ResponseCode;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable; import java.io.Serializable;
@ -22,7 +22,7 @@ public class GaeaDict extends GaeaBaseEntity implements Serializable {
/** /**
* *
*/ */
@Unique(code = RespCommonCode.DICCODE_ISEXIST) @Unique(code = ResponseCode.DICCODE_ISEXIST)
private String dictCode; private String dictCode;
/** /**

@ -9,7 +9,7 @@ import com.anjiplus.template.gaea.business.modules.export.dao.GaeaExportMapper;
import com.anjiplus.template.gaea.business.modules.export.dao.entity.GaeaExport; import com.anjiplus.template.gaea.business.modules.export.dao.entity.GaeaExport;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.anjiplus.template.gaea.common.RespCommonCode; import com.anjiplus.template.gaea.business.code.ResponseCode;
import com.anji.plus.gaea.curd.mapper.GaeaBaseMapper; import com.anji.plus.gaea.curd.mapper.GaeaBaseMapper;
import com.anji.plus.gaea.exception.BusinessExceptionBuilder; import com.anji.plus.gaea.exception.BusinessExceptionBuilder;
import com.anjiplus.template.gaea.common.util.StringPatternUtil; import com.anjiplus.template.gaea.common.util.StringPatternUtil;
@ -74,14 +74,14 @@ public class GaeaFileServiceImpl implements GaeaFileService {
try { try {
String fileName = file.getOriginalFilename(); String fileName = file.getOriginalFilename();
if (StringUtils.isBlank(fileName)) { if (StringUtils.isBlank(fileName)) {
throw BusinessExceptionBuilder.build(RespCommonCode.FILE_EMPTY_FILENAME); throw BusinessExceptionBuilder.build(ResponseCode.FILE_EMPTY_FILENAME);
} }
String suffixName = fileName.substring(fileName.lastIndexOf(".")); String suffixName = fileName.substring(fileName.lastIndexOf("."));
//白名单校验(不区分大小写) //白名单校验(不区分大小写)
List<String> list = new ArrayList<String>(Arrays.asList(whiteList.split("\\|"))); List<String> list = new ArrayList<String>(Arrays.asList(whiteList.split("\\|")));
list.addAll(list.stream().map(String::toUpperCase).collect(Collectors.toList())); list.addAll(list.stream().map(String::toUpperCase).collect(Collectors.toList()));
if (!list.contains(suffixName)) { if (!list.contains(suffixName)) {
throw BusinessExceptionBuilder.build(RespCommonCode.FILE_SUFFIX_UNSUPPORTED); throw BusinessExceptionBuilder.build(ResponseCode.FILE_SUFFIX_UNSUPPORTED);
} }
// 生成文件唯一性标识 // 生成文件唯一性标识
String fileId = UUID.randomUUID().toString(); String fileId = UUID.randomUUID().toString();
@ -104,7 +104,7 @@ public class GaeaFileServiceImpl implements GaeaFileService {
} catch (Exception e) { } catch (Exception e) {
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
log.error("file upload error: {}", e); log.error("file upload error: {}", e);
throw BusinessExceptionBuilder.build(RespCommonCode.FILE_UPLOAD_ERROR); throw BusinessExceptionBuilder.build(ResponseCode.FILE_UPLOAD_ERROR);
} }
} }
@ -118,12 +118,12 @@ public class GaeaFileServiceImpl implements GaeaFileService {
queryWrapper.eq(GaeaFile::getFileId, fileId); queryWrapper.eq(GaeaFile::getFileId, fileId);
GaeaFile gaeaFile = gaeaFileMapper.selectOne(queryWrapper); GaeaFile gaeaFile = gaeaFileMapper.selectOne(queryWrapper);
if (null == gaeaFile) { if (null == gaeaFile) {
throw BusinessExceptionBuilder.build(RespCommonCode.FILE_ONT_EXSIT); throw BusinessExceptionBuilder.build(ResponseCode.FILE_ONT_EXSIT);
} }
//解析文件路径、文件名和后缀 //解析文件路径、文件名和后缀
String filePath = gaeaFile.getFilePath(); String filePath = gaeaFile.getFilePath();
if (StringUtils.isBlank(filePath)) { if (StringUtils.isBlank(filePath)) {
throw BusinessExceptionBuilder.build(RespCommonCode.FILE_ONT_EXSIT); throw BusinessExceptionBuilder.build(ResponseCode.FILE_ONT_EXSIT);
} }
String filename = filePath.substring(filePath.lastIndexOf(File.separator)); String filename = filePath.substring(filePath.lastIndexOf(File.separator));
String fileSuffix = filename.substring(filename.lastIndexOf(".")); String fileSuffix = filename.substring(filename.lastIndexOf("."));

@ -24,6 +24,13 @@ spring:
port: 6379 port: 6379
password: appuser@anji password: appuser@anji
database: 1 database: 1
flyway:
baseline-on-migrate: true
#数据库连接配置
url: ${spring.datasource.url}
user: ${spring.datasource.username}
password: ${spring.datasource.password}
placeholder-replacement: false
generator: generator:
enabled: true enabled: true
workspace: /workspace/gaea workspace: /workspace/gaea

@ -0,0 +1,25 @@
CREATE
DATABASE IF NOT EXISTS `aj_report` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
USE
`aj_report`;
CREATE TABLE `flyway_schema_history`
(
`installed_rank` int(11) NOT NULL,
`version` varchar(50) DEFAULT NULL,
`description` varchar(200) NOT NULL,
`type` varchar(20) NOT NULL,
`script` varchar(1000) NOT NULL,
`checksum` int(11) DEFAULT NULL,
`installed_by` varchar(100) NOT NULL,
`installed_on` timestamp NOT NULL DEFAULT current_timestamp(),
`execution_time` int(11) NOT NULL,
`success` tinyint(1) NOT NULL,
PRIMARY KEY (`installed_rank`),
KEY `flyway_schema_history_s_idx` (`success`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
insert into `flyway_schema_history`(`installed_rank`, `version`, `description`, `type`, `script`, `checksum`,
`installed_by`, `installed_on`, `execution_time`, `success`)
values (1, '1', '<< Flyway Baseline >>', 'BASELINE', '<< Flyway Baseline >>', NULL, 'admin', now(), 0, 1);

@ -0,0 +1,321 @@
/*
Navicat Premium Data Transfer
Source Server : 10.108.26.197gaea-dev
Source Server Type : MySQL
Source Server Version : 50728
Source Host : 10.108.26.197:3306
Source Schema : aj_report
Target Server Type : MySQL
Target Server Version : 50728
File Encoding : 65001
Date: 22/06/2021 15:38:42
*/
SET NAMES utf8mb4;
SET
FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for gaea_dict
-- ----------------------------
DROP TABLE IF EXISTS `gaea_dict`;
CREATE TABLE `gaea_dict`
(
`id` int(11) NOT NULL AUTO_INCREMENT,
`dict_name` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '字典名称',
`dict_code` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '字典编码',
`remark` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '描述',
`create_by` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建人',
`create_time` timestamp(0) NULL DEFAULT NULL COMMENT '创建时间',
`update_by` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '更新用户',
`update_time` timestamp(0) NULL DEFAULT NULL COMMENT '更新时间',
`version` int(11) NULL DEFAULT NULL COMMENT '版本',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 49 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '数组字典' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for gaea_dict_item
-- ----------------------------
DROP TABLE IF EXISTS `gaea_dict_item`;
CREATE TABLE `gaea_dict_item`
(
`id` int(11) NOT NULL AUTO_INCREMENT,
`dict_code` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '数据字典编码',
`item_name` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '字典项名称',
`item_value` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '字典项值',
`item_extend` varchar(2048) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '字典扩展项',
`enabled` int(1) NULL DEFAULT 1 COMMENT '1:启用 0:禁用',
`locale` varchar(16) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '语言标识',
`remark` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '描述',
`sort` int(11) NULL DEFAULT NULL COMMENT '排序',
`create_by` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建人',
`create_time` timestamp(0) NULL DEFAULT NULL COMMENT '创建时间',
`update_by` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '更新用户',
`update_time` timestamp(0) NULL DEFAULT NULL COMMENT '更新时间',
`version` int(11) NULL DEFAULT NULL COMMENT '版本',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 269 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '数据字典项' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for gaea_export
-- ----------------------------
DROP TABLE IF EXISTS `gaea_export`;
CREATE TABLE `gaea_export`
(
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`file_id` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '文件在t_file中的id前端传它来读流接口显示http://auth/file/download/fileId',
`file_title` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '文件标题,比如:对账单报表6月份报表',
`result_start_time` datetime(0) NULL DEFAULT NULL COMMENT '导出前,查询的数据开始时间',
`result_end_time` datetime(0) NULL DEFAULT NULL COMMENT '导出前,查询的数据结束时间',
`result_size` bigint(20) NOT NULL DEFAULT 0 COMMENT '导出查询结果,数据总条数',
`file_create_time` datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP (0) COMMENT '文件导出触发时间',
`file_finish_time` datetime(0) NULL DEFAULT NULL COMMENT '文件生成完成时间',
`file_status` varchar(16) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '0' COMMENT '文件状态creating生成中success生成成功,failed生成失败',
`create_by` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '创建人',
`update_by` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '修改人',
`create_time` datetime(0) NOT NULL COMMENT '创建时间',
`update_time` datetime(0) NULL DEFAULT NULL COMMENT '修改时间',
`version` int(8) NULL DEFAULT NULL COMMENT '版本号',
`remark` varchar(1024) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 190 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '导出中心' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for gaea_file
-- ----------------------------
DROP TABLE IF EXISTS `gaea_file`;
CREATE TABLE `gaea_file`
(
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`file_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '生成的唯一uuid',
`file_path` varchar(1024) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '文件在linux中的完整目录比如/app/dist/export/excel/${fileid}.xlsx',
`url_path` varchar(1024) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '通过接口的下载完整http路径',
`file_instruction` varchar(1024) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '文件内容说明,比如 对账单(202001~202012)',
`create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`create_time` timestamp(0) NULL DEFAULT NULL,
`update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`update_time` timestamp(0) NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP (0),
`version` int(11) NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 291 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for gaea_report
-- ----------------------------
DROP TABLE IF EXISTS `gaea_report`;
CREATE TABLE `gaea_report`
(
`id` bigint(11) NOT NULL AUTO_INCREMENT,
`report_name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '名称',
`report_code` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '报表编码',
`report_group` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '分组',
`report_type` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '报表类型',
`report_desc` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '报表描述',
`enable_flag` int(1) NULL DEFAULT 1 COMMENT '0--已禁用 1--已启用 DIC_NAME=ENABLE_FLAG',
`delete_flag` int(1) NULL DEFAULT 0 COMMENT '0--未删除 1--已删除 DIC_NAME=DELETE_FLAG',
`create_by` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建人',
`create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
`update_by` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '更新人',
`update_time` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
`version` int(8) NULL DEFAULT NULL COMMENT '版本号',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `UNIQUE_REPORT_CODE`(`report_code`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 183 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for gaea_report_dashboard
-- ----------------------------
DROP TABLE IF EXISTS `gaea_report_dashboard`;
CREATE TABLE `gaea_report_dashboard`
(
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '看板id',
`report_code` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '报表编码',
`title` varchar(254) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '看板标题',
`width` bigint(20) NULL DEFAULT NULL COMMENT '宽度px',
`height` bigint(20) NULL DEFAULT NULL COMMENT '高度px',
`background_color` varchar(24) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '背景色',
`background_image` varchar(254) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '背景图片',
`preset_line` varchar(4096) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '工作台中的辅助线',
`refresh_seconds` int(11) NULL DEFAULT NULL COMMENT '自动刷新间隔秒数据字典REFRESH_TYPE',
`enable_flag` int(1) NULL DEFAULT 1 COMMENT '0--已禁用 1--已启用 DIC_NAME=ENABLE_FLAG',
`delete_flag` int(1) NULL DEFAULT 0 COMMENT ' 0--未删除 1--已删除 DIC_NAME=DEL_FLAG',
`sort` int(11) NULL DEFAULT 0 COMMENT '排序,降序',
`create_by` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`create_time` datetime(0) NULL DEFAULT NULL,
`update_by` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`update_time` datetime(0) NULL DEFAULT NULL,
`version` int(8) NULL DEFAULT NULL COMMENT '版本号',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `UNIQUE_REPORT_CODE`(`report_code`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 264 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for gaea_report_dashboard_widget
-- ----------------------------
DROP TABLE IF EXISTS `gaea_report_dashboard_widget`;
CREATE TABLE `gaea_report_dashboard_widget`
(
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '组件id',
`report_code` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '报表编码',
`type` varchar(24) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '组件类型参考字典DASHBOARD_PANEL_TYPE',
`setup` varchar(4096) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '组件的渲染属性json',
`data` varchar(4096) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '组件的数据属性json',
`collapse` varchar(4096) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '组件的配置属性json',
`position` varchar(4096) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '组件的大小位置属性json',
`enable_flag` int(1) NULL DEFAULT 1 COMMENT '0--已禁用 1--已启用 DIC_NAME=ENABLE_FLAG',
`delete_flag` int(1) NULL DEFAULT 0 COMMENT ' 0--未删除 1--已删除 DIC_NAME=DEL_FLAG',
`sort` bigint(20) NULL DEFAULT 0 COMMENT '排序,图层的概念',
`create_by` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`create_time` datetime(0) NULL DEFAULT NULL,
`update_by` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`update_time` datetime(0) NULL DEFAULT NULL,
`version` int(8) NULL DEFAULT NULL COMMENT '版本号',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 6286 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for gaea_report_data_set
-- ----------------------------
DROP TABLE IF EXISTS `gaea_report_data_set`;
CREATE TABLE `gaea_report_data_set`
(
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`set_code` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '数据集编码',
`set_name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '数据集名称',
`set_desc` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '数据集描述',
`source_code` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '数据源编码',
`dyn_sentence` varchar(2048) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '动态查询sql或者接口中的请求体',
`case_result` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '结果案例',
`enable_flag` int(1) NULL DEFAULT 1 COMMENT '0--已禁用 1--已启用 DIC_NAME=ENABLE_FLAG',
`delete_flag` int(1) NULL DEFAULT 0 COMMENT '0--未删除 1--已删除 DIC_NAME=DELETE_FLAG',
`create_by` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建人',
`create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
`update_by` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '更新人',
`update_time` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
`version` int(8) NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `unique_set_code`(`set_code`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 46 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '数据集管理' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for gaea_report_data_set_param
-- ----------------------------
DROP TABLE IF EXISTS `gaea_report_data_set_param`;
CREATE TABLE `gaea_report_data_set_param`
(
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`set_code` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '数据集编码',
`param_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '参数名',
`param_desc` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '参数描述',
`param_type` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '参数类型,字典=',
`sample_item` varchar(1080) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '参数示例项',
`required_flag` int(1) NULL DEFAULT 1 COMMENT '0--非必填 1--必填 DIC_NAME=REQUIRED_FLAG',
`validation_rules` varchar(2048) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'js校验字段值规则满足校验返回 true',
`order_num` int(11) NULL DEFAULT NULL COMMENT '排序',
`enable_flag` int(1) NULL DEFAULT 1 COMMENT '0--已禁用 1--已启用 DIC_NAME=ENABLE_FLAG',
`delete_flag` int(1) NULL DEFAULT 0 COMMENT '0--未删除 1--已删除 DIC_NAME=DELETE_FLAG',
`create_by` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建人',
`create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
`update_by` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '更新人',
`update_time` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
`version` int(8) NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 59 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '数据集查询参数' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for gaea_report_data_set_transform
-- ----------------------------
DROP TABLE IF EXISTS `gaea_report_data_set_transform`;
CREATE TABLE `gaea_report_data_set_transform`
(
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`set_code` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '数据集编码',
`transform_type` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '数据转换类型DIC_NAME=TRANSFORM_TYPE; jsjavaBean字典转换',
`transform_script` varchar(10800) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '数据转换script,处理逻辑',
`order_num` int(2) NULL DEFAULT NULL COMMENT '排序,执行数据转换顺序',
`enable_flag` int(1) NULL DEFAULT 1 COMMENT '0--已禁用 1--已启用 DIC_NAME=ENABLE_FLAG',
`delete_flag` int(1) NULL DEFAULT 0 COMMENT '0--未删除 1--已删除 DIC_NAME=DELETE_FLAG',
`create_by` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建人',
`create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
`update_by` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '更新人',
`update_time` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
`version` int(8) NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 36 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '数据集数据转换' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for gaea_report_data_source
-- ----------------------------
DROP TABLE IF EXISTS `gaea_report_data_source`;
CREATE TABLE `gaea_report_data_source`
(
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`source_code` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '数据源编码',
`source_name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '数据源名称',
`source_desc` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '数据源描述',
`source_type` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '数据源类型 DIC_NAME=SOURCE_TYPE; mysqloracesqlserverelasticsearch接口javaBean数据源类型字典中item-extend动态生成表单',
`source_config` varchar(2048) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '数据源连接配置json关系库{ jdbcUrl:\'\', username:\'\', password:\'\' } ES{ hostList:\' ip1:9300,
ip2:9300,
ip3:9300\', clusterName:\'elasticsearch_cluster\' } 接口{ apiUrl:\' http://ip:port/url\', method:\'\' } javaBean{ beanNamw:\' xxx\' }',
`enable_flag` int(1) NULL DEFAULT 1 COMMENT '0--已禁用 1--已启用 DIC_NAME=ENABLE_FLAG',
`delete_flag` int(1) NULL DEFAULT 0 COMMENT '0--未删除 1--已删除 DIC_NAME=DELETE_FLAG',
`create_by` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建人',
`create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
`update_by` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '更新人',
`update_time` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
`version` int(8) NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `unique_source_code`(`source_code`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 43 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '数据源管理' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for gaea_report_excel
-- ----------------------------
DROP TABLE IF EXISTS `gaea_report_excel`;
CREATE TABLE `gaea_report_excel`
(
`id` bigint(11) NOT NULL AUTO_INCREMENT,
`report_code` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '报表编码',
`set_codes` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '数据集编码,以|分割',
`set_param` varchar(1024) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '数据集查询参数',
`json_str` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '报表json串',
`enable_flag` int(1) NULL DEFAULT 1 COMMENT '0--已禁用 1--已启用 DIC_NAME=ENABLE_FLAG',
`delete_flag` int(1) NULL DEFAULT 0 COMMENT '0--未删除 1--已删除 DIC_NAME=DELETE_FLAG',
`create_by` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建人',
`create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
`update_by` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '更新人',
`update_time` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
`version` int(8) NULL DEFAULT NULL COMMENT '版本号',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `UNIQUE_REPORT_CODE`(`report_code`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 207 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for gaea_ui_i18n
-- ----------------------------
DROP TABLE IF EXISTS `gaea_ui_i18n`;
CREATE TABLE `gaea_ui_i18n`
(
`id` int(11) NOT NULL AUTO_INCREMENT,
`locale` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'zh' COMMENT '语言标识',
`cata_type` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '行业标识',
`system` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '所属系统',
`module` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`code` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '字段编码',
`name` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '字段名称',
`remark` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '业务描述',
`refer` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '关联表名',
`enabled` int(1) NOT NULL DEFAULT 1 COMMENT '启用状态1:启用 0:禁用',
`create_by` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建人',
`create_time` timestamp(0) NULL DEFAULT NULL COMMENT '创建时间',
`update_by` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '更新用户',
`update_time` timestamp(0) NULL DEFAULT NULL COMMENT '更新时间',
`version` int(11) NULL DEFAULT NULL COMMENT '版本',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 4765 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '字段命名国际化管理' ROW_FORMAT = Dynamic;
SET
FOREIGN_KEY_CHECKS = 1;
Loading…
Cancel
Save