diff --git a/crmeb/app/dao/article/ArticleCategoryDao.php b/crmeb/app/dao/article/ArticleCategoryDao.php index dfd266a10..b0734c33b 100644 --- a/crmeb/app/dao/article/ArticleCategoryDao.php +++ b/crmeb/app/dao/article/ArticleCategoryDao.php @@ -59,7 +59,7 @@ class ArticleCategoryDao extends BaseDao public function getArticleCategory() { return $this->search(['hidden' => 0, 'is_del' => 0, 'status' => 1, 'pid' => 0])->with(['children']) - ->order('sort DESC') + ->order('sort DESC,id DESC') ->field('id,pid,title') ->select()->toArray(); } @@ -77,7 +77,7 @@ class ArticleCategoryDao extends BaseDao ->where('hidden', 0) ->where('is_del', 0) ->where('status', 1) - ->order('sort DESC') + ->order('sort DESC,id DESC') ->field('id,pid,title') ->select()->toArray(); } diff --git a/crmeb/app/dao/diy/PageCategoryDao.php b/crmeb/app/dao/diy/PageCategoryDao.php index a147ef424..9a14f7753 100644 --- a/crmeb/app/dao/diy/PageCategoryDao.php +++ b/crmeb/app/dao/diy/PageCategoryDao.php @@ -47,7 +47,7 @@ class PageCategoryDao extends BaseDao { return $this->search($where)->field($field)->when($page && $limit, function ($query) use ($page, $limit) { $query->page(); - })->order('sort desc')->select()->toArray(); + })->order('sort desc,id DESC')->select()->toArray(); } } diff --git a/crmeb/app/dao/order/StoreOrderDao.php b/crmeb/app/dao/order/StoreOrderDao.php index 6a351008a..5c239fb6b 100644 --- a/crmeb/app/dao/order/StoreOrderDao.php +++ b/crmeb/app/dao/order/StoreOrderDao.php @@ -702,7 +702,7 @@ class StoreOrderDao extends BaseDao $query->field("sum($sumField) as number,FROM_UNIXTIME($group, '$timeUinx') as time"); $query->group("FROM_UNIXTIME($group, '$timeUinx')"); }) - ->order('pay_time ASC')->select()->toArray(); + ->order('pay_time ASC,id DESC')->select()->toArray(); } /**时间分组订单数统计 @@ -730,7 +730,7 @@ class StoreOrderDao extends BaseDao $query->field("count($sumField) as number,FROM_UNIXTIME(pay_time, '$timeUinx') as time"); $query->group("FROM_UNIXTIME(pay_time, '$timeUinx')"); }) - ->order('pay_time ASC')->select()->toArray(); + ->order('pay_time ASC,id DESC')->select()->toArray(); } /**时间段支付订单人数 @@ -773,7 +773,7 @@ class StoreOrderDao extends BaseDao $query->field("count(distinct uid) as number,FROM_UNIXTIME(pay_time, '$timeUinx') as time"); $query->group("FROM_UNIXTIME(pay_time, '$timeUinx')"); }) - ->order('pay_time ASC')->select()->toArray(); + ->order('pay_time ASC,id DESC')->select()->toArray(); } diff --git a/crmeb/app/dao/shipping/ShippingTemplatesDao.php b/crmeb/app/dao/shipping/ShippingTemplatesDao.php index 66c32e815..42b0a0896 100644 --- a/crmeb/app/dao/shipping/ShippingTemplatesDao.php +++ b/crmeb/app/dao/shipping/ShippingTemplatesDao.php @@ -53,7 +53,7 @@ class ShippingTemplatesDao extends BaseDao */ public function getShippingList(array $where, int $page, int $limit) { - return $this->search($where)->order('sort DESC')->page($page, $limit)->select()->toArray(); + return $this->search($where)->order('sort DESC,id DESC')->page($page, $limit)->select()->toArray(); } /** diff --git a/crmeb/app/dao/system/SystemMenusDao.php b/crmeb/app/dao/system/SystemMenusDao.php index 952ceee3a..8f39cd767 100644 --- a/crmeb/app/dao/system/SystemMenusDao.php +++ b/crmeb/app/dao/system/SystemMenusDao.php @@ -128,7 +128,7 @@ class SystemMenusDao extends BaseDao public function menusSelect(array $where, $type = 1) { if ($type == 1) { - return $this->search($where)->field('id,pid,menu_name,menu_path,unique_auth,sort')->order('sort DESC')->select(); + return $this->search($where)->field('id,pid,menu_name,menu_path,unique_auth,sort')->order('sort DESC,id DESC')->select(); } else { return $this->search($where)->group('pid')->column('pid'); } @@ -143,7 +143,7 @@ class SystemMenusDao extends BaseDao public function getSearchList() { return $this->search(['is_show' => 1, 'auth_type' => 1, 'is_del' => 0, 'is_show_path' => 0]) - ->field('id,pid,menu_name,menu_path,unique_auth,sort')->order('sort DESC')->select(); + ->field('id,pid,menu_name,menu_path,unique_auth,sort')->order('sort DESC,id DESC')->select(); } /** diff --git a/crmeb/app/dao/system/config/SystemConfigDao.php b/crmeb/app/dao/system/config/SystemConfigDao.php index d093c2c23..8afaf35d0 100644 --- a/crmeb/app/dao/system/config/SystemConfigDao.php +++ b/crmeb/app/dao/system/config/SystemConfigDao.php @@ -84,7 +84,7 @@ class SystemConfigDao extends BaseDao { $where['tab_id'] = $tabId; if ($status == 1) $where['status'] = $status; - return $this->search($where)->order('sort desc')->select()->toArray(); + return $this->search($where)->order('sort desc,id DESC')->select()->toArray(); } /** diff --git a/crmeb/app/dao/user/MemberShipDao.php b/crmeb/app/dao/user/MemberShipDao.php index a6720c2d4..2ec8fd55b 100644 --- a/crmeb/app/dao/user/MemberShipDao.php +++ b/crmeb/app/dao/user/MemberShipDao.php @@ -50,7 +50,7 @@ class MemberShipDao extends BaseDao */ public function getApiList(array $where) { - return $this->search()->where($where)->order('sort desc')->select()->toArray(); + return $this->search()->where($where)->order('sort desc,id DESC')->select()->toArray(); } diff --git a/crmeb/app/dao/user/UserAddressDao.php b/crmeb/app/dao/user/UserAddressDao.php index 2ad2d13da..bce2de1cd 100644 --- a/crmeb/app/dao/user/UserAddressDao.php +++ b/crmeb/app/dao/user/UserAddressDao.php @@ -44,6 +44,6 @@ class UserAddressDao extends BaseDao */ public function getList(array $where, string $field = '*', int $page, int $limit): array { - return $this->search($where)->field($field)->page($page, $limit)->order('is_default DESC')->select()->toArray(); + return $this->search($where)->field($field)->page($page, $limit)->order('is_default DESC,id DESC')->select()->toArray(); } } diff --git a/crmeb/app/dao/user/UserLabelCateDao.php b/crmeb/app/dao/user/UserLabelCateDao.php index c5adb29fa..bd192c3da 100644 --- a/crmeb/app/dao/user/UserLabelCateDao.php +++ b/crmeb/app/dao/user/UserLabelCateDao.php @@ -45,7 +45,7 @@ class UserLabelCateDao extends BaseDao { return $this->search($where)->when($page && $limit, function ($query) use ($page, $limit) { $query->page($page, $limit); - })->order('sort DESC')->select()->toArray(); + })->order('sort DESC,id DESC')->select()->toArray(); } /** @@ -59,6 +59,6 @@ class UserLabelCateDao extends BaseDao { return $this->getModel()->when(count($with), function ($query) use ($with) { $query->with($with); - })->order('sort DESC')->select()->toArray(); + })->order('sort DESC,id DESC')->select()->toArray(); } }