From f8cbd31f619108ec9b680a225455e4d2f6188568 Mon Sep 17 00:00:00 2001 From: kuaifan Date: Sat, 25 Mar 2023 12:25:22 +0800 Subject: [PATCH] no message --- README.md | 4 ++-- README_CN.md | 4 ++-- app/Models/Deleted.php | 13 ++++++++----- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 44373ba34..90302c228 100644 --- a/README.md +++ b/README.md @@ -21,9 +21,9 @@ Group No.: `546574618` # 1、Clone the repository # Clone projects on github -git clone --depth=1 https://github.com/kuaifan/dootask.git +git clone -b pro --depth=1 https://github.com/kuaifan/dootask.git # Or you can use gitee -git clone --depth=1 https://gitee.com/aipaw/dootask.git +git clone -b pro --depth=1 https://gitee.com/aipaw/dootask.git # 2、Enter directory cd dootask diff --git a/README_CN.md b/README_CN.md index 0797ff044..46245c359 100644 --- a/README_CN.md +++ b/README_CN.md @@ -21,9 +21,9 @@ # 1、克隆项目到您的本地或服务器 # 通过github克隆项目 -git clone --depth=1 https://github.com/kuaifan/dootask.git +git clone -b pro --depth=1 https://github.com/kuaifan/dootask.git # 或者你也可以使用gitee -git clone --depth=1 https://gitee.com/aipaw/dootask.git +git clone -b pro --depth=1 https://gitee.com/aipaw/dootask.git # 2、进入目录 cd dootask diff --git a/app/Models/Deleted.php b/app/Models/Deleted.php index 26e8d494b..0309091dc 100644 --- a/app/Models/Deleted.php +++ b/app/Models/Deleted.php @@ -35,13 +35,16 @@ class Deleted extends AbstractModel */ public static function ids($type, $userid, $time): array { - if (empty($time)) { - return []; - } - return self::where([ + $builder = self::where([ 'type' => $type, 'userid' => $userid - ])->where('created_at', '>=', Carbon::parse($time))->pluck('did')->toArray(); + ])->orderByDesc('id'); + if (empty($time)) { + $builder = $builder->take(50); + } else { + $builder = $builder->where('created_at', '>=', Carbon::parse($time))->take(500); + } + return $builder->pluck('did')->toArray(); } /**