Commit 1942954b authored by xuxinpc's avatar xuxinpc

收藏夹相关接口 修改传参方式

parent e28febaf
......@@ -80,7 +80,8 @@ public class TempController {
ResultDto resultDto = new ResultDto();
try {
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);
} catch (ClientRequestException e) {
dealClientRequestException(resultDto, e);
......
......@@ -24,7 +24,6 @@ public class ShopRepositoryCustomImpl implements ShopRepositoryCustom {
Update update = new Update();
update.addToSet("favoritesUrls", favoriteUrl);
UpdateResult result = mongoTemplate.updateFirst(basicQuery, update, Shop.class);
return result.getModifiedCount() >= 1;
}
......
......@@ -692,8 +692,6 @@ public class ShopServiceImpl implements ShopService {
@Override
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);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment