Browse Source

0814_1.1

master
zy_Java 5 years ago
parent
commit
bf289f2b5a
  1. 2
      mt/src/main/java/com/ccsens/mt/service/VoteService.java
  2. 3
      mt/src/main/resources/mapper_dao/TopicDao.xml

2
mt/src/main/java/com/ccsens/mt/service/VoteService.java

@ -51,7 +51,7 @@ public class VoteService implements IVoteService{
if (projectId == null) {
projectId = mtGroup.getProjectId();
} else {
if (projectId.longValue() != mtGroup.getId().longValue()) {
if (projectId.longValue() != mtGroup.getProjectId().longValue()) {
throw new BaseException(CodeEnum.PARAM_ERROR);
}
}

3
mt/src/main/resources/mapper_dao/TopicDao.xml

@ -6,10 +6,12 @@
<id column="topicId" property="topicId"/>
<result column="description" property="description"/>
<result column="answersTrue" property="answersTrue"/>
<result column="sequence" property="sequence"/>
<collection property="options" ofType="String">
<id column="options"/>
</collection>
</resultMap>
<resultMap id="topicByLink" type="com.ccsens.mt.bean.vo.TopicVo$TopicByLink" >
<id column="topicId" property="topicId"/>
<result column="description" property="description"/>
@ -25,6 +27,7 @@
t.id as topicId,
t.description as description,
t.answers as answersTrue,
t.sequence,
if(o.`option` is null,'' , concat(o.`option` ,':' ,o.contant)) as options
FROM
t_mt_topic t LEFT JOIN t_mt_topic_option o on t.id = o.topic_id

Loading…
Cancel
Save