From 02c47644baf445fd9a9aa664820cc5199e234eac Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Thu, 23 May 2024 14:49:03 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hdl/hdl_condition.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hdl/hdl_condition.go b/hdl/hdl_condition.go index a8f9e14..3ffbf35 100644 --- a/hdl/hdl_condition.go +++ b/hdl/hdl_condition.go @@ -393,11 +393,12 @@ func TotalSmallTeam(eg *xorm.Engine, uid string) string { return "0" } func GetOwnTaskVideoNum(eg *xorm.Engine, uid interface{}, task map[string]string, t time.Time) string { + t = time.Now() stime := time.Date(t.Year(), t.Month(), t.Day()-zhios_condition_statistics_utils.StrToInt(task["within_days"]), t.Hour(), 0, 0, 0, t.Location()).Format("20060102") if zhios_condition_statistics_utils.StrToInt(task["within_days"]) == 0 { stime = "0" } - etime := t.Format("20060102") + etime := time.Now().Format("20060102") sess := eg.Where("uid=? and time>=? and time<=? and task_type=? and task_id>0", uid, stime, etime, 3) sum, _ := sess.Sum(&model.TaskVideoNum{}, "count") return zhios_condition_statistics_utils.Int64ToStr(int64(sum))