瀏覽代碼

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

likai 4 年之前
父節點
當前提交
3b084715b1
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      service/settle_account_main/settle_account_main.go

+ 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 {