|
@@ -103,16 +103,19 @@ public class CommonCommentServiceImpl extends ServiceImpl<CommonCommentMapper, C
|
|
|
public List<CommonCommentVo> getFirstLevelComment(Integer sourceType, Integer sourceId, Integer pageNum, Integer pageSize, Long userId, String likeType){
|
|
public List<CommonCommentVo> getFirstLevelComment(Integer sourceType, Integer sourceId, Integer pageNum, Integer pageSize, Long userId, String likeType){
|
|
|
List<CommonCommentVo> commonComments = null;
|
|
List<CommonCommentVo> commonComments = null;
|
|
|
QueryWrapper<CommonCommentVo> commentWrapper = new QueryWrapper<CommonCommentVo>();
|
|
QueryWrapper<CommonCommentVo> commentWrapper = new QueryWrapper<CommonCommentVo>();
|
|
|
- if(sourceType == CommentSourceTypeEnum.STORE_COMMENT.getType()){
|
|
|
|
|
|
|
+/* if(sourceType == CommentSourceTypeEnum.STORE_COMMENT.getType()){
|
|
|
// 1查询店铺评价
|
|
// 1查询店铺评价
|
|
|
commentWrapper.eq("cc.source_type", CommentSourceTypeEnum.STORE_COMMENT.getType());
|
|
commentWrapper.eq("cc.source_type", CommentSourceTypeEnum.STORE_COMMENT.getType());
|
|
|
|
|
|
|
|
} else if (sourceType == CommentSourceTypeEnum.DYNAMIC_COMMENT.getType()) {
|
|
} else if (sourceType == CommentSourceTypeEnum.DYNAMIC_COMMENT.getType()) {
|
|
|
// 2查询动态评论
|
|
// 2查询动态评论
|
|
|
commentWrapper.eq("cc.source_type", CommentSourceTypeEnum.DYNAMIC_COMMENT.getType());
|
|
commentWrapper.eq("cc.source_type", CommentSourceTypeEnum.DYNAMIC_COMMENT.getType());
|
|
|
- }
|
|
|
|
|
|
|
+ } else if (sourceType == CommentSourceTypeEnum.CLOCK_IN_COMMENT.getType()) {
|
|
|
|
|
+ commentWrapper.eq("cc.source_type", CommentSourceTypeEnum.CLOCK_IN_COMMENT.getType());
|
|
|
|
|
+ }*/
|
|
|
commentWrapper.eq("cc.source_id", sourceId)
|
|
commentWrapper.eq("cc.source_id", sourceId)
|
|
|
.eq("cc.parent_id", 0)
|
|
.eq("cc.parent_id", 0)
|
|
|
|
|
+ .eq("cc.source_type",sourceType)
|
|
|
.eq("cc.delete_flag", CommonConstant.DELETE_FLAG_UNDELETE)
|
|
.eq("cc.delete_flag", CommonConstant.DELETE_FLAG_UNDELETE)
|
|
|
.orderByDesc("cc.created_time");
|
|
.orderByDesc("cc.created_time");
|
|
|
Page<CommonCommentVo> page = null;
|
|
Page<CommonCommentVo> page = null;
|