超管后台排序修改

This commit is contained in:
liu 2024-03-11 11:56:34 +08:00 committed by mkm
parent 671230708f
commit 16e01495e4
2 changed files with 6 additions and 1 deletions

View File

@ -171,7 +171,11 @@ class ProductDao extends BaseDao
}
$query->order($where['order'] . ',rank DESC ,create_time DESC ');
} else if($where['order'] !== ''){
$query->order('U.'.$where['order'].' DESC,U.create_time DESC');
if($where['order'] == 'check'){
$query->order('Product.update_time DESC');
}else{
$query->order('U.'.$where['order'].' DESC,U.create_time DESC');
}
} else {
$query->order('U.create_time DESC');
}

View File

@ -57,6 +57,7 @@ class StoreProduct extends BaseController
$_where = $this->repository->switchType($where['type'], null, 0);
unset($_where['product_type']);
unset($_where['star']);
$where['order'] = "check";//标识后台查询更新时间倒叙
$where = array_merge($where, $_where);
return app('json')->success($this->repository->getAdminList($merId, $where, $page, $limit));
}