|
|
|
@ -41,10 +41,9 @@ public class MapperSupport extends MybatisPlugin {
|
|
|
|
|
Object obj = super.handle(resultSetHandler, statement);
|
|
|
|
|
|
|
|
|
|
Pageable.Info paging = pagingInfo.get();
|
|
|
|
|
if (paging != null && (obj instanceof List)) {
|
|
|
|
|
if (paging != null && (obj instanceof List<?> list)) {
|
|
|
|
|
pagingInfo.remove();
|
|
|
|
|
|
|
|
|
|
List<?> list = (List<?>)obj;
|
|
|
|
|
BoundedList<Object> boundedList = new BoundedList<>();
|
|
|
|
|
boundedList.setFetchSize(paging.fetchSize);
|
|
|
|
|
boundedList.addAll(list);
|
|
|
|
@ -69,14 +68,12 @@ public class MapperSupport extends MybatisPlugin {
|
|
|
|
|
if (isEmpty(arg)) return;
|
|
|
|
|
|
|
|
|
|
now = ifEmpty(now, () -> dateFormat.format(new Date()));
|
|
|
|
|
if (arg instanceof AbstractEntity) {
|
|
|
|
|
setTimestamp(sqlType, (AbstractEntity)arg, now);
|
|
|
|
|
} else if (arg instanceof Map) {
|
|
|
|
|
Map<?, ?> map = (Map<?, ?>)arg;
|
|
|
|
|
if (arg instanceof AbstractEntity entity) {
|
|
|
|
|
setTimestamp(sqlType, entity, now);
|
|
|
|
|
} else if (arg instanceof Map<?, ?> map) {
|
|
|
|
|
for (Object o: map.values())
|
|
|
|
|
setEntityTimestamp(sqlType, o, now);
|
|
|
|
|
} else if (arg instanceof Iterable) {
|
|
|
|
|
Iterable<?> iterable = (Iterable<?>)arg;
|
|
|
|
|
} else if (arg instanceof Iterable<?> iterable) {
|
|
|
|
|
for (Object o: iterable)
|
|
|
|
|
setEntityTimestamp(sqlType, o, now);
|
|
|
|
|
} else if (arg.getClass().isArray()) {
|
|
|
|
|