From 4ab0a458d83f0f838518057a58f087699f1803e1 Mon Sep 17 00:00:00 2001 From: lizhengwei Date: Fri, 3 Apr 2026 10:03:36 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E6=B8=85=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ruoyi-md-form/docs/init_table.sql | 166 ++++++++++++++--- .../ruoyi-md-form-starter/pom.xml | 44 ----- .../org/dromara/md/form/AppApplication.java | 17 -- .../java/org/dromara/md/form/AppContext.java | 29 --- .../config/BooksflowFormDataSourceConfig.java | 173 ------------------ .../config/BooksflowFormExceptionHandler.java | 55 ------ .../form/config/NacosPropertyLoadConfig.java | 19 -- .../dromara/md/form/config/SwaggerConfig.java | 37 ---- .../main/resources/config/application-dev.yml | 20 -- .../resources/config/application-perf.yml | 1 - .../resources/config/application-prod.yml | 1 - .../resources/config/application-test.yml | 1 - .../resources/config/application-tsrpd.yml | 1 - .../main/resources/config/application-uat.yml | 1 - .../src/main/resources/config/application.yml | 76 -------- .../src/main/resources/logback.xml | 139 -------------- .../test/resources/config/application-dev.yml | 20 -- 17 files changed, 136 insertions(+), 664 deletions(-) delete mode 100644 ruoyi-modules/ruoyi-md-form/ruoyi-md-form-starter/pom.xml delete mode 100644 ruoyi-modules/ruoyi-md-form/ruoyi-md-form-starter/src/main/java/org/dromara/md/form/AppApplication.java delete mode 100644 ruoyi-modules/ruoyi-md-form/ruoyi-md-form-starter/src/main/java/org/dromara/md/form/AppContext.java delete mode 100644 ruoyi-modules/ruoyi-md-form/ruoyi-md-form-starter/src/main/java/org/dromara/md/form/config/BooksflowFormDataSourceConfig.java delete mode 100644 ruoyi-modules/ruoyi-md-form/ruoyi-md-form-starter/src/main/java/org/dromara/md/form/config/BooksflowFormExceptionHandler.java delete mode 100644 ruoyi-modules/ruoyi-md-form/ruoyi-md-form-starter/src/main/java/org/dromara/md/form/config/NacosPropertyLoadConfig.java delete mode 100644 ruoyi-modules/ruoyi-md-form/ruoyi-md-form-starter/src/main/java/org/dromara/md/form/config/SwaggerConfig.java delete mode 100644 ruoyi-modules/ruoyi-md-form/ruoyi-md-form-starter/src/main/resources/config/application-dev.yml delete mode 100644 ruoyi-modules/ruoyi-md-form/ruoyi-md-form-starter/src/main/resources/config/application-perf.yml delete mode 100644 ruoyi-modules/ruoyi-md-form/ruoyi-md-form-starter/src/main/resources/config/application-prod.yml delete mode 100644 ruoyi-modules/ruoyi-md-form/ruoyi-md-form-starter/src/main/resources/config/application-test.yml delete mode 100644 ruoyi-modules/ruoyi-md-form/ruoyi-md-form-starter/src/main/resources/config/application-tsrpd.yml delete mode 100644 ruoyi-modules/ruoyi-md-form/ruoyi-md-form-starter/src/main/resources/config/application-uat.yml delete mode 100644 ruoyi-modules/ruoyi-md-form/ruoyi-md-form-starter/src/main/resources/config/application.yml delete mode 100644 ruoyi-modules/ruoyi-md-form/ruoyi-md-form-starter/src/main/resources/logback.xml delete mode 100644 ruoyi-modules/ruoyi-md-form/ruoyi-md-form-starter/src/test/resources/config/application-dev.yml diff --git a/ruoyi-modules/ruoyi-md-form/docs/init_table.sql b/ruoyi-modules/ruoyi-md-form/docs/init_table.sql index 0bee50740..8888c104c 100644 --- a/ruoyi-modules/ruoyi-md-form/docs/init_table.sql +++ b/ruoyi-modules/ruoyi-md-form/docs/init_table.sql @@ -1,15 +1,31 @@ create table form ( - id bigint unsigned auto_increment comment '主键ID' + id bigint unsigned auto_increment comment '主键ID' primary key, - code varchar(32) not null comment 'code', - name varchar(32) not null comment '表单名称', + name varchar(32) not null comment '表单名称', + code varchar(32) not null comment 'code', agent_id bigint not null, constraint un_code unique (agent_id, code) ) comment '动态表单' collate = utf8mb4_bin; +create table form_dict +( + id bigint auto_increment comment '主键ID' + primary key, + name varchar(100) not null comment '名称', + code varchar(100) not null comment '值', + remarks varchar(255) null comment '备注', + created_by bigint not null comment '创建人', + updated_by bigint null comment '更新人', + create_time datetime default CURRENT_TIMESTAMP not null comment '创建时间', + update_time datetime null on update CURRENT_TIMESTAMP comment '更新时间', + agent_id bigint not null, + deleted tinyint default 0 not null comment '是否删除(0:否,1:是)' +) + comment '动态表单字段字典表'; + create table form_field_dict ( id bigint auto_increment comment '主键ID' @@ -19,31 +35,68 @@ create table form_field_dict code varchar(100) not null comment '值', parent_id bigint unsigned null comment '父级ID,也可以是关联的id', other_fields json null comment '其他字段(JSON格式)', + check_ids varchar(255) null comment '检查ids:当删除里面的id时,进行校验是否有相关联', sort_order int default 0 null comment '排序', status tinyint default 1 not null comment '状态(1:启用,0:禁用)', - created_by bigint unsigned not null comment '创建人', - updated_by bigint unsigned null comment '更新人', + created_by bigint not null comment '创建人', + updated_by bigint null comment '更新人', create_time datetime default CURRENT_TIMESTAMP not null comment '创建时间', - update_time datetime null on update CURRENT_TIMESTAMP comment '更新时间', - agent_id bigint not null, + update_time datetime default CURRENT_TIMESTAMP null on update CURRENT_TIMESTAMP comment '更新时间', + agent_id bigint not null, deleted tinyint default 0 not null comment '是否删除(0:否,1:是)' ) comment '动态表单字段字典表'; -create index idx_agent_id_config_type - on form_field_dict (agent_id, config_type); +create index idx_agent_id_config_type_deleted + on form_field_dict (agent_id, config_type, deleted); + +create table form_print_config +( + id bigint auto_increment comment '主键ID' + primary key, + form_id bigint not null comment '关联的表单ID', + main_title varchar(255) null comment '主标题', + sub_title varchar(255) null comment '副标题', + display_format varchar(50) null comment '显示格式:简洁、标准、完整', + document_no_prefix varchar(50) null comment '单据编号前缀(如CG-)', + show_document_no tinyint(1) default 0 null comment '是否显示单据编号', + print_date_format varchar(50) null comment '打印日期格式', + show_print_date tinyint(1) default 0 null comment '是否显示打印日期', + show_page_number tinyint(1) default 0 null comment '是否显示页码', + column_width_mode varchar(50) null comment '列宽模式:固定宽度或自适应', + table_style varchar(50) default 'bordered' null comment '表格样式:有边框或无边框', + row_height varchar(50) default 'normal_40px' null comment '数据行高', + print_fields json null comment '打印字段', + file_size int null comment '模板文件大小', + file_name varchar(500) null comment '模板文件name', + file_type varchar(20) null comment '文件类型:doc、excel', + file_wps_id varchar(255) null comment 'file_wps_id', + file_url_ai varchar(500) null comment 'ai模板文件url', + file_url varchar(500) null comment '模板文件url', + mode int default 1 not null comment '打印配置模式(1、默认模式;2、模板打印模式)', + ext json null comment '扩展属性(JSON格式)', + created_by bigint unsigned not null comment '创建人', + updated_by bigint unsigned null comment '更新人', + create_time datetime default CURRENT_TIMESTAMP not null comment '创建时间', + update_time datetime null on update CURRENT_TIMESTAMP comment '更新时间', + agent_id bigint not null, + constraint un_form_id + unique (agent_id, form_id) +) + comment '表单打印配置表'; create table form_template ( - id bigint unsigned auto_increment comment '主键ID' + id bigint unsigned auto_increment comment '主键ID' primary key, - form_id bigint unsigned not null comment 'form id', - version int not null comment '版本', - created_by bigint unsigned not null comment '创建人', - updated_by bigint unsigned null comment '更新人', - create_time datetime default CURRENT_TIMESTAMP not null comment '创建时间', - update_time datetime null on update CURRENT_TIMESTAMP comment '更新时间', - agent_id bigint not null, + form_id bigint unsigned not null comment 'form id', + version int not null comment '版本', + content_encoding varchar(100) null comment '内容编码,保存时和上次的编码是否一致,一致时则不进行更新', + created_by bigint unsigned not null comment '创建人', + updated_by bigint unsigned null comment '更新人', + create_time datetime default CURRENT_TIMESTAMP not null comment '创建时间', + update_time datetime null on update CURRENT_TIMESTAMP comment '更新时间', + agent_id bigint not null, constraint un_name_version unique (agent_id, form_id, version) ) @@ -51,22 +104,75 @@ create table form_template create table form_template_field ( - id bigint unsigned auto_increment comment '主键ID' + id bigint unsigned auto_increment comment '主键ID' primary key, - template_id bigint unsigned null comment 'form_template 的id', - code varchar(32) not null comment '编码', - title varchar(32) not null comment '标题', - show_title varchar(32) not null comment 'show标题', - type varchar(32) not null comment '字段类型', - fixed tinyint(1) not null comment '固定(0不固定,1固定)', - ext json not null comment '扩展属性(JSON格式)', - created_by bigint unsigned not null comment '创建人', - updated_by bigint unsigned null comment '更新人', - create_time datetime default CURRENT_TIMESTAMP not null comment '创建时间', - update_time datetime null on update CURRENT_TIMESTAMP comment '更新时间', - agent_id bigint not null, + template_id bigint unsigned null comment 'form_template 的id', + code varchar(50) not null comment '编码', + parent_id bigint null comment '父id', + title varchar(50) not null comment '标题', + show_title varchar(50) not null comment 'show标题', + db_field varchar(255) null comment '数据库中关联字段(目前用作流程流转时数据判断)', + required tinyint(1) null comment ' 是否必填', + `show` tinyint(1) null comment ' 是否显示', + dcode varchar(50) null comment '字典code', + type varchar(32) not null comment '字段类型', + fixed tinyint(1) null comment '固定(0不固定,1固定)', + cascade_close varchar(2000) null comment '级联关,英文逗号分割', + cascade_open varchar(2000) null comment '级联开,英文逗号分割', + edit tinyint(1) null comment '是否可编辑', + fmt_constraint varchar(100) null comment '格式约束:int、double、str、boolean、date、select(下拉选择)', + sort_order int default 999 not null comment '排序', + edit_disabled_msg varchar(500) null comment '可编辑按钮禁用提示', + edit_disabled tinyint(1) null comment '可编辑按钮禁用', + show_cascade varchar(2000) null comment '字典级联显示', + ext json not null comment '扩展属性(JSON格式)', + created_by bigint unsigned not null comment '创建人', + updated_by bigint unsigned null comment '更新人', + create_time datetime default CURRENT_TIMESTAMP not null comment '创建时间', + update_time datetime null on update CURRENT_TIMESTAMP comment '更新时间', + agent_id bigint not null, + line tinyint null comment '占行数量(0-不占一行,其他-占的行数)', constraint un_template_id_code unique (agent_id, template_id, code) ) comment '动态表单模板字段' collate = utf8mb4_bin; +create table modify_log_record +( + id bigint unsigned auto_increment comment '主键ID' + primary key, + entity_type varchar(50) not null comment '实体类型,如:FormFieldDict, FormTemplate, FormTemplateField等', + entity_id varchar(50) not null comment '实体ID', + form_code varchar(32) null comment 'form_code', + description varchar(200) null comment '描述', + field_chinese_name varchar(100) not null comment '字段中文名', + field_english_name varchar(100) not null comment '字段英文名', + old_value varchar(2048) null comment '修改前值', + new_value varchar(2048) null comment '修改后值', + operator bigint unsigned not null comment '操作人ID', + operator_name varchar(100) not null comment '操作人ID', + operation_time datetime default CURRENT_TIMESTAMP not null comment '操作时间', + create_time datetime default CURRENT_TIMESTAMP not null comment '创建时间', + update_time datetime null on update CURRENT_TIMESTAMP comment '更新时间', + service_name varchar(50) not null comment '服务名称', + deleted tinyint default 0 not null comment '是否删除(0:否,1:是)', + agent_id bigint not null comment '租户ID' +) + comment '修改记录日志表' collate = utf8mb4_bin; + +create index idx_entity_type_entity_id + on modify_log_record (agent_id, entity_type, entity_id); + +create table tenant_init_status +( + id bigint unsigned auto_increment comment '主键ID' + primary key, + initialized tinyint default 0 not null comment '初始化状态(0:未初始化,1:已初始化)', + create_time datetime default CURRENT_TIMESTAMP not null comment '创建时间', + update_time datetime null on update CURRENT_TIMESTAMP comment '更新时间', + agent_id bigint not null comment '租户ID', + constraint un_agent_id + unique (agent_id) +) + comment '租户初始化状态表' collate = utf8mb4_bin; + diff --git a/ruoyi-modules/ruoyi-md-form/ruoyi-md-form-starter/pom.xml b/ruoyi-modules/ruoyi-md-form/ruoyi-md-form-starter/pom.xml deleted file mode 100644 index 047eb0cff..000000000 --- a/ruoyi-modules/ruoyi-md-form/ruoyi-md-form-starter/pom.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - 4.0.0 - - org.dromara - ruoyi-md-form - ${revision} - - - ruoyi-md-form-starter - jar - - - - org.dromara - ruoyi-md-form-api - ${revision} - - - org.dromara - ruoyi-md-form-mapper - ${revision} - - - org.dromara - ruoyi-md-form-service - ${revision} - - - - junit - junit - test - - - org.springframework.boot - spring-boot-starter-test - test - - - - - diff --git a/ruoyi-modules/ruoyi-md-form/ruoyi-md-form-starter/src/main/java/org/dromara/md/form/AppApplication.java b/ruoyi-modules/ruoyi-md-form/ruoyi-md-form-starter/src/main/java/org/dromara/md/form/AppApplication.java deleted file mode 100644 index cf0aa97f4..000000000 --- a/ruoyi-modules/ruoyi-md-form/ruoyi-md-form-starter/src/main/java/org/dromara/md/form/AppApplication.java +++ /dev/null @@ -1,17 +0,0 @@ -//package com.pcloud.booksflow.form; -// -//import lombok.extern.slf4j.Slf4j; -//import org.springframework.boot.autoconfigure.SpringBootApplication; -//import org.springframework.boot.builder.SpringApplicationBuilder; -// -//@Slf4j -//@SpringBootApplication -//public class AppApplication { -// -// public static void main(String[] args) { -// log.warn("Start AppApplication service."); -// new SpringApplicationBuilder(AppContext.class).build(args).run(args); -// log.warn("Start AppApplication successfully."); -// } -// -//} diff --git a/ruoyi-modules/ruoyi-md-form/ruoyi-md-form-starter/src/main/java/org/dromara/md/form/AppContext.java b/ruoyi-modules/ruoyi-md-form/ruoyi-md-form-starter/src/main/java/org/dromara/md/form/AppContext.java deleted file mode 100644 index 0e3ae1321..000000000 --- a/ruoyi-modules/ruoyi-md-form/ruoyi-md-form-starter/src/main/java/org/dromara/md/form/AppContext.java +++ /dev/null @@ -1,29 +0,0 @@ -//package com.pcloud.booksflow.form; -// -//import com.pcloud.booksflow.form.config.BooksflowFormDataSourceConfig; -//import com.pcloud.common.config.PublicConfig; -//import com.pcloud.common.constant.AppLabelConstant; -//import com.pcloud.common.core.datasource.DataSourceConfig; -//import com.pcloud.common.readwrite.config.ReadWriteSplittingDataSourceConfig; -//import org.mybatis.spring.annotation.MapperScan; -//import org.springframework.cloud.netflix.eureka.EnableEurekaClient; -//import org.springframework.cloud.openfeign.EnableFeignClients; -//import org.springframework.context.annotation.ComponentScan; -//import org.springframework.context.annotation.Configuration; -//import org.springframework.context.annotation.FilterType; -//import org.springframework.scheduling.annotation.EnableScheduling; -// -// -//@Configuration -//@ComponentScan(basePackages = {"com.pcloud"}, excludeFilters = { -// @ComponentScan.Filter(type = FilterType.ASSIGNABLE_TYPE, classes = DataSourceConfig.class), -// @ComponentScan.Filter(type = FilterType.ASSIGNABLE_TYPE, classes = ReadWriteSplittingDataSourceConfig.class), -// @ComponentScan.Filter(type = FilterType.ASSIGNABLE_TYPE, classes = PublicConfig.class), -// @ComponentScan.Filter(type = FilterType.ASSIGNABLE_TYPE, classes = AppLabelConstant.class) -//}) -//@EnableScheduling -//@EnableEurekaClient -//@EnableFeignClients({"com.pcloud", "com.commons.weboffice.api.service", "com.pcloud.llm.cockpit.client"}) -//@MapperScan(basePackages = "com.dromara.md.form.mybatis.mapper", sqlSessionFactoryRef = BooksflowFormDataSourceConfig.SESSION_FACTORY_NAME) -//public class AppContext { -//} diff --git a/ruoyi-modules/ruoyi-md-form/ruoyi-md-form-starter/src/main/java/org/dromara/md/form/config/BooksflowFormDataSourceConfig.java b/ruoyi-modules/ruoyi-md-form/ruoyi-md-form-starter/src/main/java/org/dromara/md/form/config/BooksflowFormDataSourceConfig.java deleted file mode 100644 index f5b88d187..000000000 --- a/ruoyi-modules/ruoyi-md-form/ruoyi-md-form-starter/src/main/java/org/dromara/md/form/config/BooksflowFormDataSourceConfig.java +++ /dev/null @@ -1,173 +0,0 @@ -//package com.pcloud.booksflow.form.config; -// -//import com.alibaba.druid.pool.DruidDataSource; -//import com.alibaba.druid.support.http.StatViewServlet; -//import com.pcloud.booksflow.form.utils.TenantHelper; -//import com.pcloud.common.core.mybatis.interceptor.ExecutorInterceptor; -//import com.pcloud.common.druid.DruidDatasourceBuilder; -//import com.pcloud.common.druid.DruidDefaultProperties; -//import com.pcloud.common.readwrite.datasource.ReadWriteDataSource; -//import com.pcloud.common.readwrite.route.ReadWriteMybatisRouter; -//import com.pcloud.common.readwrite.route.context.ReadWriteLookupKey; -//import com.pcloud.mybatis.Interceptor.MybatisPlusInterceptor; -//import com.pcloud.mybatis.Interceptor.tenant.TenantLineInnerInterceptor; -//import com.pcloud.mybatis.Interceptor.tenant.handler.TenantLineHandler; -//import net.sf.jsqlparser.expression.Expression; -//import net.sf.jsqlparser.expression.LongValue; -//import org.apache.ibatis.plugin.Interceptor; -//import org.apache.ibatis.session.SqlSessionFactory; -//import org.mybatis.spring.SqlSessionFactoryBean; -//import org.mybatis.spring.SqlSessionTemplate; -//import org.mybatis.spring.annotation.MapperScan; -//import org.mybatis.spring.boot.autoconfigure.SpringBootVFS; -//import org.slf4j.Logger; -//import org.slf4j.LoggerFactory; -//import org.springframework.beans.factory.annotation.Qualifier; -//import org.springframework.beans.factory.annotation.Value; -//import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; -//import org.springframework.boot.context.properties.ConfigurationProperties; -//import org.springframework.boot.web.servlet.ServletRegistrationBean; -//import org.springframework.context.annotation.Bean; -//import org.springframework.context.annotation.Configuration; -//import org.springframework.context.annotation.DependsOn; -//import org.springframework.context.annotation.Primary; -//import org.springframework.transaction.TransactionManager; -// -//import javax.sql.DataSource; -//import java.io.IOException; -//import java.sql.SQLException; -//import java.util.*; -// -//@Configuration -//@MapperScan(basePackages = "com.dromara.md.form.mybatis.mapper") -//public class BooksflowFormDataSourceConfig { -// private final Logger logger = LoggerFactory.getLogger(getClass()); -// -// private static final String PREFIX = "booksflowForm"; -// -// public static final String DATASOURCE_NAME = PREFIX + "DataSource"; -// private static final String MASTER_DATASOURCE_NAME = PREFIX + "MasterDataSource"; -// private static final String SLAVE_DATASOURCE_NAME = PREFIX + "SlaveDataSource"; -// public static final String TRANSACTION_MANAGER_NAME = PREFIX + "TransactionManager"; -// public static final String SESSION_FACTORY_NAME = PREFIX + "SqlSessionFactory"; -// public static final String SESSION_TEMPLATE_NAME = PREFIX + "SqlSessionTemplate"; -// -// @Value("${mybatis.mapper-locations}") -// private String mapperLocations; -// -// @Value("${mybatis.type-aliases-package}") -// private String typeAliasesPackage; -// -// @Bean(DruidDatasourceBuilder.DRUID_DEFAULT_PROPERTIES_NAME) -// @ConditionalOnMissingBean -// @ConfigurationProperties(prefix = "spring.datasource") -// public DruidDefaultProperties druidDefaultProperties() { -// return new DruidDefaultProperties(); -// } -// -// @Bean(MASTER_DATASOURCE_NAME) -// @ConfigurationProperties(prefix = "spring.datasource.booksflow-form.master") -// public DruidDataSource master() { -// logger.info("start create master datasource {}", PREFIX); -// return DruidDatasourceBuilder.createDruidDatasource(druidDefaultProperties()); -// } -// -// @Bean(SLAVE_DATASOURCE_NAME) -// @ConfigurationProperties(prefix = "spring.datasource.booksflow-form.slave") -// public DruidDataSource slave() { -// logger.info("start create slave datasource {}", PREFIX); -// return DruidDatasourceBuilder.createDruidDatasource(druidDefaultProperties()); -// } -// -// @Primary -// @Bean(DATASOURCE_NAME) -// @DependsOn({MASTER_DATASOURCE_NAME, SLAVE_DATASOURCE_NAME}) -// public DataSource dataSource(DruidDefaultProperties druidDefaultProperties, -// @Qualifier(MASTER_DATASOURCE_NAME) DruidDataSource master, -// @Qualifier(SLAVE_DATASOURCE_NAME) DruidDataSource slave) throws SQLException, IOException { -// ReadWriteDataSource ds = new ReadWriteDataSource(); -// ds.setDefaultTargetDataSource(master); -// -// Map dataSourceMap = new HashMap<>(); -// dataSourceMap.put(ReadWriteLookupKey.MASTER, master); -// dataSourceMap.put(ReadWriteLookupKey.SLAVE, slave); -// -// ds.setTargetDataSources(dataSourceMap); -// return ds; -// } -// -// @Primary -// @Bean(SESSION_FACTORY_NAME) -// public SqlSessionFactory sqlSessionFactory(@Qualifier(DATASOURCE_NAME) DataSource dataSource, -// ExecutorInterceptor interceptor, -// ReadWriteMybatisRouter rw) throws Exception { -// logger.info("【DataSource {}】初始化SqlSessionFactory,", PREFIX); -// final SqlSessionFactoryBean sessionFactoryBean = DruidDatasourceBuilder.createSqlSessionFactory(dataSource, mapperLocations); -// logger.info("【DataSource {}】初始化SqlSessionFactory,mapperLocations={}", PREFIX, mapperLocations); -// -// sessionFactoryBean.setVfs(SpringBootVFS.class); -// sessionFactoryBean.setTypeAliasesPackage(typeAliasesPackage); -// sessionFactoryBean.setPlugins(new Interceptor[] { rw, interceptor, mybatisPlusInterceptor()}); -// return sessionFactoryBean.getObject(); -// } -// -// private MybatisPlusInterceptor mybatisPlusInterceptor() { -// MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor(); -// TenantLineInnerInterceptor tenant = new TenantHandler(Arrays.asList("tenant_init_status"), "agent_id"); -// interceptor.addInnerInterceptor(tenant); -// return interceptor; -// } -// -// -// public static class TenantHandler extends TenantLineInnerInterceptor { -// /** -// * 多租户初始化设置 -// * -// * @param ignoreTable 忽略的表 -// * @param idName 租户id -// */ -// public TenantHandler(final List ignoreTable, final String idName) { -// super(new TenantLineHandler() { -// @Override -// public Expression getTenantId() { -// String tenantId = String.valueOf(TenantHelper.getTenantId()); -// return new LongValue(tenantId); -// } -// -// // 忽略表,true 表示忽略该表 -// @Override -// public boolean ignoreTable(String tableName) { -// return ignoreTable.contains(tableName); -// } -// -// // 多租户的列名自定义 -// @Override -// public String getTenantIdColumn() { -// return idName; -// } -// }); -// } -// } -// -// @Primary -// @Bean(TRANSACTION_MANAGER_NAME) -// public TransactionManager transactionManager(@Qualifier(DATASOURCE_NAME) DataSource dataSource) { -// return DruidDatasourceBuilder.createTransactionManager(dataSource); -// } -// -// @Bean(name = SESSION_TEMPLATE_NAME) -// @Primary -// public SqlSessionTemplate sqlSessionTemplate(@Qualifier(SESSION_FACTORY_NAME) SqlSessionFactory sqlSessionFactory, -// ExecutorInterceptor interceptor) throws Exception { -// logger.info("【DataSource {}】初始化SqlSessionTemplate,", PREFIX); -// return new SqlSessionTemplate(sqlSessionFactory); -// } -// -// @Bean(DruidDatasourceBuilder.DRUID_STAT_VIEW_SERVLET_BEAN_NAME) -// @ConditionalOnMissingBean(name = DruidDatasourceBuilder.DRUID_STAT_VIEW_SERVLET_BEAN_NAME) -// public ServletRegistrationBean druidStatViewServlet(){ -// return DruidDatasourceBuilder.createDruidStatViewServlet(); -// } -// -// -//} diff --git a/ruoyi-modules/ruoyi-md-form/ruoyi-md-form-starter/src/main/java/org/dromara/md/form/config/BooksflowFormExceptionHandler.java b/ruoyi-modules/ruoyi-md-form/ruoyi-md-form-starter/src/main/java/org/dromara/md/form/config/BooksflowFormExceptionHandler.java deleted file mode 100644 index 9eadb07f8..000000000 --- a/ruoyi-modules/ruoyi-md-form/ruoyi-md-form-starter/src/main/java/org/dromara/md/form/config/BooksflowFormExceptionHandler.java +++ /dev/null @@ -1,55 +0,0 @@ -//package com.pcloud.booksflow.form.config; -// -//import com.pcloud.common.core.exception.GlobalExceptionHandler; -//import com.pcloud.common.dto.ResponseDto; -//import com.pcloud.common.exceptions.BizException; -//import com.pcloud.common.permission.PermissionException; -//import lombok.extern.slf4j.Slf4j; -//import org.mybatis.spring.MyBatisSystemException; -//import org.springframework.beans.factory.annotation.Autowired; -//import org.springframework.http.HttpStatus; -//import org.springframework.http.ResponseEntity; -//import org.springframework.validation.BindException; -//import org.springframework.web.bind.annotation.ControllerAdvice; -//import org.springframework.web.bind.annotation.ExceptionHandler; -// -//import javax.servlet.http.HttpServletRequest; -//import java.util.stream.Collectors; -// -//@ControllerAdvice -//@Slf4j -//public class BooksflowFormExceptionHandler { -// -// @Autowired -// private GlobalExceptionHandler globalExceptionHandler; -// -// @ExceptionHandler(BindException.class) -// public ResponseEntity handleBindException(BindException e) { -// String errorMsg = "参数校验失败: " + e.getBindingResult().getFieldErrors() -// .stream() -// .map(error -> error.getField() + ": " + error.getDefaultMessage()) -// .collect(Collectors.joining(", ")); -// log.warn(errorMsg, e); -// ResponseDto responseDto = new ResponseDto<>(HttpStatus.BAD_REQUEST.value(), errorMsg); -// return new ResponseEntity<>(responseDto, HttpStatus.BAD_REQUEST); -// } -// -// @ExceptionHandler(BizException.class) -// public ResponseEntity bizException(BizException e) { -// log.error("错误:", e); -// ResponseDto responseDto = new ResponseDto<>(HttpStatus.INTERNAL_SERVER_ERROR.value(), e.getMessage()); -// return new ResponseEntity<>(responseDto, HttpStatus.INTERNAL_SERVER_ERROR); -// } -// -// @ExceptionHandler(MyBatisSystemException.class) -// public ResponseEntity myBatisSystemException(HttpServletRequest request, MyBatisSystemException e) throws Exception { -// Throwable cause = e.getCause().getCause(); -// if (cause instanceof PermissionException) { -// return globalExceptionHandler.exceptionHandler(request, (PermissionException) cause); -// } -// log.warn("MyBatisSystemException:", e); -// ResponseDto responseDto = new ResponseDto<>(HttpStatus.INTERNAL_SERVER_ERROR.value(), "系统繁忙,请稍后再试!"); -// return new ResponseEntity<>(responseDto, HttpStatus.INTERNAL_SERVER_ERROR); -// } -// -//} diff --git a/ruoyi-modules/ruoyi-md-form/ruoyi-md-form-starter/src/main/java/org/dromara/md/form/config/NacosPropertyLoadConfig.java b/ruoyi-modules/ruoyi-md-form/ruoyi-md-form-starter/src/main/java/org/dromara/md/form/config/NacosPropertyLoadConfig.java deleted file mode 100644 index f5b6e3ea7..000000000 --- a/ruoyi-modules/ruoyi-md-form/ruoyi-md-form-starter/src/main/java/org/dromara/md/form/config/NacosPropertyLoadConfig.java +++ /dev/null @@ -1,19 +0,0 @@ -//package com.pcloud.booksflow.form.config; -// -//import com.alibaba.nacos.spring.context.annotation.config.EnableNacosConfig; -//import com.alibaba.nacos.spring.context.annotation.config.NacosPropertySource; -//import lombok.Data; -//import org.springframework.context.annotation.Configuration; -//import org.springframework.stereotype.Component; -// -//@Configuration -//@EnableNacosConfig -//@NacosPropertySource(dataId = "booksflow-form.yml", autoRefreshed = true, groupId = "${config.group.id:DEFAULT_GROUP}") -//@NacosPropertySource(dataId = "db-default.yml") -//@NacosPropertySource(dataId = "eureka.yml", first = true, groupId = "${config.group.id:DEFAULT_GROUP}") -//@NacosPropertySource(dataId = "redis.properties", groupId = "${config.group.id:DEFAULT_GROUP}") -//@Data -//@Component -//public class NacosPropertyLoadConfig { -// -//} diff --git a/ruoyi-modules/ruoyi-md-form/ruoyi-md-form-starter/src/main/java/org/dromara/md/form/config/SwaggerConfig.java b/ruoyi-modules/ruoyi-md-form/ruoyi-md-form-starter/src/main/java/org/dromara/md/form/config/SwaggerConfig.java deleted file mode 100644 index e64a8c40b..000000000 --- a/ruoyi-modules/ruoyi-md-form/ruoyi-md-form-starter/src/main/java/org/dromara/md/form/config/SwaggerConfig.java +++ /dev/null @@ -1,37 +0,0 @@ -//package com.pcloud.booksflow.form.config; -// -//import org.springframework.context.annotation.Bean; -//import org.springframework.context.annotation.Configuration; -//import org.springframework.context.annotation.Profile; -//import springfox.documentation.builders.ApiInfoBuilder; -//import springfox.documentation.builders.PathSelectors; -//import springfox.documentation.builders.RequestHandlerSelectors; -//import springfox.documentation.service.ApiInfo; -//import springfox.documentation.spi.DocumentationType; -//import springfox.documentation.spring.web.plugins.Docket; -//import springfox.documentation.swagger2.annotations.EnableSwagger2; -// -// -//@Configuration -//@EnableSwagger2 -//@Profile({"dev", "test"}) -//public class SwaggerConfig { -// -// @Bean -// public Docket api() { -// return new Docket(DocumentationType.SWAGGER_2) -// .select() -// .apis(RequestHandlerSelectors.basePackage("com.pcloud.booksflow.form")) -// .paths(PathSelectors.any()) -// .build() -// .apiInfo(apiInfo()); -// } -// -// private ApiInfo apiInfo() { -// return new ApiInfoBuilder() -// .title("BooksFlow Form API") -// .description("表单管理服务API文档") -// .version("1.0") -// .build(); -// } -//} diff --git a/ruoyi-modules/ruoyi-md-form/ruoyi-md-form-starter/src/main/resources/config/application-dev.yml b/ruoyi-modules/ruoyi-md-form/ruoyi-md-form-starter/src/main/resources/config/application-dev.yml deleted file mode 100644 index 6c0893948..000000000 --- a/ruoyi-modules/ruoyi-md-form/ruoyi-md-form-starter/src/main/resources/config/application-dev.yml +++ /dev/null @@ -1,20 +0,0 @@ -##DEV Environment - -# Overwrite, Local Dev Env do not register service to eureka -eureka: - client: - register-with-eureka: false - -# Overwrite, Local Dev Env get the Test Configurations -nacos: - config: - namespace: test - -# Overwrite, Local Dev Env do not register rabbitmq listener -spring: - rabbitmq: - listener: - direct: - auto-startup: false - simple: - auto-startup: false \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-md-form/ruoyi-md-form-starter/src/main/resources/config/application-perf.yml b/ruoyi-modules/ruoyi-md-form/ruoyi-md-form-starter/src/main/resources/config/application-perf.yml deleted file mode 100644 index af9a321cf..000000000 --- a/ruoyi-modules/ruoyi-md-form/ruoyi-md-form-starter/src/main/resources/config/application-perf.yml +++ /dev/null @@ -1 +0,0 @@ -##Perf Environment diff --git a/ruoyi-modules/ruoyi-md-form/ruoyi-md-form-starter/src/main/resources/config/application-prod.yml b/ruoyi-modules/ruoyi-md-form/ruoyi-md-form-starter/src/main/resources/config/application-prod.yml deleted file mode 100644 index 3a145e02f..000000000 --- a/ruoyi-modules/ruoyi-md-form/ruoyi-md-form-starter/src/main/resources/config/application-prod.yml +++ /dev/null @@ -1 +0,0 @@ -##Prod Environment diff --git a/ruoyi-modules/ruoyi-md-form/ruoyi-md-form-starter/src/main/resources/config/application-test.yml b/ruoyi-modules/ruoyi-md-form/ruoyi-md-form-starter/src/main/resources/config/application-test.yml deleted file mode 100644 index eeb3e4723..000000000 --- a/ruoyi-modules/ruoyi-md-form/ruoyi-md-form-starter/src/main/resources/config/application-test.yml +++ /dev/null @@ -1 +0,0 @@ -##Test Environment diff --git a/ruoyi-modules/ruoyi-md-form/ruoyi-md-form-starter/src/main/resources/config/application-tsrpd.yml b/ruoyi-modules/ruoyi-md-form/ruoyi-md-form-starter/src/main/resources/config/application-tsrpd.yml deleted file mode 100644 index 3a145e02f..000000000 --- a/ruoyi-modules/ruoyi-md-form/ruoyi-md-form-starter/src/main/resources/config/application-tsrpd.yml +++ /dev/null @@ -1 +0,0 @@ -##Prod Environment diff --git a/ruoyi-modules/ruoyi-md-form/ruoyi-md-form-starter/src/main/resources/config/application-uat.yml b/ruoyi-modules/ruoyi-md-form/ruoyi-md-form-starter/src/main/resources/config/application-uat.yml deleted file mode 100644 index e4b5e4d20..000000000 --- a/ruoyi-modules/ruoyi-md-form/ruoyi-md-form-starter/src/main/resources/config/application-uat.yml +++ /dev/null @@ -1 +0,0 @@ -##Uat Environment diff --git a/ruoyi-modules/ruoyi-md-form/ruoyi-md-form-starter/src/main/resources/config/application.yml b/ruoyi-modules/ruoyi-md-form/ruoyi-md-form-starter/src/main/resources/config/application.yml deleted file mode 100644 index bd71d3d93..000000000 --- a/ruoyi-modules/ruoyi-md-form/ruoyi-md-form-starter/src/main/resources/config/application.yml +++ /dev/null @@ -1,76 +0,0 @@ -## -## Common configs, none business with Environment -## -spring: - application: - name: ruoyi-md-form-service - profiles: - active: dev - main: - allow-bean-definition-overriding: true - -nacos: - config: - server-addr: http://192.168.92.37:8848 - namespace: ${spring.profiles.active} - username: rays_app - password: app@read - -server: - port: 8352 - servlet: - context-path: / - -eureka: - instance: - status-page-url-path: /health - client: - register-with-eureka: true - -mybatis: - mapper-locations: classpath*:mapper/*Mapper*.xml;classpath*:mq-tx-mapper/*Mapper*.xml - type-aliases-package: com.pcloud.booksflow.form - - -management: - security: - enabled: false - endpoints: - web: - base-path: / - exposure: - include: "*" - endpoint: - shutdown: - enabled: true - sensitive: false -ribbon: - ServerListRefreshInterval: 5 - OkToRetryOnAllOperations: false - MaxAutoRetriesNextServer: 0 - MaxAutoRetries: 0 - ReadTimeout: 60000 - ConnectTimeout: 60000 -feign: - hystrix: - enabled: true - client: - config: - knowledgeBaseDocumentApiFeignClient: - connectTimeout: 5000 - readTimeout: 1200000 -hystrix: - command: - default: - execution: - isolation: - thread: - timeoutInMilliseconds: 60000 - DocumentRecordServiceFeign#ingestDocument(IngestRequestDTO): - execution: - isolation: - thread: - timeoutInMilliseconds: 1200000 - threadpool: - default: - coreSize: 300 diff --git a/ruoyi-modules/ruoyi-md-form/ruoyi-md-form-starter/src/main/resources/logback.xml b/ruoyi-modules/ruoyi-md-form/ruoyi-md-form-starter/src/main/resources/logback.xml deleted file mode 100644 index 850f8dec7..000000000 --- a/ruoyi-modules/ruoyi-md-form/ruoyi-md-form-starter/src/main/resources/logback.xml +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - - - - - - ${pattern} - - - - DEBUG - - - - - - - - logs/info/${application}-info-%d{yyyy-MM-dd}.%i.log - - 10 - - - - 70MB - - - - - ${pattern} - - - - INFO - - - - - - - - - logs/warn/${application}-warn-%d{yyyy-MM-dd}.%i.log - - 20 - - - - 20MB - - - - - ${pattern} - - - - WARN - - - - - - - - - logs/error/${application}-error-%d{yyyy-MM-dd}.%i.log - - 30 - - - - 20MB - - - - - ${pattern} - - - - ERROR - - - - - - - - logs/monitor/${application}-monitor-%d{yyyy-MM-dd_HH}.%i.log - - 10 - - - - 3GB - - - - - %msg%n - - - - INFO - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ruoyi-modules/ruoyi-md-form/ruoyi-md-form-starter/src/test/resources/config/application-dev.yml b/ruoyi-modules/ruoyi-md-form/ruoyi-md-form-starter/src/test/resources/config/application-dev.yml deleted file mode 100644 index 6c0893948..000000000 --- a/ruoyi-modules/ruoyi-md-form/ruoyi-md-form-starter/src/test/resources/config/application-dev.yml +++ /dev/null @@ -1,20 +0,0 @@ -##DEV Environment - -# Overwrite, Local Dev Env do not register service to eureka -eureka: - client: - register-with-eureka: false - -# Overwrite, Local Dev Env get the Test Configurations -nacos: - config: - namespace: test - -# Overwrite, Local Dev Env do not register rabbitmq listener -spring: - rabbitmq: - listener: - direct: - auto-startup: false - simple: - auto-startup: false \ No newline at end of file