Showing
1 changed file
with
3 additions
and
0 deletions
@@ -102,6 +102,9 @@ public class FavoriteServiceImpl implements IFavoriteService { | @@ -102,6 +102,9 @@ public class FavoriteServiceImpl implements IFavoriteService { | ||
102 | * 查询某用户是否已收藏某商品 (如果存在则将失效时间延期) | 102 | * 查询某用户是否已收藏某商品 (如果存在则将失效时间延期) |
103 | */ | 103 | */ |
104 | public boolean isFavorite(FavoriteRequestVO vo){ | 104 | public boolean isFavorite(FavoriteRequestVO vo){ |
105 | + if (vo.getUid() == null || 0 == vo.getUid()) { // | ||
106 | + return false; | ||
107 | + } | ||
105 | try { | 108 | try { |
106 | boolean existFlag = cacheService.isExistUserProductFavoriteByProductId(vo.getUid(), vo.getProductId(),false); | 109 | boolean existFlag = cacheService.isExistUserProductFavoriteByProductId(vo.getUid(), vo.getProductId(),false); |
107 | if (existFlag) { | 110 | if (existFlag) { |
-
Please register or login to post a comment