Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
midjourney-proxy
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
徐少华
midjourney-proxy
Commits
f7e28022
Commit
f7e28022
authored
Aug 14, 2020
by
Administrator
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'fixbug/OneToManyToRepeat' into 'master'
bug: [none] 一对多去重复 See merge request rays/pcloud-book!891
parents
9b8d611f
da0b9ac3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
3 deletions
+9
-3
AppletNews.xml
...vice-book/src/main/resources/mapper/applet/AppletNews.xml
+9
-3
No files found.
pcloud-service-book/src/main/resources/mapper/applet/AppletNews.xml
View file @
f7e28022
...
@@ -103,7 +103,7 @@
...
@@ -103,7 +103,7 @@
</set>
</set>
where id = #{id,jdbcType=BIGINT}
where id = #{id,jdbcType=BIGINT}
</update>
</update>
<update
id=
"updateNewsShowState"
parameterType=
"com.pcloud.book.applet.entity.AppletNews"
>
<update
id=
"updateNewsShowState"
parameterType=
"com.pcloud.book.applet.entity.AppletNews"
>
update applet_news
update applet_news
set show_state = #{showState,jdbcType=BOOLEAN},
set show_state = #{showState,jdbcType=BOOLEAN},
...
@@ -305,6 +305,7 @@
...
@@ -305,6 +305,7 @@
AND rights_type = #{rightsType}
AND rights_type = #{rightsType}
</if>
</if>
)
)
group by n.id
ORDER BY n.update_time DESC
ORDER BY n.update_time DESC
</select>
</select>
...
@@ -331,6 +332,7 @@
...
@@ -331,6 +332,7 @@
<if
test=
"rightsClassifyId!=null"
>
<if
test=
"rightsClassifyId!=null"
>
AND news.rights_classify_id =#{rightsClassifyId}
AND news.rights_classify_id =#{rightsClassifyId}
</if>
</if>
group by n.id
ORDER BY
ORDER BY
news.update_time DESC
news.update_time DESC
LIMIT #{top}
LIMIT #{top}
...
@@ -424,7 +426,7 @@
...
@@ -424,7 +426,7 @@
</select>
</select>
<select
id=
"listAppletNews4Analysis"
parameterType=
"map"
resultType=
"com.pcloud.book.applet.dto.AppletNewsDTO"
>
<select
id=
"listAppletNews4Analysis"
parameterType=
"map"
resultType=
"com.pcloud.book.applet.dto.AppletNewsDTO"
>
SELECT DISTIN
CT
SELE
CT
n.id,
n.id,
n.news_name newsName,
n.news_name newsName,
n.source,
n.source,
...
@@ -481,6 +483,7 @@
...
@@ -481,6 +483,7 @@
<if
test=
"source!=null"
>
<if
test=
"source!=null"
>
AND n.source =#{source}
AND n.source =#{source}
</if>
</if>
group by n.id
ORDER BY n.update_time DESC
ORDER BY n.update_time DESC
</select>
</select>
...
@@ -567,9 +570,11 @@
...
@@ -567,9 +570,11 @@
</if>
</if>
<choose>
<choose>
<when
test=
"order>0 and order == 1"
>
<when
test=
"order>0 and order == 1"
>
group by n.id
ORDER BY RAND()
ORDER BY RAND()
</when>
</when>
<otherwise>
<otherwise>
group by n.id
ORDER BY n.update_time DESC
ORDER BY n.update_time DESC
</otherwise>
</otherwise>
</choose>
</choose>
...
@@ -633,7 +638,7 @@
...
@@ -633,7 +638,7 @@
</select>
</select>
<select
id=
"getPageByNewsByTempletLabel"
parameterType=
"map"
resultType=
"com.pcloud.book.applet.dto.AppletNewsDTO"
>
<select
id=
"getPageByNewsByTempletLabel"
parameterType=
"map"
resultType=
"com.pcloud.book.applet.dto.AppletNewsDTO"
>
SELECT
DISTINCT
SELECT
n.id,
n.id,
n.news_name newsName,
n.news_name newsName,
n.source,
n.source,
...
@@ -681,6 +686,7 @@
...
@@ -681,6 +686,7 @@
AND rights_type = #{rightsType}
AND rights_type = #{rightsType}
</if>
</if>
)
)
group by n.id
ORDER BY n.update_time DESC
ORDER BY n.update_time DESC
</select>
</select>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment