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
1942954b
Commit
1942954b
authored
Sep 19, 2020
by
xuxinpc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
收藏夹相关接口 修改传参方式
parent
e28febaf
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
2 additions
and
4 deletions
+2
-4
TempController.java
...gec/browserbackend/browser/controller/TempController.java
+2
-1
ShopRepositoryCustomImpl.java
...rbackend/browser/repository/ShopRepositoryCustomImpl.java
+0
-1
ShopServiceImpl.java
.../browserbackend/browser/service/Impl/ShopServiceImpl.java
+0
-2
No files found.
src/main/java/com/edgec/browserbackend/browser/controller/TempController.java
View file @
1942954b
...
@@ -80,7 +80,8 @@ public class TempController {
...
@@ -80,7 +80,8 @@ public class TempController {
ResultDto
resultDto
=
new
ResultDto
();
ResultDto
resultDto
=
new
ResultDto
();
try
{
try
{
FavoriteUrl
favoriteUrl
=
new
FavoriteUrl
(
favoriteUrlDto
.
getTitle
(),
favoriteUrlDto
.
getUrl
());
FavoriteUrl
favoriteUrl
=
new
FavoriteUrl
(
favoriteUrlDto
.
getTitle
(),
favoriteUrlDto
.
getUrl
());
resultDto
.
setData
(
shopService
.
saveFavoritesByShopId
(
favoriteUrlDto
.
getShopId
(),
favoriteUrl
));
shopService
.
saveFavoritesByShopId
(
favoriteUrlDto
.
getShopId
(),
favoriteUrl
);
resultDto
.
setData
(
true
);
resultDto
.
setStatus
(
0
);
resultDto
.
setStatus
(
0
);
}
catch
(
ClientRequestException
e
)
{
}
catch
(
ClientRequestException
e
)
{
dealClientRequestException
(
resultDto
,
e
);
dealClientRequestException
(
resultDto
,
e
);
...
...
src/main/java/com/edgec/browserbackend/browser/repository/ShopRepositoryCustomImpl.java
View file @
1942954b
...
@@ -24,7 +24,6 @@ public class ShopRepositoryCustomImpl implements ShopRepositoryCustom {
...
@@ -24,7 +24,6 @@ public class ShopRepositoryCustomImpl implements ShopRepositoryCustom {
Update
update
=
new
Update
();
Update
update
=
new
Update
();
update
.
addToSet
(
"favoritesUrls"
,
favoriteUrl
);
update
.
addToSet
(
"favoritesUrls"
,
favoriteUrl
);
UpdateResult
result
=
mongoTemplate
.
updateFirst
(
basicQuery
,
update
,
Shop
.
class
);
UpdateResult
result
=
mongoTemplate
.
updateFirst
(
basicQuery
,
update
,
Shop
.
class
);
return
result
.
getModifiedCount
()
>=
1
;
return
result
.
getModifiedCount
()
>=
1
;
}
}
...
...
src/main/java/com/edgec/browserbackend/browser/service/Impl/ShopServiceImpl.java
View file @
1942954b
...
@@ -692,8 +692,6 @@ public class ShopServiceImpl implements ShopService {
...
@@ -692,8 +692,6 @@ public class ShopServiceImpl implements ShopService {
@Override
@Override
public
boolean
saveFavoritesByShopId
(
String
shopId
,
FavoriteUrl
favoriteUrl
)
{
public
boolean
saveFavoritesByShopId
(
String
shopId
,
FavoriteUrl
favoriteUrl
)
{
logger
.
info
(
"saveFavoritesByShopId param is: {},{},{}"
,
shopId
,
favoriteUrl
.
getTitle
(),
favoriteUrl
.
getUrl
());
logger
.
info
(
"saveFavoritesByShopId: {}"
,
shopRepository
.
saveFavoritesUrls
(
shopId
,
favoriteUrl
));
return
shopRepository
.
saveFavoritesUrls
(
shopId
,
favoriteUrl
);
return
shopRepository
.
saveFavoritesUrls
(
shopId
,
favoriteUrl
);
}
}
...
...
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