private static void ListSort(List<OrderDifferentVo> list) {
Collections.sort(list, new Comparator<OrderDifferentVo>() {
@Override
public int compare(OrderDifferentVo o1, OrderDifferentVo o2) {
try {
Date dt1 = o1.getCreateDate();
Date dt2 = o2.getCreateDate();
if (dt1.getTime() > dt2.getTime()) {
return -1;
} else if (dt1.getTime() < dt2.getTime()) {
return 1;
} else {
return 0;
}
} catch (Exception e) {
e.printStackTrace();
}
return 0;
}
});
}