ソースを参照

Merge branch 'master' of http://git.qiniu1314.com/Kirin/shenying

Kirin 9 ヶ月 前
コミット
f589eb8539
1 ファイル変更2 行追加2 行削除
  1. 2 2
      app/dao/user/level/UserLevelDao.php

+ 2 - 2
app/dao/user/level/UserLevelDao.php

@@ -41,9 +41,9 @@ class UserLevelDao extends BaseDao
      * @throws \think\db\exception\DbException
      * @throws \think\db\exception\ModelNotFoundException
      */
-    public function getUserLevel(int $uid, string $field = '*')
+    public function getUserLevel(int $uid, string $field = '*', $time = PHP_INT_MAX)
     {
-        return $this->getModel()->where('uid', $uid)->where('is_del', 0)->where('status', 1)->field($field)->with(['levelInfo'])->order('grade desc,add_time desc')->find();
+        return $this->getModel()->where('uid', $uid)->where('is_del', 0)->where('status', 1)->where('add_time', '<', $time)->field($field)->with(['levelInfo'])->order('grade desc,add_time desc')->find();
     }
 
     /**