Commit 4e6dda63 authored by yanzg's avatar yanzg

修复实体关系

parent eed1072e
......@@ -20,19 +20,26 @@ import java.util.List;
@Component
public class YzgFileDaoImpl extends BaseDaoImpl implements YzgFileDao, InitializingBean {
private static final String QUERY_TABLE_SQL = "SHOW TABLES LIKE 'queue_message'";
private static final String CREATE_TABLE_SQL = "CREATE TABLE `queue_message` ( " +
" `MessageId` varchar(32) NOT NULL COMMENT '消息编号', " +
" `ExchangeName` varchar(255) NOT NULL DEFAULT '' COMMENT '交换器', " +
" `RouteKey` varchar(255) NOT NULL DEFAULT '' COMMENT '路由键', " +
" `Message` text NOT NULL COMMENT '消息内容', " +
" `DedTime` bigint(20) NOT NULL DEFAULT '0' COMMENT '死信时间', " +
" `HandleCount` int(11) NOT NULL DEFAULT '0' COMMENT '处理次数', " +
" `HandleTime` datetime NOT NULL COMMENT '上次处理时间', " +
" `BatchId` varchar(32) NOT NULL COMMENT '发送批次', " +
" `CreateTime` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', " +
" PRIMARY KEY (`MessageId`), " +
" KEY `IndexHandleTime` (`HandleTime`) " +
") ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='队列消息表'";
private static final String CREATE_TABLE_SQL = "CREATE TABLE Yzg_File ( " +
" fileId VARCHAR(32) NOT NULL COMMENT '编号', " +
" companyId VARCHAR(32) NOT NULL COMMENT '公司编号', " +
" companyName VARCHAR(100) NOT NULL DEFAULT '' COMMENT '公司名称', " +
" callbackMQ VARCHAR(100) NOT NULL DEFAULT '' COMMENT '功能点关键字,同一个callbackMQ的同时已开始的文件数不能超过3(可配置)', " +
" callbackParameter LONGTEXT NOT NULL COMMENT '回调MQ参数', " +
" fileName VARCHAR(255) NOT NULL DEFAULT '' COMMENT '文件名称,用于下载时显示文件名,需要下载时用户输入或自动生成', " +
" fileStatus INT NOT NULL DEFAULT 0 COMMENT '文件状态:0-未开始,1-已开始,2-导出成功,3-导出失败', " +
" fileRow INT NOT NULL DEFAULT 0 COMMENT '导出行数', " +
" errorMessage VARCHAR(255) NOT NULL DEFAULT '' COMMENT '错误消息', " +
" downloadDate DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '下载时间', " +
" downloadUserId VARCHAR(32) NOT NULL COMMENT '下载人', " +
" createDate DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间', " +
" createUserId VARCHAR(32) NOT NULL COMMENT '修改设备', " +
" INDEX IndexCreateDate(createDate), " +
" INDEX IndexCompanyCreateUserId(companyId,createUserId), " +
" INDEX IndexCompanyId(companyId), " +
" INDEX IndexCreateUserId(createUserId), " +
" PRIMARY KEY (fileId) " +
") COMMENT '导出文件服务'; ";
@Override
protected void init() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment