From 46c84bce456cb704e61d6cee6a412f010d2b347c Mon Sep 17 00:00:00 2001 From: chenweijian <820961417@qq.com> Date: Fri, 14 Jul 2023 11:19:26 +0800 Subject: [PATCH] =?UTF-8?q?=E6=98=AF=E5=90=A6=E6=96=B0=E7=94=A8=E6=88=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- utils/utils.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/utils/utils.go b/utils/utils.go index 791d774..0ace8d8 100644 --- a/utils/utils.go +++ b/utils/utils.go @@ -114,3 +114,11 @@ func Decimal(value float64) float64 { } return newValue } + +// 是否新用户 +func IsNewUser(createTimeUnix uint64) bool { + if int64(createTimeUnix)+DAY_SECOND*7 < time.Now().Unix() { + return true + } + return false +} -- 2.22.0