Commit ffb1be6e by “Kongxiangkun”

投票列表增加字段

parent 9eb15f83
...@@ -80,6 +80,9 @@ public class QuestionVo { ...@@ -80,6 +80,9 @@ public class QuestionVo {
@ApiModelProperty(value = "关键字") @ApiModelProperty(value = "关键字")
private String keywords; private String keywords;
@ApiModelProperty(value = "logSrc")
private String logoSrc;
@ApiModelProperty(value = "所有题型有效:存放附件路径,附件格式:音频、视频、图片(存放多个)") @ApiModelProperty(value = "所有题型有效:存放附件路径,附件格式:音频、视频、图片(存放多个)")
private List<String> attachmentUrl; private List<String> attachmentUrl;
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
<result column="tb_company_id" property="companyId" /> <result column="tb_company_id" property="companyId" />
<result column="tb_org_id" property="orgId" /> <result column="tb_org_id" property="orgId" />
<result column="tb_site_id" property="siteId" /> <result column="tb_site_id" property="siteId" />
<result column="logo_src" property="logoSrc" />
</resultMap> </resultMap>
<resultMap id="getVoteResultMap" type="com.yizhi.research.application.vo.domain.VoteRankingVo"> <resultMap id="getVoteResultMap" type="com.yizhi.research.application.vo.domain.VoteRankingVo">
...@@ -37,6 +38,7 @@ ...@@ -37,6 +38,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="logoSrc" column="logo_src"/>
<result property="optionContent" column="optionContent"/> <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"/>
...@@ -69,6 +71,7 @@ ...@@ -69,6 +71,7 @@
,tb.company_id AS tb_company_id ,tb.company_id AS tb_company_id
,tb.org_id AS tb_org_id ,tb.org_id AS tb_org_id
,tb.site_id AS tb_site_id ,tb.site_id AS tb_site_id
,logo_src AS logo_src
</sql> </sql>
<insert id="batchInsert"> <insert id="batchInsert">
...@@ -96,14 +99,14 @@ ...@@ -96,14 +99,14 @@
,update_by_name ,update_by_name
,company_id ,company_id
,org_id ,org_id
,site_id,keywords) ,site_id,keywords,logo_src)
values values
<foreach collection="list" separator="," item="item"> <foreach collection="list" separator="," item="item">
<if test="item != null"> <if test="item != null">
(#{item.id},#{item.researchId},#{item.type},#{item.content},#{item.contentAppendixUrl}, (#{item.id},#{item.researchId},#{item.type},#{item.content},#{item.contentAppendixUrl},
#{item.needAnswer},#{item.maxSelectItem},#{item.minSelectItem},#{item.minScore},#{item.maxScore}, #{item.needAnswer},#{item.maxSelectItem},#{item.minSelectItem},#{item.minScore},#{item.maxScore},
#{item.no},#{item.jumpType},#{item.jumpNum},#{item.jumpable},#{item.deleted},#{item.createTime},#{item.createById},#{item.createByName}, #{item.no},#{item.jumpType},#{item.jumpNum},#{item.jumpable},#{item.deleted},#{item.createTime},#{item.createById},#{item.createByName},
#{item.updateTime},#{item.updateById},#{item.updateByName},#{item.companyId},#{item.orgId},#{item.siteId},#{item.keywords}) #{item.updateTime},#{item.updateById},#{item.updateByName},#{item.companyId},#{item.orgId},#{item.siteId},#{item.keywords},#{logoSrc})
</if> </if>
</foreach> </foreach>
</insert> </insert>
...@@ -186,7 +189,7 @@ ...@@ -186,7 +189,7 @@
</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 as optionContent,a.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,a.logo_src
,r.vote_num ,r.vote_num
FROM tr_research_question a FROM tr_research_question a
INNER JOIN tr_research_question_option b ON a.id=b.question_id AND b.deleted=0 INNER JOIN tr_research_question_option b ON a.id=b.question_id AND b.deleted=0
......
...@@ -447,7 +447,6 @@ public class TrResearchQuestionServiceImpl extends ServiceImpl<TrResearchQuestio ...@@ -447,7 +447,6 @@ 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());
...@@ -1173,7 +1172,6 @@ public class TrResearchQuestionServiceImpl extends ServiceImpl<TrResearchQuestio ...@@ -1173,7 +1172,6 @@ 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());
}); });
} }
} }
......
...@@ -198,7 +198,6 @@ public class TrResearchQuestion extends Model<TrResearchQuestion> { ...@@ -198,7 +198,6 @@ public class TrResearchQuestion extends Model<TrResearchQuestion> {
private Integer styleType; private Integer styleType;
@ApiModelProperty(value = "logoSrc") @ApiModelProperty(value = "logoSrc")
@TableField(exist = false)
private String logoSrc; private String logoSrc;
@Override @Override
......
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