Raod 3 years ago
parent 0162467aed
commit 50086f47bc

@ -0,0 +1,27 @@
package com.anjiplus.template.gaea.business;
import com.anji.plus.gaea.annotation.enabled.EnabledGaeaConfiguration;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
/**
*
* @author lr
* @since 2021-02-03
*/
@EnabledGaeaConfiguration
@SpringBootApplication(scanBasePackages = {
"com.anjiplus.template.gaea",
"com.anji.plus"
})
@MapperScan(basePackages = {
"com.anjiplus.template.gaea.business.modules.*.dao",
"com.anjiplus.template.gaea.business.modules.*.**.dao",
"com.anji.plus.gaea.*.module.*.dao"
})
public class ReportApplication {
public static void main( String[] args ) {
SpringApplication.run(ReportApplication.class);
}
}

@ -0,0 +1,83 @@
spring:
application:
name: gaea-business
cloud:
nacos:
server-addr: 10.108.26.121:8848,10.108.26.145:8848
username: gaea
password: p@ss1234
# config:
# namespace: 5c6b6687-ad43-450f-88b6-e704ff78d83f
# file-extension: yaml
discovery:
namespace: 5c6b6687-ad43-450f-88b6-e704ff78d83f
jackson:
date-format: yyyy-MM-dd HH:mm:ss
messages:
basename: i18n/messages
datasource:
url: jdbc:mysql://10.108.26.197:3306/aj_report?characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&useSSL=false
username: root
password: appuser@anji
redis:
host: 10.108.26.197
port: 6379
password: appuser@anji
database: 1
generator:
enabled: true
workspace: /workspace/gaea
templatePath: template
server:
port: 9092
# servlet:
# context-path: /business
mybatis-plus:
configuration:
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
call-setters-on-nulls: true
mapperLocations:
- classpath*:/mapper/**/*.xml
- classpath*:/modeler-mybatis-mappings/**/*.xml
gaea:
subscribes:
security:
enabled: true
push:
enabled: true
sms:
aliyun:
access-key-id:
secret:
audit-log:
enabled: true
callback-url: http://127.0.0.1:9091/log/callback
export:
enabled: true
# 邮箱发送配置
mail:
# host不配置会注入失败
host: smtp.163.com
default-encoding: utf-8
protocol: smtp
properties:
mail:
smtp:
connectiontimeout: 5000
timeout: 3000
management:
endpoints:
web:
base-path: /
logging:
level:
com.alibaba.cloud.nacos.client.NacosPropertySourceBuilder: debug
file:
dist-path: /app/disk/upload/
white-list: .png|.jpg|.gif|.icon|.pdf|.xlsx|.xls|.csv|.mp4|.avi
excelSuffix: .xlsx|.xls|.csv
downloadPath: http://10.108.26.197/business/file/download

@ -0,0 +1,17 @@
spring:
application:
name: gaea-business
cloud:
nacos:
server-addr: 10.108.142.118:8848
username: gaea
password: p@ss1234
config:
namespace: fe5a998f-1149-4f55-aa83-e7552279058c
file-extension: yaml
discovery:
namespace: fe5a998f-1149-4f55-aa83-e7552279058c
generator:
enabled: false
workspace: /workspace/gaea
templatePath: template

@ -0,0 +1,9 @@
spring:
profiles:
active: @spring.profiles.active@
logging:
config: classpath:logback.xml
generator:
tableExclude:
mysql: "AND table_name not like 'gaea_%' AND table_name not like 'ACT_%'"

@ -0,0 +1,37 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<property name="LOG_HOME" value="./logs"/>
<property name="LOG_NAME" value="gaea-business"/>
<!--控制台-->
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%d{MM-dd HH:mm:ss.SSS} | %thread |-%-5level %logger{36}:%L - %msg%n</pattern>
</encoder>
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
<level>INFO</level>
</filter>
</appender>
<!-- 日志文件 -->
<appender name="LOGFILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${LOG_HOME}/${LOG_NAME}.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<fileNamePattern>${LOG_HOME}/%d{yyyy-MM-dd}/${LOG_NAME}-%i.log</fileNamePattern>
<maxFileSize>50MB</maxFileSize>
<maxHistory>30</maxHistory>
</rollingPolicy>
<layout class="ch.qos.logback.classic.PatternLayout">
<pattern>%d{MM-dd HH:mm:ss.SSS} |-%-5level %logger{36}:%L - %m%n</pattern>
</layout>
</appender>
<!-- nacos心跳日志关闭 -->
<logger name="com.alibaba.nacos.client.config.impl.ClientWorker" level="off" />
<root level="INFO">
<appender-ref ref="STDOUT" />
<appender-ref ref="LOGFILE" />
</root>
</configuration>

@ -0,0 +1,29 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.anjiplus.template.gaea.business.modules.data.dataSet.dao.DataSetMapper">
<resultMap type="com.anjiplus.template.gaea.business.modules.data.dataSet.dao.entity.DataSet" id="DataSetMap">
<!--jdbcType="{column.columnType}"-->
<result property="id" column="id" />
<result property="setCode" column="set_code" />
<result property="setName" column="set_name" />
<result property="setDesc" column="set_desc" />
<result property="sourceCode" column="source_code" />
<result property="dynSentence" column="dyn_sentence" />
<result property="caseResult" column="case_result" />
<result property="enableFlag" column="enable_flag" />
<result property="deleteFlag" column="delete_flag" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="version" column="version" />
</resultMap>
<sql id="Base_Column_List">
id,set_code,set_name,set_desc,source_code,dyn_sentence,case_result,enable_flag,delete_flag,create_by,create_time,update_by,update_time,version
</sql>
<!--自定义sql -->
</mapper>

@ -0,0 +1,31 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.anjiplus.template.gaea.business.modules.data.dataSetParam.dao.DataSetParamMapper">
<resultMap type="com.anjiplus.template.gaea.business.modules.data.dataSetParam.dao.entity.DataSetParam" id="DataSetParamMap">
<!--jdbcType="{column.columnType}"-->
<result property="id" column="id" />
<result property="setCode" column="set_code" />
<result property="paramName" column="param_name" />
<result property="paramDesc" column="param_desc" />
<result property="paramType" column="param_type" />
<result property="sampleItem" column="sample_item" />
<result property="requiredFlag" column="required_flag" />
<result property="validationRules" column="validation_rules" />
<result property="orderNum" column="order_num" />
<result property="enableFlag" column="enable_flag" />
<result property="deleteFlag" column="delete_flag" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="version" column="version" />
</resultMap>
<sql id="Base_Column_List">
id,set_code,param_name,param_desc,param_type,sample_item,required_flag,validation_rules,order_num,enable_flag,delete_flag,create_by,create_time,update_by,update_time,version
</sql>
<!--自定义sql -->
</mapper>

@ -0,0 +1,27 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.anjiplus.template.gaea.business.modules.data.dataSetTransform.dao.DataSetTransformMapper">
<resultMap type="com.anjiplus.template.gaea.business.modules.data.dataSetTransform.dao.entity.DataSetTransform" id="DataSetTransformMap">
<!--jdbcType="{column.columnType}"-->
<result property="id" column="id" />
<result property="setCode" column="set_code" />
<result property="transformType" column="transform_type" />
<result property="transformScript" column="transform_script" />
<result property="orderNum" column="order_num" />
<result property="enableFlag" column="enable_flag" />
<result property="deleteFlag" column="delete_flag" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="version" column="version" />
</resultMap>
<sql id="Base_Column_List">
id,set_code,transform_type,transform_script,order_num,enable_flag,delete_flag,create_by,create_time,update_by,update_time,version
</sql>
<!--自定义sql -->
</mapper>

@ -0,0 +1,28 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.anjiplus.template.gaea.business.modules.data.dataSource.dao.DataSourceMapper">
<resultMap type="com.anjiplus.template.gaea.business.modules.data.dataSource.dao.entity.DataSource" id="DataSourceMap">
<!--jdbcType="{column.columnType}"-->
<result property="id" column="id" />
<result property="sourceCode" column="source_code" />
<result property="sourceName" column="source_name" />
<result property="sourceDesc" column="source_desc" />
<result property="sourceType" column="source_type" />
<result property="sourceConfig" column="source_config" />
<result property="enableFlag" column="enable_flag" />
<result property="deleteFlag" column="delete_flag" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="version" column="version" />
</resultMap>
<sql id="Base_Column_List">
id,source_code,source_name,source_desc,source_type,source_config,enable_flag,delete_flag,create_by,create_time,update_by,update_time,version
</sql>
<!--自定义sql -->
</mapper>

@ -0,0 +1,48 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.anjiplus.template.gaea.business.modules.export.dao.GaeaExportMapper">
<resultMap type="com.anjiplus.template.gaea.business.modules.export.dao.entity.GaeaExport" id="GaeaExportMap">
<result property="id" column="id" jdbcType="INTEGER"/>
<result property="fileId" column="file_id" jdbcType="VARCHAR"/>
<result property="fileTitle" column="file_title" jdbcType="VARCHAR"/>
<result property="resultStartTime" column="result_start_time" jdbcType="TIMESTAMP"/>
<result property="resultEndTime" column="result_end_time" jdbcType="TIMESTAMP"/>
<result property="resultSize" column="result_size" jdbcType="INTEGER"/>
<result property="fileCreateTime" column="file_create_time" jdbcType="TIMESTAMP"/>
<result property="fileFinishTime" column="file_finish_time" jdbcType="TIMESTAMP"/>
<result property="fileStatus" column="file_status" jdbcType="VARCHAR"/>
<result property="createBy" column="create_by" jdbcType="VARCHAR"/>
<result property="updateBy" column="update_by" jdbcType="VARCHAR"/>
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
<result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
<result property="version" column="version" jdbcType="INTEGER"/>
<result property="remark" column="remark" jdbcType="VARCHAR"/>
</resultMap>
<sql id="Base_Column_List">
id, file_id, file_title, result_start_time, result_end_time, result_size, file_create_time, file_finish_time,
file_status, create_by, update_by, create_time, update_time, version, remark
</sql>
<select id="queryExportInfo" resultMap="GaeaExportMap">
SELECT
<include refid="Base_Column_List"></include>
FROM gaea_export ge
WHERE 1=1
<if test="bo.fileTitle!=null and bo.fileTitle!=''">
and ge.file_title=#{bo.fileTitle}
</if>
<if test="ew == null or ew.sqlSegment == null or ew.sqlSegment == '' ">
ORDER BY
ge.create_time DESC
</if>
<if test="ew != null and ew.sqlSegment != null and ew.sqlSegment != '' ">
<if test="ew.paramNameValuePairs != null and ew.paramNameValuePairs.size > 0">
and
</if>
${ew.sqlSegment}
</if>
</select>
</mapper>

@ -0,0 +1,50 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.anjiplus.template.gaea.business.modules.gaeaUiI18n.dao.GaeaUiI18nMapper">
<resultMap type="com.anjiplus.template.gaea.business.modules.gaeaUiI18n.dao.entity.GaeaUiI18n" id="GaeaUiI18nMap">
<!--jdbcType="{column.columnType}"-->
<result property="id" column="id" />
<result property="locale" column="locale" />
<result property="cataType" column="cata_type" />
<result property="system" column="system" />
<result property="code" column="code" />
<result property="name" column="name" />
<result property="remark" column="remark" />
<result property="enabled" column="enabled" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="version" column="version" />
</resultMap>
<sql id="Base_Column_List">
id,locale,cata_type,system,code,name,remark,enabled,create_by,create_time,update_by,update_time,version
</sql>
<!--自定义sql -->
<select id="queryColumns" resultType="com.anjiplus.template.gaea.business.modules.gaeaUiI18n.service.impl.ColumnDesc" parameterType="java.lang.String">
select table_name as tableName,column_name as columnName,
column_type as columnType,data_type as dataType,character_maximum_length as maxLength,
column_comment as remark,column_default as defaultValue
from information_schema.columns
where table_schema=(select database())
and table_name not like 'ACT%'
<if test="tableName!=null">
and table_name like CONCAT('%', #{tableName})
</if>
</select>
<select id="queryTables" resultType="java.lang.String" parameterType="java.lang.String">
select concat(table_comment,':',table_name) as tableName
from information_schema.tables
where table_schema=(select database())
and table_name not like 'ACT%'
<if test="tableName!=null">
and table_name like CONCAT('%', #{tableName})
</if>
order by update_time desc
limit 100
</select>
<!--,table_comment as comment-->
</mapper>

@ -0,0 +1,31 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.anjiplus.template.gaea.business.modules.data.dashboard.dao.ReportDashboardMapper">
<resultMap type="com.anjiplus.template.gaea.business.modules.data.dashboard.dao.entity.ReportDashboard" id="ReportDashboardMap">
<!--jdbcType="{column.columnType}"-->
<result property="id" column="id" />
<result property="reportCode" column="report_code" />
<result property="title" column="title" />
<result property="width" column="width" />
<result property="height" column="height" />
<result property="backgroundColor" column="background_color" />
<result property="backgroundImage" column="background_image" />
<result property="presetLine" column="preset_line" />
<result property="refreshSeconds" column="refresh_seconds" />
<result property="enableFlag" column="enable_flag" />
<result property="deleteFlag" column="delete_flag" />
<result property="sort" column="sort" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
</resultMap>
<sql id="Base_Column_List">
id,report_code,title,width,height,background_color,background_image,preset_line,refresh_seconds,enable_flag,delete_flag,sort,create_by,create_time,update_by,update_time
</sql>
<!--自定义sql -->
</mapper>

@ -0,0 +1,29 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.anjiplus.template.gaea.business.modules.data.dashboardwidget.dao.ReportDashboardWidgetMapper">
<resultMap type="com.anjiplus.template.gaea.business.modules.data.dashboardwidget.dao.entity.ReportDashboardWidget" id="ReportDashboardWidgetMap">
<!--jdbcType="{column.columnType}"-->
<result property="id" column="id" />
<result property="reportCode" column="report_code" />
<result property="type" column="type" />
<result property="setup" column="setup" />
<result property="data" column="data" />
<result property="collapse" column="collapse" />
<result property="position" column="position" />
<result property="enableFlag" column="enable_flag" />
<result property="deleteFlag" column="delete_flag" />
<result property="sort" column="sort" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
</resultMap>
<sql id="Base_Column_List">
id,report_code,`type`,setup,`data`,`position`,collapse,enable_flag,delete_flag,sort,create_by,create_time,update_by,update_time
</sql>
<!--自定义sql -->
</mapper>

@ -0,0 +1,22 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.anjiplus.template.gaea.business.modules.data.reportexcel.dao.ReportExcelMapper">
<resultMap type="com.anjiplus.template.gaea.business.modules.data.reportexcel.dao.entity.ReportExcel" id="ReportMap">
<!--jdbcType="{column.columnType}"-->
<result property="id" column="id" />
<result property="reportCode" column="report_code" />
<result property="setCods" column="set_codes" />
<result property="setParam" column="set_param" />
<result property="jsonStr" column="json_str" />
<result property="enableFlag" column="enable_flag" />
<result property="deleteFlag" column="delete_flag" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="version" column="version" />
</resultMap>
</mapper>

@ -0,0 +1,29 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.anjiplus.template.gaea.business.modules.data.report.dao.ReportMapper">
<resultMap type="com.anjiplus.template.gaea.business.modules.data.report.dao.entity.Report" id="ReportMap">
<!--jdbcType="{column.columnType}"-->
<result property="id" column="id" />
<result property="reportName" column="report_name" />
<result property="reportCode" column="report_code" />
<result property="setCods" column="set_codes" />
<result property="reportGroup" column="report_group" />
<result property="reportDesc" column="report_desc" />
<result property="reportType" column="report_type" />
<result property="enableFlag" column="enable_flag" />
<result property="deleteFlag" column="delete_flag" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="version" column="version" />
</resultMap>
<sql id="Base_Column_List">
id,report_name,report_code,json_str,enable_flag,delete_flag,create_by,create_time,update_by,update_time,version
</sql>
<!--自定义sql -->
</mapper>
Loading…
Cancel
Save