From 7dbf87949aaf370472d313e2071c85e5f732d412 Mon Sep 17 00:00:00 2001 From: tommy <3405129587@qq.com> Date: Mon, 13 Jul 2020 18:23:52 +0800 Subject: [PATCH] fix:bug --- controllers/client/vote.go | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/controllers/client/vote.go b/controllers/client/vote.go index 936fe8c..b02e5db 100644 --- a/controllers/client/vote.go +++ b/controllers/client/vote.go @@ -6,7 +6,6 @@ import ( "hudongzhuanjia/controllers" "hudongzhuanjia/models" "hudongzhuanjia/utils/code" - "time" ) type VoteCtl struct { @@ -53,14 +52,11 @@ func (t *VoteCtl) Vote() { t.ERROR(fmt.Sprintf("您投票人数已超过%d人", vote.ModelNum), code.MSG_ERR) } } - // done: 增加人数限制 history.UserId = uid history.RehearsalId = activity.RehearsalId history.VoteActivityId = vote.Id history.VoteActivityLadderId = ladderId - history.IsDelete = false - history.CreatedAt = time.Now() - history.UpdatedAt = time.Now() + history.ArchId = activity.ArchId _, err = models.Add(history) t.CheckErr(err) @@ -81,7 +77,7 @@ func (t *VoteCtl) List() { t.Assert(exist, code.MSG_ACTIVITY_NOT_EXIST, "互动不存在") t.CheckRunning(activity.Status) - votes, err := models.GetVoteListByActivityId(activity.Id) + votes, err := models.GetVoteListByActivityId(activity.Id, activity.ArchId) t.CheckErr(err) t.JSON(map[string]interface{}{