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
fe799ad1
Commit
fe799ad1
authored
Apr 11, 2024
by
shiyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
藏品详情点击关注
parent
293c75ad
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
6 deletions
+15
-6
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/distribution/SupplierItemServiceImpl.java
...wwdz/ch/wx/impl/distribution/SupplierItemServiceImpl.java
+15
-6
No files found.
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/distribution/SupplierItemServiceImpl.java
View file @
fe799ad1
...
...
@@ -646,7 +646,7 @@ public class SupplierItemServiceImpl implements SupplierItemService {
public
Result
findCollectionItemDetail
(
SupplierItemRequestDto
dto
)
{
try
{
SupplierItemVo
supplierItemVo
=
new
SupplierItemVo
();
long
u
serId
=
dto
.
getUserId
();
long
targetU
serId
=
dto
.
getUserId
();
Long
itemId
=
null
;
CollectionShareRecord
collectionShareRecord
=
new
CollectionShareRecord
();
if
(
StringUtils
.
isEmpty
(
dto
.
getShareRecordId
()))
{
...
...
@@ -654,13 +654,22 @@ public class SupplierItemServiceImpl implements SupplierItemService {
}
else
{
collectionShareRecord
=
collectionShareRecordDao
.
findById
(
dto
.
getShareRecordId
());
itemId
=
collectionShareRecord
.
getShareTargetId
();
if
(
collectionShareRecord
.
getItemUserId
().
longValue
()
!=
dto
.
getUserId
().
longValue
())
{
//客态进入别人的藏馆,自动关注
FollowFansRecordRequestDto
followFansRecordRequestDto
=
new
FollowFansRecordRequestDto
();
followFansRecordRequestDto
.
setFollowerId
(
collectionShareRecord
.
getItemUserId
());
followFansRecordRequestDto
.
setFansId
(
dto
.
getUserId
());
followFansRecordRequestDto
.
setIntroducerId
(
collectionShareRecord
.
getSharerId
());
followFansRecordService
.
follow
(
followFansRecordRequestDto
);
logger
.
info
(
"通过藏品详情分享点击,用户id:{} 关注了 用户id为 {}, 介绍人为"
,
dto
.
getUserId
(),
collectionShareRecord
.
getItemUserId
(),
collectionShareRecord
.
getSharerId
());
}
}
supplierItemVo
.
setIsCollected
(
true
);
SupplierItem
supplierItem
=
supplierItemDao
.
findById
(
itemId
);
if
(
supplierItem
.
getCreatorId
().
longValue
()
!=
u
serId
)
{
if
(
supplierItem
.
getCreatorId
().
longValue
()
!=
targetU
serId
)
{
supplierItemVo
.
setIsMine
(
false
);
u
serId
=
supplierItem
.
getCreatorId
();
boolean
isCollected
=
itemCollectedRecordDao
.
isExisted
(
itemId
,
u
serId
);
targetU
serId
=
supplierItem
.
getCreatorId
();
boolean
isCollected
=
itemCollectedRecordDao
.
isExisted
(
itemId
,
targetU
serId
);
if
(
isCollected
)
{
supplierItemVo
.
setIsCollected
(
true
);
}
else
{
...
...
@@ -669,7 +678,7 @@ public class SupplierItemServiceImpl implements SupplierItemService {
if
(
supplierItem
.
getIsDeleted
())
{
//判断是否有相关收藏记录,有则删除
if
(
isCollected
)
{
itemCollectedRecordDao
.
cancel
(
itemId
,
u
serId
);
itemCollectedRecordDao
.
cancel
(
itemId
,
targetU
serId
);
}
return
Result
.
failed
(
"该藏品已删除"
);
}
...
...
@@ -721,7 +730,7 @@ public class SupplierItemServiceImpl implements SupplierItemService {
//用户自定义排序
//查询标签排序记录
List
<
Map
<
String
,
Object
>>
list
=
new
ArrayList
<>();
CollectionBookSort
collectionBookSort
=
collectionBookSortDao
.
find
(
u
serId
);
CollectionBookSort
collectionBookSort
=
collectionBookSortDao
.
find
(
targetU
serId
);
if
(
collectionBookSort
==
null
)
{
supplierItemVo
.
setBookIdList
(
collectionBookList
);
}
else
{
...
...
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