|
@@ -14,6 +14,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RequestParam;
|
|
import org.springframework.web.bind.annotation.RequestParam;
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* @author zzj 2021/9/17
|
|
* @author zzj 2021/9/17
|
|
*/
|
|
*/
|
|
@@ -56,11 +57,29 @@ public class UserLikeApi {
|
|
public ResponseJson<PaginationVo<ProductItemVo>> likes(Integer userID,
|
|
public ResponseJson<PaginationVo<ProductItemVo>> likes(Integer userID,
|
|
@RequestParam(value = "pageNum", defaultValue = "1") int pageNum,
|
|
@RequestParam(value = "pageNum", defaultValue = "1") int pageNum,
|
|
@RequestParam(value = "pageSize", defaultValue = "10") int pageSize) {
|
|
@RequestParam(value = "pageSize", defaultValue = "10") int pageSize) {
|
|
- if(userID==null){
|
|
|
|
|
|
+ if (userID == null) {
|
|
return ResponseJson.error("非法参数");
|
|
return ResponseJson.error("非法参数");
|
|
}
|
|
}
|
|
return userLikeService.findLikeList(userID, pageNum, pageSize);
|
|
return userLikeService.findLikeList(userID, pageNum, pageSize);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
+ * 个人中心删除收藏商品列表
|
|
|
|
+ *
|
|
|
|
+ * @param userID 用户Id
|
|
|
|
+ */
|
|
|
|
+ @ApiOperation("收藏商品列表")
|
|
|
|
+ @ApiImplicitParams({
|
|
|
|
+ @ApiImplicitParam(required = true, name = "userId", value = "用户Id"),
|
|
|
|
+ @ApiImplicitParam(required = true, name = "productIDs", value = "商品id字符串")
|
|
|
|
+ })
|
|
|
|
+ @GetMapping("/deleteList")
|
|
|
|
+ public ResponseJson<String> likes(Integer userID, String productIDs) {
|
|
|
|
+ if (userID == null || productIDs == null) {
|
|
|
|
+ return ResponseJson.error("非法参数");
|
|
|
|
+ }
|
|
|
|
+ return userLikeService.deleteList(userID, productIDs);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
|
|
}
|
|
}
|