Commit ffb1be6e by “Kongxiangkun”

投票列表增加字段

parent 9eb15f83
......@@ -80,6 +80,9 @@ public class QuestionVo {
@ApiModelProperty(value = "关键字")
private String keywords;
@ApiModelProperty(value = "logSrc")
private String logoSrc;
@ApiModelProperty(value = "所有题型有效:存放附件路径,附件格式:音频、视频、图片(存放多个)")
private List<String> attachmentUrl;
......
......@@ -26,6 +26,7 @@
<result column="tb_company_id" property="companyId" />
<result column="tb_org_id" property="orgId" />
<result column="tb_site_id" property="siteId" />
<result column="logo_src" property="logoSrc" />
</resultMap>
<resultMap id="getVoteResultMap" type="com.yizhi.research.application.vo.domain.VoteRankingVo">
......@@ -37,6 +38,7 @@
<result property="no" column="no"/>
<result property="contentAppendixUrl" column="content_appendix_url"/>
<result property="content" column="content"/>
<result property="logoSrc" column="logo_src"/>
<result property="optionContent" column="optionContent"/>
<result property="keywords" column="keywords"/>
<result property="top" column="top"/>
......@@ -69,6 +71,7 @@
,tb.company_id AS tb_company_id
,tb.org_id AS tb_org_id
,tb.site_id AS tb_site_id
,logo_src AS logo_src
</sql>
<insert id="batchInsert">
......@@ -96,14 +99,14 @@
,update_by_name
,company_id
,org_id
,site_id,keywords)
,site_id,keywords,logo_src)
values
<foreach collection="list" separator="," item="item">
<if test="item != null">
(#{item.id},#{item.researchId},#{item.type},#{item.content},#{item.contentAppendixUrl},
#{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.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>
</foreach>
</insert>
......@@ -186,7 +189,7 @@
</update>
<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
,IFNULL(myanswer.answerState,0) AS answerState
,IFNULL(myanswer.answerState,0) AS answerState,a.logo_src
,r.vote_num
FROM tr_research_question a
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
Research research = researchMapper.selectById(question.getResearchId());
if(research != null) {
question.setStyleType(research.getStyleType());
question.setLogoSrc(research.getLogoSrc());
}
Integer has = checkJump(question.getId(), example.getResearchId());
......@@ -1173,7 +1172,6 @@ public class TrResearchQuestionServiceImpl extends ServiceImpl<TrResearchQuestio
if(research != null) {
voteRankingVo.getRankingList().forEach(v -> {
v.setStyleType(research.getStyleType());
v.setLogoSrc(research.getLogoSrc());
});
}
}
......
......@@ -198,7 +198,6 @@ public class TrResearchQuestion extends Model<TrResearchQuestion> {
private Integer styleType;
@ApiModelProperty(value = "logoSrc")
@TableField(exist = false)
private String logoSrc;
@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