Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gjjs-bd-common
Overview
Overview
Details
Activity
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
s_guodong
gjjs-bd-common
Commits
6b35dacd
Commit
6b35dacd
authored
Jun 07, 2023
by
s_guodong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改运行时 支持dbReadset
parent
56dbb7be
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
3 deletions
+12
-3
MyBatisDaoSession.java
...com/brilliance/mda/support/mybatis/MyBatisDaoSession.java
+7
-1
IDaoSession.java
...main/java/com/brilliance/mda/runtime/mda/IDaoSession.java
+5
-2
No files found.
gjjs-bd-mybatis-support/src/main/java/com/brilliance/mda/support/mybatis/MyBatisDaoSession.java
View file @
6b35dacd
...
...
@@ -5,6 +5,7 @@ import com.brilliance.mda.runtime.mda.driver.MdaDriver;
import
com.brilliance.mda.runtime.mda.driver.MdaEnv
;
import
com.brilliance.mda.runtime.mda.impl.AbstractDaoSession
;
import
com.brilliance.mda.runtime.mda.impl.Argument
;
import
com.brilliance.mda.runtime.mda.impl.ModuleList
;
import
com.brilliance.mda.runtime.mda.util.MdaUtils
;
import
com.brilliance.mda.support.mybatis.count.CounterService
;
import
com.brilliance.mda.support.mybatis.dync.mapper.DbExecuteMapper
;
...
...
@@ -181,6 +182,11 @@ public class MyBatisDaoSession extends AbstractDaoSession implements IDaoSession
}
@Override
public
<
T
extends
IModule
>
int
dbReadset
(
ModuleList
<
T
>
list
,
CacheOption
cacheOption
,
Argument
...
args
)
{
return
dbReadset
(
list
,
args
);
}
@Override
public
<
T
extends
IModule
>
int
dbReadset
(
IModuleList
<
T
>
list
,
Argument
...
args
)
{
String
moduleDB
=
MdaUtils
.
getModuleListDB
(
list
);
DynamicDataSourceContextHolder
.
setDataSourceType
(
moduleDB
);
...
...
@@ -226,7 +232,7 @@ public class MyBatisDaoSession extends AbstractDaoSession implements IDaoSession
@Override
public
List
<
String
>
dbColumnNames
()
{
if
(
resultLocal
.
get
().
hasNext
()){
if
(
resultLocal
.
get
().
hasNext
())
{
Map
<
String
,
Object
>
map
=
resultLocal
.
get
().
next
();
List
<
String
>
columnNames
=
new
ArrayList
<>(
map
.
keySet
());
return
columnNames
;
...
...
gjjs-bd-runtime/src/main/java/com/brilliance/mda/runtime/mda/IDaoSession.java
View file @
6b35dacd
package
com
.
brilliance
.
mda
.
runtime
.
mda
;
import
com.brilliance.mda.runtime.mda.impl.Argument
;
import
com.brilliance.mda.runtime.mda.impl.ModuleList
;
import
java.util.List
;
...
...
@@ -23,20 +24,22 @@ public interface IDaoSession {
@SuppressWarnings
(
"rawtypes"
)
<
T
extends
IModule
>
int
dbReadset
(
IModuleList
<
T
>
list
,
int
limitSize
,
Argument
...
args
);
<
T
extends
IModule
>
int
dbReadset
(
ModuleList
<
T
>
list
,
CacheOption
cacheOption
,
Argument
...
args
);
<
T
extends
IModule
>
int
dbReadset
(
IModuleList
<
T
>
list
,
String
whereSql
);
<
T
extends
IModule
>
int
dbReadset
(
IModuleList
<
T
>
list
,
String
whereSql
,
Object
[]
params
);
<
T
extends
IModule
>
int
dbReadset
(
IModuleList
<
T
>
list
,
String
whereSql
,
String
...
params
);
<
T
extends
IModule
>
int
dbReadset
(
IModuleList
<
T
>[]
lists
,
int
maxSize
,
String
whereClause
,
Object
[]
datas
);
void
dbReadset
(
IModuleList
[]
lists
,
String
whereClause
,
Object
[]
datas
);
void
dbExecuteSQL
(
String
sql
,
Object
...
params
);
void
dbFetchFields
(
IResult
<?
extends
Object
>...
args
);
void
dbCloseCursor
();
void
putDao
(
Class
<?>
key
,
Object
dao
);
boolean
isOpenTrans
();
...
...
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