search

Home  >  Q&A  >  body text

java - 两个List中的对象类型不一致,然后将这两个List合并成一个List,合并的时候需要按照对象的createTime字段排序

怎么做比较好?
具体业务场景是:

移动端需要展示一个列表:视频列表和攻略列表,将它们按时间DESC排序(时间是都有的字段),以及还有分页功能.(List是分两次从数据库中读出来的)
阿神阿神2923 days ago445

reply all(1)I'll reply

  • 迷茫

    迷茫2017-04-17 17:47:09

    For Java, I remember there is a direct way to sort the list (I fell into the trap of PHP)

    reply
    0
  • Cancelreply