Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
B
browser-backend
Project
Project
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
Administrator
browser-backend
Commits
8b847be9
Commit
8b847be9
authored
Sep 19, 2020
by
xuxinpc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
收藏夹相关接口 修改传参
parent
1942954b
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
TempController.java
...gec/browserbackend/browser/controller/TempController.java
+1
-1
ShopRepositoryCustomImpl.java
...rbackend/browser/repository/ShopRepositoryCustomImpl.java
+1
-1
No files found.
src/main/java/com/edgec/browserbackend/browser/controller/TempController.java
View file @
8b847be9
...
@@ -63,7 +63,7 @@ public class TempController {
...
@@ -63,7 +63,7 @@ public class TempController {
public
ResultDto
deleteFavoritesByShopId
(
@RequestBody
FavoriteUrlDto
favoriteUrlDto
)
{
public
ResultDto
deleteFavoritesByShopId
(
@RequestBody
FavoriteUrlDto
favoriteUrlDto
)
{
ResultDto
resultDto
=
new
ResultDto
();
ResultDto
resultDto
=
new
ResultDto
();
try
{
try
{
FavoriteUrl
favoriteUrl
=
new
FavoriteUrl
(
favoriteUrlDto
.
getTitle
()
,
favoriteUrlDto
.
getUrl
());
FavoriteUrl
favoriteUrl
=
new
FavoriteUrl
(
""
,
favoriteUrlDto
.
getUrl
());
resultDto
.
setData
(
shopService
.
deleteFavoritesByShopId
(
favoriteUrlDto
.
getShopId
(),
favoriteUrl
));
resultDto
.
setData
(
shopService
.
deleteFavoritesByShopId
(
favoriteUrlDto
.
getShopId
(),
favoriteUrl
));
resultDto
.
setStatus
(
0
);
resultDto
.
setStatus
(
0
);
}
catch
(
ClientRequestException
e
)
{
}
catch
(
ClientRequestException
e
)
{
...
...
src/main/java/com/edgec/browserbackend/browser/repository/ShopRepositoryCustomImpl.java
View file @
8b847be9
...
@@ -33,7 +33,7 @@ public class ShopRepositoryCustomImpl implements ShopRepositoryCustom {
...
@@ -33,7 +33,7 @@ public class ShopRepositoryCustomImpl implements ShopRepositoryCustom {
BasicQuery
basicQuery
=
new
BasicQuery
(
doc
);
BasicQuery
basicQuery
=
new
BasicQuery
(
doc
);
basicQuery
.
addCriteria
(
where
(
"_id"
).
is
(
shopId
));
basicQuery
.
addCriteria
(
where
(
"_id"
).
is
(
shopId
));
Update
update
=
new
Update
();
Update
update
=
new
Update
();
update
.
pull
(
"favoritesUrls
"
,
favoriteUrl
);
update
.
pull
(
"favoritesUrls
.url"
,
favoriteUrl
.
getUrl
()
);
UpdateResult
result
=
mongoTemplate
.
updateFirst
(
basicQuery
,
update
,
Shop
.
class
);
UpdateResult
result
=
mongoTemplate
.
updateFirst
(
basicQuery
,
update
,
Shop
.
class
);
return
result
.
getModifiedCount
()
>=
1
;
return
result
.
getModifiedCount
()
>=
1
;
}
}
...
...
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