|
@@ -116,12 +116,12 @@
|
|
</delete>
|
|
</delete>
|
|
|
|
|
|
<select id="selectNoticeListApp" parameterType="SysNotice" resultMap="SysNoticeResult">
|
|
<select id="selectNoticeListApp" parameterType="SysNotice" resultMap="SysNoticeResult">
|
|
- <include refid="selectNoticeVo"/>
|
|
|
|
- where status = 0
|
|
|
|
- ORDER BY
|
|
|
|
- is_top desc,release_time desc
|
|
|
|
- <if test="limit != null and limit != ''">
|
|
|
|
- limit #{limit}
|
|
|
|
- </if>
|
|
|
|
|
|
+ SELECT r1.*
|
|
|
|
+ FROM sys_notice r1
|
|
|
|
+ INNER JOIN (
|
|
|
|
+ SELECT is_top, MAX(create_time) as latest
|
|
|
|
+ FROM sys_notice
|
|
|
|
+ GROUP BY is_top
|
|
|
|
+ ) r2 ON r1.is_top = r2.is_top AND r1.create_time = r2.latest;
|
|
</select>
|
|
</select>
|
|
</mapper>
|
|
</mapper>
|