|
|
@ -118,6 +118,18 @@ func (t *UserCtl) WxLogin() { |
|
|
|
} |
|
|
|
t.CheckErr(err) |
|
|
|
|
|
|
|
// 校验邀请函是否开启
|
|
|
|
invitation := new(models.Invitation) |
|
|
|
exist, err = invitation.GetInvitationByActivityId(activityId) |
|
|
|
t.CheckErr(err) |
|
|
|
//t.Assert(exist, code.MSG_INVITE_SETTING_NOT_EXIST, "邀请函设置不存在")
|
|
|
|
if exist { // 存在邀请函
|
|
|
|
letter := new(models.InvitationLetter) |
|
|
|
exist, err = letter.GetByUserIdAndActivityId(user.Id, activity.Id, activity.ArchId, activity.RehearsalId) |
|
|
|
t.CheckErr(err) |
|
|
|
t.Assert(exist, code.MSG_INVITE_LETTER_NOT_EXIST, "您尚未接受过邀请") |
|
|
|
} |
|
|
|
|
|
|
|
sign := new(models.SignUp) |
|
|
|
exist, err = sign.GetByActivityId(activityId) |
|
|
|
t.CheckErr(err) |
|
|
|