|
|
@ -133,7 +133,8 @@ func (t *VoteCtl) JoinTotal() { |
|
|
|
t.Assert(exist, code.MSG_ACTIVITY_NOT_EXIST, "互动不存在") |
|
|
|
|
|
|
|
total, err := core.GetXormAuto().Distinct("user_id").Where("vote_activity_id=? and rehearsal_id=? "+ |
|
|
|
" and is_delete=0", voteActivityId, activity.RehearsalId, activity.ArchId).Count(new(models.NewVoteActivityHistory)) |
|
|
|
" arch_id=? and is_delete=0", voteActivityId, activity.RehearsalId, activity.ArchId). |
|
|
|
Count(new(models.NewVoteActivityHistory)) |
|
|
|
t.CheckErr(err) |
|
|
|
t.JSON(total) |
|
|
|
} |
|
|
@ -142,7 +143,12 @@ func (t *VoteCtl) JoinTotal() { |
|
|
|
func (t *VoteCtl) List() { |
|
|
|
activityId := t.MustGetInt64("activity_id") |
|
|
|
|
|
|
|
votes, err := models.GetVoteListByActivityId(activityId) |
|
|
|
activity := new(models.Activity) |
|
|
|
exist, err := models.Get(activity, activityId) |
|
|
|
t.CheckErr(err) |
|
|
|
t.Assert(exist, code.MSG_ACTIVITY_NOT_EXIST, "互动不存在") |
|
|
|
|
|
|
|
votes, err := models.GetVoteListByActivityId(activityId, activity.ArchId) |
|
|
|
t.CheckErr(err) |
|
|
|
|
|
|
|
ids := make([]int64, 0) |
|
|
|