$top_list = self::where($where)->column('id');
//排序
$exp = new \think\Db\Expression('field(p.id,' . implode(',', $top_list) . '),p.create_time DESC');
//按指定顺序查询
$publish_list = self::alias('p')
->order($exp)
->select();
tp 按指定字段指定顺序排序
最新推荐文章于 2024-06-05 16:01:06 发布