Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
Y
yzg-util
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
YZG
yzg-util
Commits
eed1072e
Commit
eed1072e
authored
Dec 15, 2021
by
yanzg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
下载视频
parent
7a9d9290
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
137 additions
and
0 deletions
+137
-0
导出前端流程图.png
yzg-util-file/document/导出前端流程图.png
+0
-0
导出后端流程图.png
yzg-util-file/document/导出后端流程图.png
+0
-0
YzgFileDao.java
.../main/java/com/yanzuoguang/cloud/file/dao/YzgFileDao.java
+39
-0
YzgFileDaoImpl.java
...a/com/yanzuoguang/cloud/file/dao/impl/YzgFileDaoImpl.java
+98
-0
No files found.
yzg-util-file/document/导出前端流程图.png
0 → 100644
View file @
eed1072e
44.2 KB
yzg-util-file/document/导出后端流程图.png
0 → 100644
View file @
eed1072e
109 KB
yzg-util-file/src/main/java/com/yanzuoguang/cloud/file/dao/YzgFileDao.java
0 → 100755
View file @
eed1072e
package
com
.
yanzuoguang
.
cloud
.
file
.
dao
;
import
com.yanzuoguang.cloud.vo.YzgFileVo
;
import
com.yanzuoguang.cloud.vo.req.YzgFileStatusReqVo
;
import
com.yanzuoguang.dao.BaseDao
;
/**
* 日志接口基本操作类
*
* @author 颜佐光
*/
public
interface
YzgFileDao
extends
BaseDao
{
/**
* 获取导出文件数量
*
* @param req 批次编号
* @return 文件数量
*/
int
getUserCompanyCount
(
YzgFileVo
req
);
/**
* 获取导出文件数量
*
* @param req 批次编号
* @return 文件数量
*/
int
getCallbackCount
(
YzgFileVo
req
);
/**
* 修改文件状态
*
* @param req 批次编号
* @return 文件数量
*/
int
updateStatus
(
YzgFileStatusReqVo
req
);
}
yzg-util-file/src/main/java/com/yanzuoguang/cloud/file/dao/impl/YzgFileDaoImpl.java
0 → 100755
View file @
eed1072e
package
com
.
yanzuoguang
.
cloud
.
file
.
dao
.
impl
;
import
com.yanzuoguang.cloud.file.dao.YzgFileDao
;
import
com.yanzuoguang.cloud.vo.YzgFileVo
;
import
com.yanzuoguang.cloud.vo.req.YzgFileStatusReqVo
;
import
com.yanzuoguang.dao.DaoConst
;
import
com.yanzuoguang.dao.impl.BaseDaoImpl
;
import
com.yanzuoguang.mq.vo.MessageVo
;
import
com.yanzuoguang.util.vo.MapRow
;
import
org.springframework.beans.factory.InitializingBean
;
import
org.springframework.stereotype.Component
;
import
java.util.List
;
/**
* 消息队列处理工具类
*
* @author 颜佐光
*/
@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='队列消息表'"
;
@Override
protected
void
init
()
{
register
(
MessageVo
.
class
);
table
.
add
(
DaoConst
.
QUERY
,
"SELECT a.* FROM Queue_Message AS a WHERE 1=1 "
)
.
add
(
"batchId"
,
"AND a.batchId=?"
)
;
}
/**
* Invoked by a BeanFactory after it has set all bean properties supplied
* (and satisfied BeanFactoryAware and ApplicationContextAware).
* <p>This method allows the bean instance to perform initialization only
* possible when all bean properties have been set and to throw an
* exception in the event of misconfiguration.
*
* @throws Exception in the event of misconfiguration (such
* as failure to set an essential property) or if initialization fails.
*/
@Override
public
void
afterPropertiesSet
()
throws
Exception
{
List
<
MapRow
>
tables
=
this
.
getDb
().
query
(
YzgFileDaoImpl
.
class
,
"QUERY_TABLE_SQL"
,
QUERY_TABLE_SQL
);
if
(
tables
.
isEmpty
())
{
this
.
getDb
().
update
(
YzgFileDaoImpl
.
class
,
"CREATE_TABLE_SQL"
,
CREATE_TABLE_SQL
);
}
else
{
// this.getDb().update(YzgFileDaoImpl.class, "ALTER_TABLE_SQL", ALTER_TABLE_SQL);
}
}
/**
* 获取导出文件数量
*
* @param req 批次编号
* @return 文件数量
*/
@Override
public
int
getUserCompanyCount
(
YzgFileVo
req
)
{
return
0
;
}
/**
* 获取导出文件数量
*
* @param req 批次编号
* @return 文件数量
*/
@Override
public
int
getCallbackCount
(
YzgFileVo
req
)
{
return
0
;
}
/**
* 修改文件状态
*
* @param req 批次编号
* @return 文件数量
*/
@Override
public
int
updateStatus
(
YzgFileStatusReqVo
req
)
{
return
0
;
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment