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
e82c7bd3
Commit
e82c7bd3
authored
Sep 22, 2023
by
muhong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改 浏览量
parent
ff26d761
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
21 deletions
+33
-21
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/ItemServiceImpl.java
...pi/src/main/java/com/wwdz/ch/wx/impl/ItemServiceImpl.java
+33
-21
No files found.
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/ItemServiceImpl.java
View file @
e82c7bd3
...
...
@@ -572,6 +572,7 @@ public class ItemServiceImpl implements ItemService {
}
}
if
(
Objects
.
nonNull
(
userItemsRelation
)
&&
!
userItemsRelation
.
getUserId
().
equals
(
dto
.
getUserId
()))
{
// 添加或更新用户足迹
Footprint
footprint
=
footPrintDao
.
selectByUserIdItem
(
dto
.
getUserId
(),
item
.
getId
());
Date
now
=
new
Date
();
...
...
@@ -597,6 +598,7 @@ public class ItemServiceImpl implements ItemService {
footPrintDao
.
upateTime
(
footprint
);
}
}
}
// 设置藏品的发布用户昵称和头像
itemCommonService
.
getNicknameAvatar
(
item
.
getId
(),
itemResponseVo
);
...
...
@@ -714,6 +716,16 @@ public class ItemServiceImpl implements ItemService {
long
count
=
favoritesItemsRelationDao
.
countByItemId
(
item
.
getId
());
String
collectCount
=
StringUtil
.
formatCount
(
count
);
// 更新藏品发布者的收藏数
UserItemsRelation
userItemsRelation
=
userItemsRelationDao
.
find
(
item
.
getId
());
if
(
Objects
.
nonNull
(
userItemsRelation
))
{
UserCollectBrowseNum
userCollectBrowseNum
=
userCollectBrowseNumDao
.
findByUserId
(
userItemsRelation
.
getUserId
());
if
(
Objects
.
nonNull
(
userCollectBrowseNum
))
{
userCollectBrowseNum
.
setCollectNum
(
userCollectBrowseNum
.
getCollectNum
()
-
1
);
userCollectBrowseNumDao
.
update
(
userCollectBrowseNum
);
}
}
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"collectCount"
,
collectCount
);
return
Result
.
success
(
map
);
...
...
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