|
|
@ -105,8 +105,13 @@ func (t *TugOfWarCtl) Team() { |
|
|
|
rehearsalId := t.MustGetInt64("rehearsal_id") |
|
|
|
customerId := t.MustGetUID() |
|
|
|
|
|
|
|
area := new(models.AreaStore) |
|
|
|
exist, err := area.GetByCustomerId(customerId) |
|
|
|
t.CheckErr(err) |
|
|
|
t.Assert(exist, code.MSG_AREASTORE_NOT_EXIST, "地区信息异常") |
|
|
|
|
|
|
|
bahe := new(models.TugOfWar) |
|
|
|
exist, err := models.GetById(bahe, baheId) |
|
|
|
exist, err = models.GetById(bahe, baheId) |
|
|
|
t.CheckErr(err) |
|
|
|
t.Assert(exist, code.MSG_TUGWAR_NOT_EXIST, "拔河不存在") |
|
|
|
|
|
|
@ -122,6 +127,7 @@ func (t *TugOfWarCtl) Team() { |
|
|
|
// 非随机模式,自选队伍
|
|
|
|
for index := range teams { |
|
|
|
qrcode, err = utils.GenH5Qrcode(define.H5TugOfWar, map[string]interface{}{ |
|
|
|
"area_id": area.Id, |
|
|
|
"activity_id": bahe.ActivityId, |
|
|
|
"customer_id": customerId, |
|
|
|
"bahe_activity_id": bahe.Id, |
|
|
@ -133,6 +139,7 @@ func (t *TugOfWarCtl) Team() { |
|
|
|
} |
|
|
|
} else { |
|
|
|
qrcode, err = utils.GenH5Qrcode(define.H5TugOfWar, map[string]interface{}{ |
|
|
|
"area_id": area.Id, |
|
|
|
"activity_id": bahe.ActivityId, |
|
|
|
"customer_id": customerId, |
|
|
|
"bahe_activity_id": bahe.Id, |
|
|
|