Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Q
qk_backend
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
quanku
qk_backend
Commits
7f1969c3
Commit
7f1969c3
authored
Sep 21, 2023
by
muhong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改 我发布的
parent
e4952686
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletion
+8
-1
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/ItemServiceImpl.java
...pi/src/main/java/com/wwdz/ch/wx/impl/ItemServiceImpl.java
+8
-1
No files found.
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/ItemServiceImpl.java
View file @
7f1969c3
...
@@ -213,6 +213,7 @@ public class ItemServiceImpl implements ItemService {
...
@@ -213,6 +213,7 @@ public class ItemServiceImpl implements ItemService {
nickname
=
user
.
getNickname
();
nickname
=
user
.
getNickname
();
avatar
=
user
.
getAvatar
();
avatar
=
user
.
getAvatar
();
}
}
boolean
isGuest
=
dto
.
getUserId
().
equals
(
userId
);
if
(!
officialUserIds
.
contains
(
dto
.
getUserId
()))
{
if
(!
officialUserIds
.
contains
(
dto
.
getUserId
()))
{
// 查询用户和藏品关联表
// 查询用户和藏品关联表
List
<
UserItemsRelation
>
userItemsRelations
=
userItemsRelationDao
.
listByUserIds
(
dto
.
getUserId
(),
null
);
List
<
UserItemsRelation
>
userItemsRelations
=
userItemsRelationDao
.
listByUserIds
(
dto
.
getUserId
(),
null
);
...
@@ -225,7 +226,7 @@ public class ItemServiceImpl implements ItemService {
...
@@ -225,7 +226,7 @@ public class ItemServiceImpl implements ItemService {
coinRequestDto
.
setPage
(
dto
.
getPage
());
coinRequestDto
.
setPage
(
dto
.
getPage
());
coinRequestDto
.
setLimit
(
dto
.
getSize
());
coinRequestDto
.
setLimit
(
dto
.
getSize
());
coinRequestDto
.
setIds
(
itemIds
);
coinRequestDto
.
setIds
(
itemIds
);
coinRequestDto
.
setIsGuest
(
!
dto
.
getUserId
().
equals
(
userId
)
);
coinRequestDto
.
setIsGuest
(
isGuest
);
coinRequestDto
.
setViewPermission
(
dto
.
getViewPermission
());
coinRequestDto
.
setViewPermission
(
dto
.
getViewPermission
());
// 分页查询
// 分页查询
PageInfo
<
Item
>
pageInfo
=
itemDao
.
findPageNotDeleted
(
coinRequestDto
);
PageInfo
<
Item
>
pageInfo
=
itemDao
.
findPageNotDeleted
(
coinRequestDto
);
...
@@ -250,6 +251,9 @@ public class ItemServiceImpl implements ItemService {
...
@@ -250,6 +251,9 @@ public class ItemServiceImpl implements ItemService {
// 设置是否收藏和是否是自己发布的
// 设置是否收藏和是否是自己发布的
vo
.
setIsCollected
(
0
);
vo
.
setIsCollected
(
0
);
vo
.
setIsMine
(
1
);
vo
.
setIsMine
(
1
);
if
(
isGuest
)
{
vo
.
setIsMine
(
0
);
}
vo
.
setIsCollected
(
favoritesItemsRelationDao
.
isCollected
(
dto
.
getUserId
(),
item
.
getId
(),
null
)
?
1
:
0
);
vo
.
setIsCollected
(
favoritesItemsRelationDao
.
isCollected
(
dto
.
getUserId
(),
item
.
getId
(),
null
)
?
1
:
0
);
// 设置收藏数
// 设置收藏数
long
count
=
favoritesItemsRelationDao
.
countByItemId
(
item
.
getId
());
long
count
=
favoritesItemsRelationDao
.
countByItemId
(
item
.
getId
());
...
@@ -298,6 +302,9 @@ public class ItemServiceImpl implements ItemService {
...
@@ -298,6 +302,9 @@ public class ItemServiceImpl implements ItemService {
vo
.
setHomePageImage
(
MediaUtil
.
getHomePageImage
(
es
.
getImages
(),
es
.
getVideos
()));
vo
.
setHomePageImage
(
MediaUtil
.
getHomePageImage
(
es
.
getImages
(),
es
.
getVideos
()));
// 设置是否收藏和是否是自己发布的
// 设置是否收藏和是否是自己发布的
vo
.
setIsMine
(
1
);
vo
.
setIsMine
(
1
);
if
(
isGuest
)
{
vo
.
setIsMine
(
0
);
}
vo
.
setIsCollected
(
favoritesItemsRelationDao
.
isCollected
(
dto
.
getUserId
(),
es
.
getId
(),
null
)
?
1
:
0
);
vo
.
setIsCollected
(
favoritesItemsRelationDao
.
isCollected
(
dto
.
getUserId
(),
es
.
getId
(),
null
)
?
1
:
0
);
// 设置收藏数
// 设置收藏数
long
count
=
favoritesItemsRelationDao
.
countByItemId
(
es
.
getId
());
long
count
=
favoritesItemsRelationDao
.
countByItemId
(
es
.
getId
());
...
...
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