소스 검색

Default Changelist

yingzi 3 년 전
부모
커밋
0e65852e5f
1개의 변경된 파일3개의 추가작업 그리고 0개의 파일을 삭제
  1. 3 0
      app/api/controller/Pub.php

+ 3 - 0
app/api/controller/Pub.php

@@ -307,6 +307,9 @@ class Pub extends BaseController
     public function getCardLookCountRank(Request $request) {
     public function getCardLookCountRank(Request $request) {
         $time = $request->param('time', time());
         $time = $request->param('time', time());
         $list = (new UserModel)->where('card_look_count', '>', 0);
         $list = (new UserModel)->where('card_look_count', '>', 0);
+        if ($time > 0) {
+            $list = $list->whereTime('create_time', '>=', $time);
+        }
         $list = $list->order('card_look_count', 'desc')->select();
         $list = $list->order('card_look_count', 'desc')->select();
         $rankList = [];
         $rankList = [];
         foreach ($list as $key => $value) {
         foreach ($list as $key => $value) {