提交 d09eb45b authored 作者: zgy's avatar zgy

优化点赞标识

上级 5ab04e81
......@@ -93,10 +93,10 @@ public class ShopifyController {
*/
@ApiOperation(value = "查询商品评论")
@GetMapping("/querylastcomment")
public Result queryLastComment(@ApiParam("商品ID") @RequestParam("itemId") String itemId,
@ApiParam("商品ID") @RequestParam("userId") String userId) {
public Result queryLastComment(@ApiParam("商品ID") @RequestParam(value = "itemId") String itemId,
@ApiParam("商品ID") @RequestParam(value = "userId", required = false) String userId) {
return tbCfItemCommentService.queryLastComment(itemId,userId);
return tbCfItemCommentService.queryLastComment(itemId, userId);
}
/**
......@@ -109,11 +109,11 @@ public class ShopifyController {
*/
@ApiOperation(value = "查看更多评论")
@GetMapping("/querycomments")
public Result queryComments(@ApiParam("商品ID") @RequestParam("itemId") String itemId,
public Result queryComments(@ApiParam("商品ID") @RequestParam(value = "itemId") String itemId,
@ApiParam(value = "页数 默认1") @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
@ApiParam(value = "每页大小 默认10") @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize,
@ApiParam("商品ID") @RequestParam("userId") String userId) {
return tbCfItemCommentService.querycomments(itemId, pageNum, pageSize,userId);
@ApiParam("商品ID") @RequestParam(value = "userId", required = false) String userId) {
return tbCfItemCommentService.querycomments(itemId, pageNum, pageSize, userId);
}
/**
......
......@@ -217,7 +217,6 @@ public class TbCfItemCommentServiceImpl implements TbCfItemCommentService {
try {
String give_like = (String) redisCache.get(KeyConstant.GIVE_LIKE + userId + itemId + commentId);
System.err.println(KeyConstant.GIVE_LIKE + userId + itemId + commentId);
TbCfItemCommentEntity comment = tbCfItemCommentDao.queryObject(commentId);
Long likeNum = comment.getLikeNum();
if (!StringUtils.isBlank(give_like) && KeyConstant.YES.equals(give_like)) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论