From 32b59f7a7d14f32ca6edc6064f216251fa91b541 Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Fri, 16 Aug 2024 14:04:36 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B4=AD=E7=89=A9=E9=87=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- rule/service_award_dividend/return.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/rule/service_award_dividend/return.go b/rule/service_award_dividend/return.go index 58d40bc..5af9fe5 100644 --- a/rule/service_award_dividend/return.go +++ b/rule/service_award_dividend/return.go @@ -43,14 +43,16 @@ func GetCycle(eg *xorm.Engine) map[string]string { last := postion - 1 next := postion types := "now" + types1 := "last" if postion-1 < 0 { //找出上一周期的时间 last = len(ex) - 1 } else if last == len(ex)-1 { //最后一个了 next = 0 types = "next" + types1 = "now" } - lastDate := GetDate(now, ex[last], "last") + lastDate := GetDate(now, ex[last], types1) res["last"] = time.Unix(lastDate, 0).Format("20060102") nowDate := GetDate(now, ex[next], types) res["now"] = time.Unix(nowDate, 0).Format("20060102")