|
@@ -0,0 +1,26 @@
|
|
|
+package com.kxs.adminap.filter;
|
|
|
+
|
|
|
+import java.sql.Timestamp;
|
|
|
+import java.time.LocalDateTime;
|
|
|
+import java.time.format.DateTimeFormatter;
|
|
|
+import java.util.HashMap;
|
|
|
+
|
|
|
+public class RMap extends HashMap {
|
|
|
+
|
|
|
+ private static final long serialVersionUID = 1L;
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public Object put(Object key, Object value) {
|
|
|
+ if(value != null) {
|
|
|
+ String type = value.getClass().getSimpleName();
|
|
|
+ if(type.equals("LocalDateTime")) {
|
|
|
+ LocalDateTime time = (LocalDateTime) value;
|
|
|
+ String format = time.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
|
|
|
+ return super.put(key, format);
|
|
|
+ }else {
|
|
|
+ return super.put(key, value);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return super.put(key, value);
|
|
|
+ }
|
|
|
+}
|