Browse Source

no message

xingzai 1 year ago
parent
commit
496b750435
1 changed files with 4 additions and 0 deletions
  1. 4 0
      models/questionnaire_vote.go

+ 4 - 0
models/questionnaire_vote.go

@@ -75,6 +75,10 @@ func AddCygxQuestionnaireVote(voteItems []*CygxQuestionnaireVote, otherItem *Cyg
 		if err != nil {
 		if err != nil {
 			return
 			return
 		}
 		}
+
+		//更新其他主题投票数量
+		sql := ` UPDATE cygx_questionnaire SET other_theme_total =  other_theme_total +1 WHERE questionnaire_id = ?  `
+		_, err = o.Raw(sql, otherItem.QuestionnaireId).Exec()
 	}
 	}
 	//主题ID提交问卷需要写入的信息
 	//主题ID提交问卷需要写入的信息
 	for _, v := range voteItems {
 	for _, v := range voteItems {