Browse Source

web同时报名多个人

ziwen 1 year ago
parent
commit
8a36da564a
1 changed files with 3 additions and 2 deletions
  1. 3 2
      models/cygx/activity_special_trip.go

+ 3 - 2
models/cygx/activity_special_trip.go

@@ -113,8 +113,9 @@ func AddCygxActivitySpecialTrip(items []*CygxActivitySpecialTrip, itemsBill []*C
 	}
 
 	//添加流水记录
-	for _, item := range itemsBill {
-		_, err = to.Insert(item)
+	//倒序插入,让流水表看起来是正的
+	for i := len(itemsBill) - 1; i >= 0; i-- {
+		_, err = to.Insert(itemsBill[i])
 		if err != nil {
 			return
 		}