代码清理

This commit is contained in:
lizhengwei 2026-04-03 10:03:36 +08:00
parent 5b9a9767b1
commit 4ab0a458d8
17 changed files with 136 additions and 664 deletions

View File

@ -1,15 +1,31 @@
create table form create table form
( (
id bigint unsigned auto_increment comment '主键ID' id bigint unsigned auto_increment comment '主键ID'
primary key, 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, agent_id bigint not null,
constraint un_code constraint un_code
unique (agent_id, code) unique (agent_id, code)
) )
comment '动态表单' collate = utf8mb4_bin; 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 create table form_field_dict
( (
id bigint auto_increment comment '主键ID' id bigint auto_increment comment '主键ID'
@ -19,31 +35,68 @@ create table form_field_dict
code varchar(100) not null comment '', code varchar(100) not null comment '',
parent_id bigint unsigned null comment '父级ID也可以是关联的id', parent_id bigint unsigned null comment '父级ID也可以是关联的id',
other_fields json null comment '其他字段(JSON格式)', other_fields json null comment '其他字段(JSON格式)',
check_ids varchar(255) null comment '检查ids当删除里面的id时进行校验是否有相关联',
sort_order int default 0 null comment '排序', sort_order int default 0 null comment '排序',
status tinyint default 1 not null comment '状态(1:启用,0:禁用)', status tinyint default 1 not null comment '状态(1:启用,0:禁用)',
created_by bigint unsigned not null comment '创建人', created_by bigint not null comment '创建人',
updated_by bigint unsigned null comment '更新人', updated_by bigint null comment '更新人',
create_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 '更新时间', update_time datetime default CURRENT_TIMESTAMP null on update CURRENT_TIMESTAMP comment '更新时间',
agent_id bigint not null, agent_id bigint not null,
deleted tinyint default 0 not null comment '是否删除(0:否,1:是)' deleted tinyint default 0 not null comment '是否删除(0:否,1:是)'
) )
comment '动态表单字段字典表'; comment '动态表单字段字典表';
create index idx_agent_id_config_type create index idx_agent_id_config_type_deleted
on form_field_dict (agent_id, config_type); 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 create table form_template
( (
id bigint unsigned auto_increment comment '主键ID' id bigint unsigned auto_increment comment '主键ID'
primary key, primary key,
form_id bigint unsigned not null comment 'form id', form_id bigint unsigned not null comment 'form id',
version int not null comment '版本', version int not null comment '版本',
created_by bigint unsigned not null comment '创建人', content_encoding varchar(100) null comment '内容编码,保存时和上次的编码是否一致,一致时则不进行更新',
updated_by bigint unsigned null comment '更新人', created_by bigint unsigned not null comment '创建人',
create_time datetime default CURRENT_TIMESTAMP not null comment '创建时间', updated_by bigint unsigned null comment '更新人',
update_time datetime null on update CURRENT_TIMESTAMP comment '更新时间', create_time datetime default CURRENT_TIMESTAMP not null comment '创建时间',
agent_id bigint not null, update_time datetime null on update CURRENT_TIMESTAMP comment '更新时间',
agent_id bigint not null,
constraint un_name_version constraint un_name_version
unique (agent_id, form_id, version) unique (agent_id, form_id, version)
) )
@ -51,22 +104,75 @@ create table form_template
create table form_template_field create table form_template_field
( (
id bigint unsigned auto_increment comment '主键ID' id bigint unsigned auto_increment comment '主键ID'
primary key, primary key,
template_id bigint unsigned null comment 'form_template 的id', template_id bigint unsigned null comment 'form_template 的id',
code varchar(32) not null comment '编码', code varchar(50) not null comment '编码',
title varchar(32) not null comment '标题', parent_id bigint null comment '父id',
show_title varchar(32) not null comment 'show标题', title varchar(50) not null comment '标题',
type varchar(32) not null comment '字段类型', show_title varchar(50) not null comment 'show标题',
fixed tinyint(1) not null comment '固定0不固定1固定', db_field varchar(255) null comment '数据库中关联字段(目前用作流程流转时数据判断)',
ext json not null comment '扩展属性(JSON格式)', required tinyint(1) null comment ' 是否必填',
created_by bigint unsigned not null comment '创建人', `show` tinyint(1) null comment ' 是否显示',
updated_by bigint unsigned null comment '更新人', dcode varchar(50) null comment '字典code',
create_time datetime default CURRENT_TIMESTAMP not null comment '创建时间', type varchar(32) not null comment '字段类型',
update_time datetime null on update CURRENT_TIMESTAMP comment '更新时间', fixed tinyint(1) null comment '固定0不固定1固定',
agent_id bigint not null, 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 constraint un_template_id_code
unique (agent_id, template_id, code) unique (agent_id, template_id, code)
) )
comment '动态表单模板字段' collate = utf8mb4_bin; 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;

View File

@ -1,44 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.dromara</groupId>
<artifactId>ruoyi-md-form</artifactId>
<version>${revision}</version>
</parent>
<artifactId>ruoyi-md-form-starter</artifactId>
<packaging>jar</packaging>
<dependencies>
<dependency>
<groupId>org.dromara</groupId>
<artifactId>ruoyi-md-form-api</artifactId>
<version>${revision}</version>
</dependency>
<dependency>
<groupId>org.dromara</groupId>
<artifactId>ruoyi-md-form-mapper</artifactId>
<version>${revision}</version>
</dependency>
<dependency>
<groupId>org.dromara</groupId>
<artifactId>ruoyi-md-form-service</artifactId>
<version>${revision}</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
</project>

View File

@ -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.");
// }
//
//}

View File

@ -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 {
//}

View File

@ -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<Object, Object> 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<START>", PREFIX);
// final SqlSessionFactoryBean sessionFactoryBean = DruidDatasourceBuilder.createSqlSessionFactory(dataSource, mapperLocations);
// logger.info("【DataSource {}】初始化SqlSessionFactorymapperLocations={}", 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<String> 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<START>", PREFIX);
// return new SqlSessionTemplate(sqlSessionFactory);
// }
//
// @Bean(DruidDatasourceBuilder.DRUID_STAT_VIEW_SERVLET_BEAN_NAME)
// @ConditionalOnMissingBean(name = DruidDatasourceBuilder.DRUID_STAT_VIEW_SERVLET_BEAN_NAME)
// public ServletRegistrationBean<StatViewServlet> druidStatViewServlet(){
// return DruidDatasourceBuilder.createDruidStatViewServlet();
// }
//
//
//}

View File

@ -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<Object> 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<Object> 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<Object> responseDto = new ResponseDto<>(HttpStatus.INTERNAL_SERVER_ERROR.value(), "系统繁忙,请稍后再试!");
// return new ResponseEntity<>(responseDto, HttpStatus.INTERNAL_SERVER_ERROR);
// }
//
//}

View File

@ -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 {
//
//}

View File

@ -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();
// }
//}

View File

@ -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

View File

@ -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

View File

@ -1,139 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration scan="true" scanPeriod="3 seconds">
<property name="application" value="ruoyi-md-form" />
<property name="pattern" value="%d{yyyy-MM-dd HH:mm:ss.SSS}[TraceId:%X{X-B3-TraceId:-} SpanId:%X{X-B3-SpanId:-} ParentSpanId:%X{X-B3-ParentSpanId:-}] [%thread] %-5level %logger{50}:%L - %msg%n" />
<!-- 控制台调试输出 -->
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
<!--格式化输出:%d表示日期%thread表示线程名%-5level级别从左显示5个字符宽度%msg日志消息%n是换行符 -->
<pattern>${pattern}</pattern>
</encoder>
<!--日志级别过滤-->
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
<level>DEBUG</level>
</filter>
</appender>
<!-- INFO级别日志 -->
<appender name="info_apd" class="ch.qos.logback.core.rolling.RollingFileAppender">
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<!--日志文件输出的文件名 -->
<FileNamePattern>logs/info/${application}-info-%d{yyyy-MM-dd}.%i.log</FileNamePattern>
<!--日志文件保留天数 -->
<MaxHistory>10</MaxHistory>
<!--日志文件最大的大小 -->
<timeBasedFileNamingAndTriggeringPolicy
class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
<!-- or whenever the file size reaches 50MB -->
<maxFileSize>70MB</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
</rollingPolicy>
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
<pattern>${pattern}</pattern>
</encoder>
<!--日志级别过滤-->
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
<level>INFO</level>
</filter>
</appender>
<!-- WARN级别日志 -->
<appender name="warn_apd" class="ch.qos.logback.core.rolling.RollingFileAppender">
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<!--日志文件输出的文件名 -->
<FileNamePattern>logs/warn/${application}-warn-%d{yyyy-MM-dd}.%i.log</FileNamePattern>
<!--日志文件保留天数 -->
<MaxHistory>20</MaxHistory>
<!--日志文件最大的大小 -->
<timeBasedFileNamingAndTriggeringPolicy
class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
<!-- or whenever the file size reaches 50MB -->
<maxFileSize>20MB</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
</rollingPolicy>
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
<pattern>${pattern}</pattern>
</encoder>
<!--日志级别过滤-->
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
<level>WARN</level>
</filter>
</appender>
<!-- ERROR级别日志 -->
<appender name="error_apd" class="ch.qos.logback.core.rolling.RollingFileAppender">
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<!--日志文件输出的文件名 -->
<FileNamePattern>logs/error/${application}-error-%d{yyyy-MM-dd}.%i.log</FileNamePattern>
<!--日志文件保留天数 -->
<MaxHistory>30</MaxHistory>
<!--日志文件最大的大小 -->
<timeBasedFileNamingAndTriggeringPolicy
class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
<!-- or whenever the file size reaches 50MB -->
<maxFileSize>20MB</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
</rollingPolicy>
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
<pattern>${pattern}</pattern>
</encoder>
<!--日志级别过滤-->
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
<level>ERROR</level>
</filter>
</appender>
<!-- 监控日志 -->
<appender name="monitorLogFileAppender" class="ch.qos.logback.core.rolling.RollingFileAppender">
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<!--日志文件输出的文件名 -->
<FileNamePattern>logs/monitor/${application}-monitor-%d{yyyy-MM-dd_HH}.%i.log</FileNamePattern>
<!--日志文件保留天数 -->
<MaxHistory>10</MaxHistory>
<!--日志文件最大的大小 -->
<timeBasedFileNamingAndTriggeringPolicy
class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
<!-- or whenever the file size reaches 50MB -->
<maxFileSize>3GB</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
</rollingPolicy>
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
<pattern>%msg%n</pattern>
</encoder>
<!--日志级别过滤-->
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
<level>INFO</level>
</filter>
</appender>
<appender name="asyncMonitorLogAppender" class="ch.qos.logback.classic.AsyncAppender">
<appender-ref ref="monitorLogFileAppender" />
</appender>
<logger name="com.pcloud.universe.monitorlog.MonitorUtilImpl" level="INFO" additivity="false">
<appender-ref ref="asyncMonitorLogAppender" />
</logger>
<!-- INFO级别以上的日志全部都输出不同的级别输出在不同的文件里面 -->
<root>
<level value="INFO"/>
<appender-ref ref="STDOUT" />
<appender-ref ref="info_apd" />
<appender-ref ref="warn_apd" />
<appender-ref ref="error_apd" />
</root>
<logger name="net.sf.ehcache" level="INFO"/>
<logger name="druid.sql" level="INFO"/>
<logger name="org.springframework.cloud.openfeign.FeignClientFactoryBean" level="ERROR"/>
<logger name="com.netflix.discovery.shared.resolver.aws.ConfigClusterResolver" level="WARN"/>
<logger name="org.dromara.md.form.mybatis.mapper" level="DEBUG"/>
</configuration>

View File

@ -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