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
bdc0bbcb
Commit
bdc0bbcb
authored
Sep 11, 2023
by
shiyu
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/quanku_0914' into quanku_0914
parents
26d699b1
873b5665
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
3 deletions
+13
-3
ch-dao/src/main/java/com/wwdz/ch/db/impl/FavoritesItemsRelationDaoImpl.java
...va/com/wwdz/ch/db/impl/FavoritesItemsRelationDaoImpl.java
+2
-3
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/ItemServiceImpl.java
...pi/src/main/java/com/wwdz/ch/wx/impl/ItemServiceImpl.java
+11
-0
No files found.
ch-dao/src/main/java/com/wwdz/ch/db/impl/FavoritesItemsRelationDaoImpl.java
View file @
bdc0bbcb
...
...
@@ -62,7 +62,6 @@ public class FavoritesItemsRelationDaoImpl implements FavoritesItemsRelationDao
FavoritesItemsRelationExample
.
Criteria
criteria
=
example
.
createCriteria
();
JdbcHelper
.
ifPresent
(
favoritesId
,
criteria:
:
andFavoritesIdEqualTo
);
JdbcHelper
.
ifPresent
(
favoritesIds
,
criteria:
:
andFavoritesIdIn
);
example
.
orderBy
(
"add_time desc"
);
return
favoritesItemsRelationMapper
.
selectByExample
(
example
);
}
...
...
@@ -80,7 +79,7 @@ public class FavoritesItemsRelationDaoImpl implements FavoritesItemsRelationDao
FavoritesItemsRelationExample
example
=
new
FavoritesItemsRelationExample
();
FavoritesItemsRelationExample
.
Criteria
criteria
=
example
.
createCriteria
();
criteria
.
andFavoritesIdEqualTo
(
favoritesId
);
example
.
orderBy
(
"
add
_time desc"
);
example
.
orderBy
(
"
update
_time desc"
);
PageHelper
.
startPage
(
page
,
size
);
List
<
FavoritesItemsRelation
>
list
=
favoritesItemsRelationMapper
.
selectByExample
(
example
);
return
new
PageInfo
<>(
list
);
...
...
@@ -94,7 +93,7 @@ public class FavoritesItemsRelationDaoImpl implements FavoritesItemsRelationDao
if
(
type
==
1
)
{
criteria
.
andFavoritesIdEqualTo
(
0L
);
}
example
.
orderBy
(
"
add
_time desc"
);
example
.
orderBy
(
"
update
_time desc"
);
PageHelper
.
startPage
(
page
,
size
);
List
<
FavoritesItemsRelation
>
list
=
favoritesItemsRelationMapper
.
selectByExample
(
example
);
return
new
PageInfo
<>(
list
);
...
...
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/ItemServiceImpl.java
View file @
bdc0bbcb
...
...
@@ -463,6 +463,17 @@ public class ItemServiceImpl implements ItemService {
public
Result
del
(
ItemRequestDto
dto
)
{
try
{
itemDao
.
deleteById
(
dto
.
getId
());
UserItemsRelation
userItemsRelation
=
userItemsRelationDao
.
find
(
dto
.
getId
());
if
(
Objects
.
nonNull
(
userItemsRelation
))
{
FavoritesItemsRelation
favoritesItemsRelation
=
favoritesItemsRelationDao
.
selectByUserIdItemId
(
userItemsRelation
.
getUserId
(),
dto
.
getId
());
if
(
Objects
.
nonNull
(
favoritesItemsRelation
))
{
Long
favoritesId
=
favoritesItemsRelation
.
getFavoritesId
();
favoritesItemsRelationDao
.
deleteByUserIdItemId
(
userItemsRelation
.
getUserId
(),
dto
.
getId
());
// 更新收藏册
favoritesDao
.
updateTime
(
favoritesId
,
null
);
}
}
logger
.
info
(
"【请求结束】藏品删除成功"
);
return
Result
.
success
();
}
catch
(
Exception
e
)
{
...
...
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