Kaynağa Gözat

厦门 顺序修改

rengb 4 yıl önce
ebeveyn
işleme
6ada366bd1

+ 3 - 2
trans/src/main/java/com/lantone/qc/trans/comsis/OrdinaryAssistant.java

@@ -5,6 +5,7 @@ import com.lantone.qc.dbanaly.util.ModuleMappingUtil;
 import com.lantone.qc.pub.util.DateUtil;
 import com.lantone.qc.pub.util.MapUtil;
 import com.lantone.qc.pub.util.StringUtil;
+import org.apache.commons.collections.MapUtils;
 
 import java.util.Date;
 import java.util.HashSet;
@@ -90,10 +91,10 @@ public class OrdinaryAssistant {
      */
     public static int pageDataTimeSort(Map<String, Object> map1, Map<String, Object> map2, String key, String format) {
         Date date1 = null, date2 = null;
-        if (map1.get(key) != null) {
+        if (MapUtils.isNotEmpty(map1) && map1.get(key) != null) {
             date1 = DateUtil.parseDate(map1.get(key).toString(), format);
         }
-        if (map2.get(key) != null) {
+        if (MapUtils.isNotEmpty(map2) && map2.get(key) != null) {
             date2 = DateUtil.parseDate(map2.get(key).toString(), format);
         }
         long time1 = date1 == null ? 0 : date1.getTime();