作者 陈志颖

test:更新兑换活动倒计时计算

... ... @@ -945,9 +945,10 @@ func (cashPoolService *CashPoolService) UpdateExchangeCashActivity(updateExchang
updateExchangeCashActivityCommand.Deadline = time.Date(deadline.Year(), deadline.Month(), deadline.Day(), 23, 59, 59, 0, time.Local)
}
// 计算倒计时
var t1 = time.Now().Local()
var t2 = activityFound.Deadline.Local()
// 更新兑换活动倒计时
t1 := time.Now().Local()
//var t2 = activityFound.Deadline.Local()
t2 := updateExchangeCashActivityCommand.Deadline.Local()
updateExchangeCashActivityCommand.CountDown = int64(math.Ceil(t2.Sub(t1).Hours() / 24))
// 倒计时结束处理
... ...