Commit fdba25ed by “Kongxiangkun”

投票列表增加字段

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