Commit fdba25ed by “Kongxiangkun”

投票列表增加字段

parent ec780b7b
......@@ -247,4 +247,8 @@ public class ResearchVo {
@ApiModelProperty(value = "展示样式")
private Integer styleType;
@ApiModelProperty(value = "logoSrc")
private String logoSrc;
}
......@@ -46,6 +46,8 @@ public class TrResearchQuestionVo extends Model<TrResearchQuestionVo> {
private String content;
@ApiModelProperty(value = "选项内容")
private String optionContent;
@ApiModelProperty(value = "是否是重新进入 1是")
......@@ -189,6 +191,9 @@ public class TrResearchQuestionVo extends Model<TrResearchQuestionVo> {
@ApiModelProperty(value = "展示样式")
private Integer styleType;
@ApiModelProperty(value = "展示样式")
private String logoSrc;
@Override
protected Serializable pkVal() {
......
......@@ -19,6 +19,9 @@ public class VoteRankingListVo {
@ApiModelProperty(value = "问题内容")
private String content;
@ApiModelProperty(value = "选项内容")
private String optionContent;
@ApiModelProperty(value = "关键字")
private String keywords;
......@@ -37,4 +40,7 @@ public class VoteRankingListVo {
@ApiModelProperty(value = "展示样式")
private Integer styleType;
@ApiModelProperty(value = "展示样式")
private String logoSrc;
}
......@@ -79,4 +79,8 @@ public class ResearchVo {
@ApiModelProperty(value = "展示样式")
private Integer styleType;
@ApiModelProperty(value = "logoSrc")
private String logoSrc;
}
......@@ -37,6 +37,7 @@
<result property="no" column="no"/>
<result property="contentAppendixUrl" column="content_appendix_url"/>
<result property="content" column="content"/>
<result property="optionContent" column="optionContent"/>
<result property="keywords" column="keywords"/>
<result property="top" column="top"/>
<result property="voteCount" column="voteCount"/>
......@@ -184,7 +185,7 @@
</foreach>
</update>
<select id="getVoteResult" resultMap="getVoteResultMap">
SELECT r.id,r.name,a.id AS questionId,a.no,a.content_appendix_url,b.content, a.keywords,COUNT(c.id) AS voteCount
SELECT r.id,r.name,a.id AS questionId,a.no,a.content_appendix_url,b.content as optionContent,a.content,a.keywords,COUNT(c.id) AS voteCount
,IFNULL(myanswer.answerState,0) AS answerState
,r.vote_num
FROM tr_research_question a
......
......@@ -447,6 +447,7 @@ public class TrResearchQuestionServiceImpl extends ServiceImpl<TrResearchQuestio
Research research = researchMapper.selectById(question.getResearchId());
if(research != null) {
question.setStyleType(research.getStyleType());
question.setLogoSrc(research.getLogoSrc());
}
Integer has = checkJump(question.getId(), example.getResearchId());
......@@ -478,6 +479,7 @@ public class TrResearchQuestionServiceImpl extends ServiceImpl<TrResearchQuestio
otherOptionVo.setNo(option.getNo());
otherOptionVo.setRequired(option.getRequired());
question.setOtherOptionVo(otherOptionVo);
question.setOptionContent(option.getContent());
break;
}
}
......@@ -1173,6 +1175,7 @@ public class TrResearchQuestionServiceImpl extends ServiceImpl<TrResearchQuestio
if(research != null) {
voteRankingVo.getRankingList().forEach(v -> {
v.setStyleType(research.getStyleType());
v.setLogoSrc(research.getLogoSrc());
});
}
}
......
......@@ -246,6 +246,9 @@ public class Research extends Model<Research> {
@ApiModelProperty(value = "展示样式")
private Integer styleType;
@ApiModelProperty(value = "展示样式")
private String logoSrc;
@Override
protected Serializable pkVal() {
......
......@@ -47,6 +47,10 @@ public class TrResearchQuestion extends Model<TrResearchQuestion> {
private String content;
@ApiModelProperty(value = "选项内容")
@TableField( exist = false)
private String optionContent;
@ApiModelProperty(value = "是否是重新进入 1是")
@TableField( exist = false)
private Integer isFrist =0;
......@@ -192,6 +196,10 @@ public class TrResearchQuestion extends Model<TrResearchQuestion> {
@ApiModelProperty(value = "展示样式")
@TableField(exist = false)
private Integer styleType;
@ApiModelProperty(value = "logoSrc")
@TableField(exist = false)
private String logoSrc;
@Override
protected Serializable pkVal() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment