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
a70962da
Commit
a70962da
authored
Dec 03, 2019
by
yanzg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
接口文档的支持
parent
8e341634
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
6 deletions
+9
-6
BaseDaoImpl.java
...b/src/main/java/com/yanzuoguang/dao/impl/BaseDaoImpl.java
+3
-1
BaseDaoSql.java
...db/src/main/java/com/yanzuoguang/dao/impl/BaseDaoSql.java
+2
-2
MessageDaoImpl.java
...main/java/com/yanzuoguang/mq/dao/impl/MessageDaoImpl.java
+4
-3
No files found.
yzg-util-db/src/main/java/com/yanzuoguang/dao/impl/BaseDaoImpl.java
View file @
a70962da
...
...
@@ -2,6 +2,7 @@ package com.yanzuoguang.dao.impl;
import
com.yanzuoguang.dao.BaseDao
;
import
com.yanzuoguang.dao.DaoConst
;
import
com.yanzuoguang.db.DbExecute
;
import
com.yanzuoguang.util.base.ObjectHelper
;
import
com.yanzuoguang.util.exception.CodeException
;
import
com.yanzuoguang.util.helper.DateHelper
;
...
...
@@ -23,9 +24,10 @@ import java.util.*;
public
abstract
class
BaseDaoImpl
extends
BaseDaoSql
implements
BaseDao
{
@Override
protected
void
initExecute
(
)
{
protected
void
initExecute
(
DbExecute
db
)
{
}
/**
* 获取当前主键
*
...
...
yzg-util-db/src/main/java/com/yanzuoguang/dao/impl/BaseDaoSql.java
View file @
a70962da
...
...
@@ -57,8 +57,8 @@ public abstract class BaseDaoSql {
*/
protected
DbExecute
getDb
()
{
if
(
this
.
db
!=
null
&&
!
this
.
initSql
)
{
this
.
initExecute
(
this
.
db
);
this
.
initSql
=
true
;
this
.
initExecute
();
}
return
db
;
}
...
...
@@ -88,7 +88,7 @@ public abstract class BaseDaoSql {
/**
* 初始化执行
*/
protected
abstract
void
initExecute
();
protected
abstract
void
initExecute
(
DbExecute
db
);
/**
* 注册SQL语句
...
...
yzg-util-mq/src/main/java/com/yanzuoguang/mq/dao/impl/MessageDaoImpl.java
View file @
a70962da
...
...
@@ -3,6 +3,7 @@ package com.yanzuoguang.mq.dao.impl;
import
com.yanzuoguang.dao.DaoConst
;
import
com.yanzuoguang.dao.impl.BaseDaoImpl
;
import
com.yanzuoguang.dao.impl.SqlData
;
import
com.yanzuoguang.db.DbExecute
;
import
com.yanzuoguang.mq.dao.MessageDao
;
import
com.yanzuoguang.mq.vo.MessageVo
;
import
com.yanzuoguang.util.vo.MapRow
;
...
...
@@ -50,10 +51,10 @@ public class MessageDaoImpl extends BaseDaoImpl implements MessageDao {
}
@Override
protected
void
initExecute
()
{
List
<
MapRow
>
tables
=
this
.
getDb
()
.
query
(
MessageDaoImpl
.
class
,
"QUERY_TABLE_SQL"
,
QUERY_TABLE_SQL
);
protected
void
initExecute
(
DbExecute
db
)
{
List
<
MapRow
>
tables
=
db
.
query
(
MessageDaoImpl
.
class
,
"QUERY_TABLE_SQL"
,
QUERY_TABLE_SQL
);
if
(
tables
.
isEmpty
())
{
this
.
getDb
()
.
update
(
MessageDaoImpl
.
class
,
"CREATE_TABLE_SQL"
,
CREATE_TABLE_SQL
);
db
.
update
(
MessageDaoImpl
.
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