Browse Source

Default Changelist

yingzi 2 years ago
parent
commit
0e65852e5f
1 changed files with 3 additions and 0 deletions
  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) {