|
@ -202,22 +202,37 @@ |
|
|
</trim> |
|
|
</trim> |
|
|
</insert> |
|
|
</insert> |
|
|
|
|
|
|
|
|
|
|
|
<resultMap id="VotingIssueListResultDTOMap" type="com.epmet.dto.result.VotingIssueListResultDTO"> |
|
|
|
|
|
<id column="issueId" property="issueId" /> |
|
|
|
|
|
<result column="issueTitle" property="issueTitle"/> |
|
|
|
|
|
<result column="suggestion" property="suggestion"/> |
|
|
|
|
|
<result column="issuePublishTime" property="issuePublishTime"/> |
|
|
|
|
|
<result column="sourceId" property="sourceId"/> |
|
|
|
|
|
<result column="sourceType" property="sourceType"/> |
|
|
|
|
|
<collection property="issueImgs" ofType="java.lang.String"> |
|
|
|
|
|
<result column="url"/> |
|
|
|
|
|
</collection> |
|
|
|
|
|
</resultMap> |
|
|
<!-- 查询表决中议题列表 --> |
|
|
<!-- 查询表决中议题列表 --> |
|
|
<select id="selectVotingList" parameterType="com.epmet.dto.form.CommonIssueListFormDTO" resultType="com.epmet.dto.result.VotingIssueListResultDTO"> |
|
|
<select id="selectVotingList" parameterType="com.epmet.dto.form.CommonIssueListFormDTO" resultMap="VotingIssueListResultDTOMap"> |
|
|
SELECT |
|
|
SELECT |
|
|
ID AS issueId, |
|
|
i.ID AS issueId, |
|
|
IFNULL(ISSUE_TITLE,'') AS issueTitle, |
|
|
IFNULL(i.ISSUE_TITLE,'') AS issueTitle, |
|
|
IFNULL(SUGGESTION,'')AS suggestion, |
|
|
IFNULL(i.SUGGESTION,'')AS suggestion, |
|
|
UNIX_TIMESTAMP( created_time ) AS issuePublishTime, |
|
|
UNIX_TIMESTAMP( i.created_time ) AS issuePublishTime, |
|
|
SOURCE_ID AS sourceId |
|
|
i.SOURCE_ID AS sourceId, |
|
|
|
|
|
i.SOURCE_TYPE as sourceType, |
|
|
|
|
|
ia.url |
|
|
FROM |
|
|
FROM |
|
|
issue |
|
|
issue i |
|
|
|
|
|
left join issue_attachment ia |
|
|
|
|
|
on(i.id=ia.BUSINESS_ID) |
|
|
WHERE |
|
|
WHERE |
|
|
DEL_FLAG = '0' |
|
|
i.DEL_FLAG = '0' |
|
|
AND GRID_ID = #{gridId} |
|
|
AND i.GRID_ID = #{gridId} |
|
|
AND ISSUE_STATUS = 'voting' |
|
|
AND i.ISSUE_STATUS = 'voting' |
|
|
ORDER BY |
|
|
ORDER BY |
|
|
created_time DESC |
|
|
i.created_time DESC,ia.SORT asc |
|
|
</select> |
|
|
</select> |
|
|
|
|
|
|
|
|
<!-- 查询已关闭议题列表 --> |
|
|
<!-- 查询已关闭议题列表 --> |
|
|