进行排序
array_multisort() 函数返回一个排序数组
我这个是根据字段里面的值的大小进行排序 优先 parent_path值的长度 register_time注册时间最大
$all = static::getByAndWhere([], $andWhere, ['id','parent_path','register_time']);
$path = array_column($all,'parent_path');
$time = array_column($all,'register_time');
array_multisort($path,SORT_DESC,$time,SORT_DESC,$all);
var_dump($all);die;