Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gs1-office-web-sit
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
吴迪
gs1-office-web-sit
Commits
210c56d9
Commit
210c56d9
authored
Dec 15, 2021
by
rongkailun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【修改】修改图片资讯bug
parent
e391e734
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
19 deletions
+19
-19
NewsParams.java
.../java/io/office/modules/manage/entity/dto/NewsParams.java
+2
-0
PictureServiceImpl.java
...ffice/modules/manage/service/impl/PictureServiceImpl.java
+5
-0
PictureDao.xml
src/main/resources/mapper/manage/PictureDao.xml
+12
-19
No files found.
src/main/java/io/office/modules/manage/entity/dto/NewsParams.java
View file @
210c56d9
...
...
@@ -32,4 +32,6 @@ public class NewsParams extends PageParams {
private
Integer
classId
;
private
String
type
;
private
List
list
;
}
src/main/java/io/office/modules/manage/service/impl/PictureServiceImpl.java
View file @
210c56d9
...
...
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import
io.office.common.utils.PageUtils
;
import
io.office.common.utils.Query
;
import
io.office.common.utils.R
;
import
io.office.modules.manage.dao.NewsDao
;
import
io.office.modules.manage.dao.PictureDao
;
import
io.office.modules.manage.entity.NewsEntity
;
import
io.office.modules.manage.entity.PictureEntity
;
...
...
@@ -108,8 +109,12 @@ public class PictureServiceImpl extends ServiceImpl<PictureDao, PictureEntity> i
return
page
;
}
@Autowired
NewsDao
newsDao
;
@Override
public
Page
<
PictureEntity
>
selectPictureNewList
(
NewsParams
params
,
Page
page
)
{
List
<
PictureEntity
>
list
=
this
.
newsDao
.
pictureTop4
();
params
.
setList
(
list
);
List
<
PictureEntity
>
newsList
=
this
.
pictureDao
.
selectPictureNewList
(
params
,
page
);
page
.
setRecords
(
newsList
);
return
page
;
...
...
src/main/resources/mapper/manage/PictureDao.xml
View file @
210c56d9
...
...
@@ -68,25 +68,17 @@
ORDER BY
pictureID DESC
</select>
<select
id=
"selectPictureNewList"
resultMap=
"pictureMap"
parameterType=
"io.office.modules.manage.entity.dto.PictureParams"
>
SELECT
*
FROM
picture
WHERE
status = 1
AND PicLevel > 0
AND pictureid NOT IN (
SELECT
TOP 4 pictureid
FROM
picture
ORDER BY
PicLevel DESC,
pictureid DESC
)
ORDER BY
PicLevel DESC,
<select
id=
"selectPictureNewList"
resultMap=
"pictureMap"
parameterType=
"io.office.modules.manage.entity.dto.NewsParams"
>
SELECT *
FROM picture
WHERE status = 1
AND PicLevel > 0
AND pictureid NOT IN
<foreach
collection=
"params.list"
index=
"index"
item=
"item"
open=
"("
separator=
","
close=
")"
>
#{item.pictureid}
</foreach>
ORDER BY PicLevel DESC,
pictureid DESC
</select>
</mapper>
\ No newline at end of file
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