瀏覽代碼

修改c端接口:获取栏目

15313670163 1 天之前
父節點
當前提交
fca688f55f
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      app/JsonRpc/WebsiteService.php

+ 2 - 1
app/JsonRpc/WebsiteService.php

@@ -652,7 +652,8 @@ class WebsiteService implements WebsiteServiceInterface
              ->where('pid', $data['pid'])
              ->offset($data['placeid'])
              ->limit($data['num'])
-             ->orderBy('sort');
+             ->orderBy('sort')
+             ->orderBy('updated_at','desc');
          // 如果 $pid 数组不为空,添加 CASE WHEN 条件
          if (!empty($pid)) {
              $placeholders = implode(',', array_fill(0, count($pid), '?'));