From 3ba6ea9c7e4f1e8aeecf37903235c9a0c073f494 Mon Sep 17 00:00:00 2001 From: "Mr.Huan" Date: Sat, 22 Jan 2022 15:07:37 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E8=B0=83=E6=95=B4=E5=91=A8=E6=8A=A5?= =?UTF-8?q?=E7=AD=BE=E5=90=8D=E7=9A=84=E7=94=9F=E6=88=90=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Models/Report.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Models/Report.php b/app/Models/Report.php index 100ba10a..1b5dca7f 100644 --- a/app/Models/Report.php +++ b/app/Models/Report.php @@ -144,15 +144,15 @@ class Report extends AbstractModel // 如果设置了周期偏移量 empty( $offset ) || $now_dt->subWeeks( abs( $offset ) ); $now_dt->startOfWeek(); // 设置为当周第一天 - return $now_dt->year . $now_dt->weekOfYear . $now_dt->month . $now_dt->weekOfMonth; + return $now_dt->year . $now_dt->weekOfYear; }, Report::DAILY => function() use ($now_dt, $offset) { // 如果设置了周期偏移量 empty( $offset ) || $now_dt->subDays( abs( $offset ) ); - return $now_dt->year . $now_dt->dayOfYear . $now_dt->month . $now_dt->daysInMonth; + return $now_dt->format("Ymd"); }, default => "", }; - return md5( $user->userid . ( is_callable($time_s) ? $time_s() : "" ) . $type ); + return $user->userid . ( is_callable($time_s) ? $time_s() : "" ); } }