6
0
Эх сурвалжийг харах

fix(取消): 取消时间计算反了

likai 4 жил өмнө
parent
commit
3b084715b1

+ 1 - 1
service/settle_account_main/settle_account_main.go

@@ -294,7 +294,7 @@ func (s Service) Cancel(req accountModel.AccountMainCancelReq) error {
 	detail.Data3 = now.Format("Y-m-d H:m:s") // 取消时间
 	detail.Pid = main.Id
 
-	mins := now.Sub(main.AppointStartDate).Minutes()
+	mins := main.AppointStartDate.Sub(now).Minutes()
 	if mins > 0 { // 正向超时,计算违约收费
 		r := ""
 		for _, rule := range rules {