Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibzdst
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
1
议题
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibzdst
提交
c5a33c0f
提交
c5a33c0f
编写于
1月 21, 2021
作者:
hebao@lab.ibiz5.com
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
达梦数据库游标操作bug修复
上级
26752799
变更
3
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
92 行增加
和
3 行删除
+92
-3
MybatisSimpleExecutor.java
...idou/mybatisplus/core/executor/MybatisSimpleExecutor.java
+89
-0
pom.xml
ibzdst-core/pom.xml
+2
-2
DbEntityService.java
...ibizlab/core/lite/extensions/service/DbEntityService.java
+1
-1
未找到文件。
ibzdst-boot/src/main/java/com/baomidou/mybatisplus/core/executor/MybatisSimpleExecutor.java
0 → 100644
浏览文件 @
c5a33c0f
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//
package
com
.
baomidou
.
mybatisplus
.
core
.
executor
;
import
java.sql.Connection
;
import
java.sql.SQLException
;
import
java.sql.Statement
;
import
java.util.Collections
;
import
java.util.List
;
import
org.apache.ibatis.cursor.Cursor
;
import
org.apache.ibatis.executor.BatchResult
;
import
org.apache.ibatis.executor.statement.StatementHandler
;
import
org.apache.ibatis.logging.Log
;
import
org.apache.ibatis.mapping.BoundSql
;
import
org.apache.ibatis.mapping.MappedStatement
;
import
org.apache.ibatis.session.Configuration
;
import
org.apache.ibatis.session.ResultHandler
;
import
org.apache.ibatis.session.RowBounds
;
import
org.apache.ibatis.transaction.Transaction
;
public
class
MybatisSimpleExecutor
extends
AbstractBaseExecutor
{
public
MybatisSimpleExecutor
(
Configuration
configuration
,
Transaction
transaction
)
{
super
(
configuration
,
transaction
);
}
public
int
doUpdate
(
MappedStatement
ms
,
Object
parameter
)
throws
SQLException
{
Statement
stmt
=
null
;
int
var6
;
try
{
Configuration
configuration
=
ms
.
getConfiguration
();
StatementHandler
handler
=
configuration
.
newStatementHandler
(
this
,
ms
,
parameter
,
RowBounds
.
DEFAULT
,
(
ResultHandler
)
null
,
(
BoundSql
)
null
);
stmt
=
this
.
prepareStatement
(
handler
,
ms
.
getStatementLog
(),
false
);
var6
=
stmt
==
null
?
0
:
handler
.
update
(
stmt
);
}
finally
{
this
.
closeStatement
(
stmt
);
}
return
var6
;
}
public
<
E
>
List
<
E
>
doQuery
(
MappedStatement
ms
,
Object
parameter
,
RowBounds
rowBounds
,
ResultHandler
resultHandler
,
BoundSql
boundSql
)
throws
SQLException
{
Statement
stmt
=
null
;
List
var9
;
try
{
Configuration
configuration
=
ms
.
getConfiguration
();
StatementHandler
handler
=
configuration
.
newStatementHandler
(
this
.
wrapper
,
ms
,
parameter
,
rowBounds
,
resultHandler
,
boundSql
);
stmt
=
this
.
prepareStatement
(
handler
,
ms
.
getStatementLog
(),
false
);
var9
=
stmt
==
null
?
Collections
.
emptyList
()
:
handler
.
query
(
stmt
,
resultHandler
);
}
finally
{
this
.
closeStatement
(
stmt
);
}
return
var9
;
}
protected
<
E
>
Cursor
<
E
>
doQueryCursor
(
MappedStatement
ms
,
Object
parameter
,
RowBounds
rowBounds
,
BoundSql
boundSql
)
throws
SQLException
{
Configuration
configuration
=
ms
.
getConfiguration
();
StatementHandler
handler
=
configuration
.
newStatementHandler
(
this
.
wrapper
,
ms
,
parameter
,
rowBounds
,
(
ResultHandler
)
null
,
boundSql
);
Statement
stmt
=
this
.
prepareStatement
(
handler
,
ms
.
getStatementLog
(),
true
);
assert
stmt
!=
null
;
Cursor
<
E
>
cursor
=
handler
.
queryCursor
(
stmt
);
if
(
stmt
.
isCloseOnCompletion
())
{
stmt
.
closeOnCompletion
();
}
return
cursor
;
}
public
List
<
BatchResult
>
doFlushStatements
(
boolean
isRollback
)
{
return
Collections
.
emptyList
();
}
private
Statement
prepareStatement
(
StatementHandler
handler
,
Log
statementLog
,
boolean
isCursor
)
throws
SQLException
{
Connection
connection
=
this
.
getConnection
(
statementLog
);
Statement
stmt
=
handler
.
prepare
(
connection
,
this
.
transaction
.
getTimeout
());
if
(
stmt
==
null
&&
!
isCursor
)
{
return
null
;
}
else
{
handler
.
parameterize
(
stmt
);
return
stmt
;
}
}
}
ibzdst-core/pom.xml
浏览文件 @
c5a33c0f
...
...
@@ -115,8 +115,8 @@
<!--达梦数据库-->
<dependency>
<groupId>
com.dameng
</groupId>
<artifactId>
Dm
8JdbcDriver18
</artifactId>
<version>
8.1.1.49
</version>
<artifactId>
Dm
7JdbcDriver17
</artifactId>
<version>
7.6.0.165
</version>
</dependency>
...
...
ibzdst-core/src/main/java/cn/ibizlab/core/lite/extensions/service/DbEntityService.java
浏览文件 @
c5a33c0f
...
...
@@ -194,7 +194,7 @@ public class DbEntityService extends ServiceImpl<DbEntityMapper, EntityObj> impl
dstDataSourceService
.
initDataSource
(
entityModel
.
getDsName
());
DynamicDataSourceContextHolder
.
push
(
entityModel
.
getDsName
());
myMyBatisCursorItemReader
.
open
(
new
ExecutionContext
());
// 开启游标
DynamicDataSourceContextHolder
.
poll
();
//
DynamicDataSourceContextHolder.poll();
List
<
EntityObj
>
datas
=
new
ArrayList
<>();
EntityObj
rowdata
;
while
((
rowdata
=
(
EntityObj
)
myMyBatisCursorItemReader
.
read
())
!=
null
)
{
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录