时间倒叙
https://blog.csdn.net/tjcyjd/article/details/6804690
1.在实体类里面加数据,
固定的不用改
public static class Caopty implements Comparator{
@Override
public int compare(Object object1, Object object2) {
Accept a1 = (Accept) object1;
Accept a2 = (Accept) object2;
return a2.getUpdate_time().compareTo(a1.getUpdate_time());
}
}
2.在ctroller 调用
Comparator