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
4b1d7bca
Commit
4b1d7bca
authored
Aug 11, 2022
by
yanzg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
升级新版本
parent
1583439b
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
42 additions
and
21 deletions
+42
-21
MessageDaoImpl.java
...main/java/com/yanzuoguang/mq/dao/impl/MessageDaoImpl.java
+11
-8
MessageLogDaoImpl.java
...n/java/com/yanzuoguang/mq/dao/impl/MessageLogDaoImpl.java
+10
-4
QueueServerDaoImpl.java
.../java/com/yanzuoguang/mq/dao/impl/QueueServerDaoImpl.java
+11
-5
QueueServerTokenDaoImpl.java
.../com/yanzuoguang/mq/dao/impl/QueueServerTokenDaoImpl.java
+10
-4
No files found.
yzg-util-mq/src/main/java/com/yanzuoguang/mq/dao/impl/MessageDaoImpl.java
View file @
4b1d7bca
...
...
@@ -6,6 +6,7 @@ import com.yanzuoguang.dao.impl.SqlData;
import
com.yanzuoguang.mq.dao.MessageDao
;
import
com.yanzuoguang.mq.vo.MessageVo
;
import
com.yanzuoguang.util.helper.YzgTimeout
;
import
com.yanzuoguang.util.thread.ThreadHelper
;
import
com.yanzuoguang.util.vo.MapRow
;
import
org.springframework.beans.factory.InitializingBean
;
import
org.springframework.stereotype.Component
;
...
...
@@ -65,14 +66,16 @@ public class MessageDaoImpl extends BaseDaoImpl implements MessageDao, Initializ
*/
@Override
public
void
afterPropertiesSet
()
throws
Exception
{
YzgTimeout
.
timeOut
(
MessageDaoImpl
.
class
,
"消息队列处理工具类初始化"
,
()
->
{
List
<
MapRow
>
tables
=
this
.
getDb
().
query
(
MessageDaoImpl
.
class
,
"QUERY_TABLE_SQL"
,
QUERY_TABLE_SQL
);
if
(
tables
.
isEmpty
())
{
this
.
getDb
().
update
(
MessageDaoImpl
.
class
,
"CREATE_TABLE_SQL"
,
CREATE_TABLE_SQL
);
}
else
{
this
.
getDb
().
update
(
MessageDaoImpl
.
class
,
"ALTER_TABLE_SQL"
,
ALTER_TABLE_SQL
);
}
});
ThreadHelper
.
runThread
(()
->
YzgTimeout
.
timeOut
(
MessageDaoImpl
.
class
,
"消息队列处理工具类初始化"
,
()
->
{
List
<
MapRow
>
tables
=
this
.
getDb
().
query
(
MessageDaoImpl
.
class
,
"QUERY_TABLE_SQL"
,
QUERY_TABLE_SQL
);
if
(
tables
.
isEmpty
())
{
this
.
getDb
().
update
(
MessageDaoImpl
.
class
,
"CREATE_TABLE_SQL"
,
CREATE_TABLE_SQL
);
}
else
{
this
.
getDb
().
update
(
MessageDaoImpl
.
class
,
"ALTER_TABLE_SQL"
,
ALTER_TABLE_SQL
);
}
})
);
}
/**
...
...
yzg-util-mq/src/main/java/com/yanzuoguang/mq/dao/impl/MessageLogDaoImpl.java
View file @
4b1d7bca
...
...
@@ -3,6 +3,8 @@ package com.yanzuoguang.mq.dao.impl;
import
com.yanzuoguang.dao.impl.BaseDaoImpl
;
import
com.yanzuoguang.mq.dao.MessageLogDao
;
import
com.yanzuoguang.mq.vo.MessageLogVo
;
import
com.yanzuoguang.util.helper.YzgTimeout
;
import
com.yanzuoguang.util.thread.ThreadHelper
;
import
com.yanzuoguang.util.vo.MapRow
;
import
org.springframework.beans.factory.InitializingBean
;
import
org.springframework.stereotype.Component
;
...
...
@@ -53,10 +55,14 @@ public class MessageLogDaoImpl extends BaseDaoImpl implements MessageLogDao, Ini
*/
@Override
public
void
afterPropertiesSet
()
throws
Exception
{
List
<
MapRow
>
tables
=
this
.
getDb
().
query
(
MessageLogDaoImpl
.
class
,
"QUERY_TABLE_SQL"
,
QUERY_TABLE_SQL
);
if
(
tables
.
isEmpty
())
{
this
.
getDb
().
update
(
MessageLogDaoImpl
.
class
,
"CREATE_TABLE_SQL"
,
CREATE_TABLE_SQL
);
}
ThreadHelper
.
runThread
(()
->
{
YzgTimeout
.
timeOut
(
MessageLogDaoImpl
.
class
,
"消息队列处理工具类初始化"
,
()
->
{
List
<
MapRow
>
tables
=
this
.
getDb
().
query
(
MessageLogDaoImpl
.
class
,
"QUERY_TABLE_SQL"
,
QUERY_TABLE_SQL
);
if
(
tables
.
isEmpty
())
{
this
.
getDb
().
update
(
MessageLogDaoImpl
.
class
,
"CREATE_TABLE_SQL"
,
CREATE_TABLE_SQL
);
}
});
});
}
/**
...
...
yzg-util-mq/src/main/java/com/yanzuoguang/mq/dao/impl/QueueServerDaoImpl.java
View file @
4b1d7bca
...
...
@@ -4,6 +4,8 @@ import com.yanzuoguang.dao.impl.BaseDaoImpl;
import
com.yanzuoguang.db.DbExecute
;
import
com.yanzuoguang.mq.dao.QueueServerDao
;
import
com.yanzuoguang.mq.vo.QueueServerVo
;
import
com.yanzuoguang.util.helper.YzgTimeout
;
import
com.yanzuoguang.util.thread.ThreadHelper
;
import
com.yanzuoguang.util.vo.MapRow
;
import
org.springframework.beans.factory.InitializingBean
;
import
org.springframework.stereotype.Component
;
...
...
@@ -45,10 +47,14 @@ public class QueueServerDaoImpl extends BaseDaoImpl implements QueueServerDao, I
*/
@Override
public
void
afterPropertiesSet
()
throws
Exception
{
DbExecute
db
=
this
.
getDb
();
List
<
MapRow
>
tables
=
db
.
query
(
QueueServerDaoImpl
.
class
,
"QUERY_TABLE_SQL"
,
QUERY_TABLE_SQL
);
if
(
tables
.
isEmpty
())
{
db
.
update
(
QueueServerDaoImpl
.
class
,
"CREATE_TABLE_SQL"
,
CREATE_TABLE_SQL
);
}
ThreadHelper
.
runThread
(()
->
{
YzgTimeout
.
timeOut
(
QueueServerDaoImpl
.
class
,
"消息队列处理工具类初始化"
,
()
->
{
DbExecute
db
=
this
.
getDb
();
List
<
MapRow
>
tables
=
db
.
query
(
QueueServerDaoImpl
.
class
,
"QUERY_TABLE_SQL"
,
QUERY_TABLE_SQL
);
if
(
tables
.
isEmpty
())
{
db
.
update
(
QueueServerDaoImpl
.
class
,
"CREATE_TABLE_SQL"
,
CREATE_TABLE_SQL
);
}
});
});
}
}
yzg-util-mq/src/main/java/com/yanzuoguang/mq/dao/impl/QueueServerTokenDaoImpl.java
View file @
4b1d7bca
...
...
@@ -3,6 +3,8 @@ package com.yanzuoguang.mq.dao.impl;
import
com.yanzuoguang.dao.impl.BaseDaoImpl
;
import
com.yanzuoguang.mq.dao.QueueServerTokenDao
;
import
com.yanzuoguang.mq.vo.QueueServerTokenVo
;
import
com.yanzuoguang.util.helper.YzgTimeout
;
import
com.yanzuoguang.util.thread.ThreadHelper
;
import
com.yanzuoguang.util.vo.MapRow
;
import
org.springframework.beans.factory.InitializingBean
;
import
org.springframework.stereotype.Component
;
...
...
@@ -48,9 +50,13 @@ public class QueueServerTokenDaoImpl extends BaseDaoImpl implements QueueServerT
*/
@Override
public
void
afterPropertiesSet
()
throws
Exception
{
List
<
MapRow
>
tables
=
this
.
getDb
().
query
(
QueueServerTokenDaoImpl
.
class
,
"QUERY_TABLE_SQL"
,
QUERY_TABLE_SQL
);
if
(
tables
.
isEmpty
())
{
this
.
getDb
().
update
(
QueueServerTokenDaoImpl
.
class
,
"CREATE_TABLE_SQL"
,
CREATE_TABLE_SQL
);
}
ThreadHelper
.
runThread
(()
->
{
YzgTimeout
.
timeOut
(
QueueServerTokenDaoImpl
.
class
,
"消息队列处理工具类初始化"
,
()
->
{
List
<
MapRow
>
tables
=
this
.
getDb
().
query
(
QueueServerTokenDaoImpl
.
class
,
"QUERY_TABLE_SQL"
,
QUERY_TABLE_SQL
);
if
(
tables
.
isEmpty
())
{
this
.
getDb
().
update
(
QueueServerTokenDaoImpl
.
class
,
"CREATE_TABLE_SQL"
,
CREATE_TABLE_SQL
);
}
});
});
}
}
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