|
@@ -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();
|
|
|
}
|
|
|
|
|
|
/**
|