mirror of
https://gitee.com/mybatis-flex/mybatis-flex.git
synced 2025-12-07 00:58:24 +08:00
fix: 修复 Map 传参审计打印 SQL 问题,https://gitee.com/mybatis-flex/mybatis-flex/issues/I9JJD8
This commit is contained in:
parent
0ac1b21556
commit
d8c68ea59d
@ -185,7 +185,12 @@ public class AuditMessage implements Serializable {
|
|||||||
for (Object object : objects) {
|
for (Object object : objects) {
|
||||||
if (object != null && ClassUtil.isArray(object.getClass())) {
|
if (object != null && ClassUtil.isArray(object.getClass())) {
|
||||||
for (int i = 0; i < Array.getLength(object); i++) {
|
for (int i = 0; i < Array.getLength(object); i++) {
|
||||||
doAddParam(statement, Array.get(object, i));
|
Object value = Array.get(object, i);
|
||||||
|
if (value instanceof Map) {
|
||||||
|
((Map<?, ?>) value).values().forEach(e -> doAddParam(statement, e));
|
||||||
|
} else {
|
||||||
|
doAddParam(statement, value);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
doAddParam(statement, object);
|
doAddParam(statement, object);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user