Commit da0b9ac3 by pansy

一对多去重复

parent 9b8d611f
......@@ -305,6 +305,7 @@
AND rights_type = #{rightsType}
</if>
)
group by n.id
ORDER BY n.update_time DESC
</select>
......@@ -331,6 +332,7 @@
<if test="rightsClassifyId!=null">
AND news.rights_classify_id =#{rightsClassifyId}
</if>
group by n.id
ORDER BY
news.update_time DESC
LIMIT #{top}
......@@ -424,7 +426,7 @@
</select>
<select id="listAppletNews4Analysis" parameterType="map" resultType="com.pcloud.book.applet.dto.AppletNewsDTO">
SELECT DISTINCT
SELECT
n.id,
n.news_name newsName,
n.source,
......@@ -481,6 +483,7 @@
<if test="source!=null">
AND n.source =#{source}
</if>
group by n.id
ORDER BY n.update_time DESC
</select>
......@@ -567,9 +570,11 @@
</if>
<choose>
<when test="order>0 and order == 1">
group by n.id
ORDER BY RAND()
</when>
<otherwise>
group by n.id
ORDER BY n.update_time DESC
</otherwise>
</choose>
......@@ -633,7 +638,7 @@
</select>
<select id="getPageByNewsByTempletLabel" parameterType="map" resultType="com.pcloud.book.applet.dto.AppletNewsDTO">
SELECT DISTINCT
SELECT
n.id,
n.news_name newsName,
n.source,
......@@ -681,6 +686,7 @@
AND rights_type = #{rightsType}
</if>
)
group by n.id
ORDER BY n.update_time DESC
</select>
......
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