|
@@ -10,9 +10,10 @@ func BusinessTripApplyStatusOutTime(returnDate string) (err error) {
|
|
|
}
|
|
|
defer func() {
|
|
|
if err != nil {
|
|
|
- tx.Commit()
|
|
|
- } else {
|
|
|
tx.Rollback()
|
|
|
+ } else {
|
|
|
+
|
|
|
+ tx.Commit()
|
|
|
}
|
|
|
}()
|
|
|
//客户产品状态变更
|
|
@@ -24,7 +25,7 @@ func BusinessTripApplyStatusOutTime(returnDate string) (err error) {
|
|
|
|
|
|
// 将历史的任务给标记删除掉
|
|
|
sql = `UPDATE business_apply_peer SET status='已过期',modify_time=NOW() WHERE status='待审批' AND return_date < ? `
|
|
|
- _, err = o.Raw(sql, returnDate).Exec()
|
|
|
+ _, err = tx.Raw(sql, returnDate).Exec()
|
|
|
if err != nil {
|
|
|
return
|
|
|
}
|