更新
This commit is contained in:
@@ -42,8 +42,12 @@ class CustomerLists extends BaseAdminDataLists implements ListsSearchInterface
|
||||
*/
|
||||
public function lists(): array
|
||||
{
|
||||
// 按首次添加时间倒序:库字段 external_first_add_time;未回填(0)时回退 create_time(与列表「添加时间」展示一致)
|
||||
$lists = $this->baseQuery()
|
||||
->order('id', 'desc')
|
||||
->orderRaw(
|
||||
'(COALESCE(NULLIF(external_first_add_time, 0), create_time) = 0) ASC, '
|
||||
. 'COALESCE(NULLIF(external_first_add_time, 0), create_time) DESC, id DESC'
|
||||
)
|
||||
->limit($this->limitOffset, $this->limitLength)
|
||||
->select()
|
||||
->toArray();
|
||||
|
||||
Reference in New Issue
Block a user