Commit f7e28022 by Administrator

Merge branch 'fixbug/OneToManyToRepeat' into 'master'

bug: [none] 一对多去重复

See merge request rays/pcloud-book!891
parents 9b8d611f da0b9ac3
......@@ -103,7 +103,7 @@
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateNewsShowState" parameterType="com.pcloud.book.applet.entity.AppletNews">
update applet_news
set show_state = #{showState,jdbcType=BOOLEAN},
......@@ -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