Browse Source

fix:bug

token_replace
Tooooommy 4 years ago
parent
commit
10bc945b35
  1. 2
      controllers/client/sign.go
  2. 6
      models/sign_history.go

2
controllers/client/sign.go

@ -162,7 +162,7 @@ func (t *SignCtl) Sign() {
}
// 签到人数
signTotal, err := history.Count(signUp.Id, activity.Id, activity.ArchId, activity.RehearsalId)
signTotal, err := history.Count(signUp.Id, activity.Id, activity.ArchId, activity.RehearsalId, 2)
t.CheckErr(err)
signUpTotal, err := new(models.InvitationLetter).Count(activity.Id, activity.ArchId, activity.RehearsalId)

6
models/sign_history.go

@ -36,11 +36,11 @@ func (t *SignHistory) GetByUserId(activityId, archId, userId, rehearsalId, areaI
"rehearsal_id=? and area_id=?", activityId, archId, userId, rehearsalId, areaId).Get(t)
}
func (t *SignHistory) Count(signUpId, activityId, archId, rehearsalId interface{}) (int64, error) {
func (t *SignHistory) Count(signUpId, activityId, archId, rehearsalId, status interface{}) (int64, error) {
// 签到人数
return core.GetXormAuto().Where("is_delete=0 and sign_rule_id=? and "+
" activity_id=? and arch_id=? and rehearsal_id=? and status=2",
signUpId, activityId, archId, rehearsalId).Count(t)
" activity_id=? and arch_id=? and rehearsal_id=? and status=?",
signUpId, activityId, archId, rehearsalId, status).Count(t)
}
func (t *SignHistory) UpdateByIds(ids interface{}, fields ...string) (err error) {

Loading…
Cancel
Save