Browse Source

Default Changelist

yingzi 2 years ago
parent
commit
a2f7095dda
1 changed files with 1 additions and 20 deletions
  1. 1 20
      app/api/controller/Pub.php

+ 1 - 20
app/api/controller/Pub.php

@@ -305,28 +305,13 @@ class Pub extends BaseController
      * @param 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);
-        if ($time > 0) {
-            $list = $list->whereTime('parent_time', '>=', $time);
-        }
         $list = $list->order('card_look_count', 'desc')->select();
-        if (empty($list)) {
-            var_dump('1');
-            var_dump('list is empty');exit;
-        }
         $rankList = [];
         foreach ($list as $key => $value) {
             $userInfo = (new UserModel)->where('uid', $value['uid'])->find();
-            if (!$userInfo) {
-                var_dump('2');
-                var_dump('user info is empty');exit;
-            }
             $template = $this->getShowTemplateItem($value['uid']);
-            if (!$template) {
-                var_dump('3');
-                var_dump('template is empty');exit;
-            }
             $rankList[] = [
                 'rank' => $key + 1,
                 'uid' => $value['uid'],
@@ -336,10 +321,6 @@ class Pub extends BaseController
                 'template' => $template,
             ];
         }
-        if (empty($rankList)) {
-            var_dump('4');
-            var_dump('rankList is empty');exit;
-        }
         return app('json')->success($rankList);
     }