|
@@ -38,13 +38,13 @@
|
|
<sql id="Base_Column_List">
|
|
<sql id="Base_Column_List">
|
|
id, uid, indate, content, score, is_draft, is_evaluated, score_id
|
|
id, uid, indate, content, score, is_draft, is_evaluated, score_id
|
|
</sql>
|
|
</sql>
|
|
-
|
|
|
|
|
|
+
|
|
<select id="getIdeaListByUid" resultMap="BaseResultMapVO">
|
|
<select id="getIdeaListByUid" resultMap="BaseResultMapVO">
|
|
select
|
|
select
|
|
- i.id, i.uid, i.indate idea_indate, i.content idea_content, i.score, i.is_draft, i.is_evaluated, i.score_id,
|
|
|
|
- ic.id cid,ic.idea_id, ic.content, ic.responder_id, ic.responder, ic.indate
|
|
|
|
|
|
+ i.id, i.uid, i.indate idea_indate, i.content idea_content, i.score, i.is_draft, i.is_evaluated, i.score_id,
|
|
|
|
+ ic.id cid,ic.idea_id, ic.content, ic.responder_id, ic.responder, ic.indate
|
|
from
|
|
from
|
|
- idea i
|
|
|
|
|
|
+ idea i
|
|
left join idea_comment ic
|
|
left join idea_comment ic
|
|
on i.id = ic.idea_id
|
|
on i.id = ic.idea_id
|
|
<where>
|
|
<where>
|
|
@@ -52,7 +52,7 @@
|
|
i.uid = #{idea.uid,jdbcType=INTEGER}
|
|
i.uid = #{idea.uid,jdbcType=INTEGER}
|
|
</if>
|
|
</if>
|
|
<if test="time != null">
|
|
<if test="time != null">
|
|
- and date_format(i.indate,'%Y-%m') = #{time}
|
|
|
|
|
|
+ and date_format(i.indate,'%Y-%m') = #{time}
|
|
</if>
|
|
</if>
|
|
<if test="idea.scoreId != null">
|
|
<if test="idea.scoreId != null">
|
|
and score_id = #{idea.scoreId}
|
|
and score_id = #{idea.scoreId}
|
|
@@ -64,15 +64,15 @@
|
|
select
|
|
select
|
|
id, uid, indate, score, is_draft, is_evaluated, score_id
|
|
id, uid, indate, score, is_draft, is_evaluated, score_id
|
|
from
|
|
from
|
|
- idea i
|
|
|
|
|
|
+ idea i
|
|
<where>
|
|
<where>
|
|
i.uid = #{ideaVO.uid,jdbcType=INTEGER}
|
|
i.uid = #{ideaVO.uid,jdbcType=INTEGER}
|
|
and is_evaluated = 1
|
|
and is_evaluated = 1
|
|
<if test="ideaVO.time != null">
|
|
<if test="ideaVO.time != null">
|
|
- and date_format(i.indate,'%Y-%m') = #{time}
|
|
|
|
|
|
+ and date_format(i.indate,'%Y-%m') = #{time}
|
|
</if>
|
|
</if>
|
|
<if test="ideaVO.scoreId != null">
|
|
<if test="ideaVO.scoreId != null">
|
|
- and score_id = #{ideaVO.scoreId}
|
|
|
|
|
|
+ and score_id = #{ideaVO.scoreId}
|
|
</if>
|
|
</if>
|
|
</where>
|
|
</where>
|
|
order by i.indate desc
|
|
order by i.indate desc
|