添加用户商品展示和删除接口

This commit is contained in:
xiaofeng
2019-07-09 21:43:04 +08:00
parent ef622fbf95
commit 1fa68d070b
8 changed files with 253 additions and 4 deletions

View File

@@ -30,11 +30,10 @@ public class UsersProductSpuCollectionController {
@PostMapping("/collection/{spuId}/{hasCollectionType}")
@ApiOperation("商品收藏")
// @RequiresLogin
@RequiresLogin
public CommonResult<Boolean> productSpuCollection(@PathVariable("spuId") Integer spuId,
@PathVariable("hasCollectionType") Integer hasCollectionType) {
// final Integer userId = UserSecurityContextHolder.getContext().getUserId();
return success(productSpuCollectionService.productSpuCollection(spuId, hasCollectionType,140));
final Integer userId = UserSecurityContextHolder.getContext().getUserId();
return success(productSpuCollectionService.productSpuCollection(spuId, hasCollectionType,userId));
}
}