lanjianrong 4 лет назад
Родитель
Сommit
21434a694e
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      dao/approver_dao.go

+ 2 - 2
dao/approver_dao.go

@@ -706,7 +706,7 @@ func (d *ApproverDao) BackHandlerWithId(auditType string, id int, uid int, times
 			return err
 		}
 		safe.Status = auditor.Progress + 1
-		_, err = session.Where("id = ? and bidsection_id = ?", safe.Id, safe.BidsectionId).Update(safe)
+		_, err = session.Where("id = ? and bidsection_id = ?", safe.Id, safe.BidsectionId).Limit(1).Update(safe)
 		if err != nil {
 			session.Rollback()
 			return err
@@ -767,7 +767,7 @@ func (d *ApproverDao) BackHandlerWithId(auditType string, id int, uid int, times
 		}
 
 		quality.Status = auditor.Progress + 1
-		_, err = session.Where("id =? and bidsection_id = ?", quality.Id, quality.BidsectionId).Update(quality)
+		_, err = session.Where("id =? and bidsection_id = ?", quality.Id, quality.BidsectionId).Limit(1).Update(quality)
 		if err != nil {
 			session.Rollback()
 			return err