diff --git a/mcwl-communityCenter/src/main/java/com/mcwl/communityCenter/mapper/QuestionCommentMapper.java b/mcwl-communityCenter/src/main/java/com/mcwl/communityCenter/mapper/QuestionCommentMapper.java index a09803d..d149957 100644 --- a/mcwl-communityCenter/src/main/java/com/mcwl/communityCenter/mapper/QuestionCommentMapper.java +++ b/mcwl-communityCenter/src/main/java/com/mcwl/communityCenter/mapper/QuestionCommentMapper.java @@ -22,4 +22,8 @@ public interface QuestionCommentMapper extends BaseMapper { Long communityId, @Param("questionId") Long questionId); + + + @InterceptorIgnore(tenantLine = "true") + QuestionComment selectByIdAndTenantIdAndCommunityIdAndQuestionIdAndCommentId(Long commentId, Long tenantId, Long communityId, Long questionId); } diff --git a/mcwl-communityCenter/src/main/java/com/mcwl/communityCenter/service/impl/QuestionCommentServiceImpl.java b/mcwl-communityCenter/src/main/java/com/mcwl/communityCenter/service/impl/QuestionCommentServiceImpl.java index 0800345..6214d05 100644 --- a/mcwl-communityCenter/src/main/java/com/mcwl/communityCenter/service/impl/QuestionCommentServiceImpl.java +++ b/mcwl-communityCenter/src/main/java/com/mcwl/communityCenter/service/impl/QuestionCommentServiceImpl.java @@ -92,8 +92,7 @@ public class QuestionCommentServiceImpl extends ServiceImpl impl imagePageRes.setOrderByColumn("create_time"); } // 设置排序 - OrderItem orderItem = OrderItem.desc(imagePageRes.getOrderByColumn()); - page.addOrder(orderItem); + List orderItemList = new ArrayList<>(); + orderItemList.add(OrderItem.desc("is_top")); + orderItemList.add(OrderItem.desc(imagePageRes.getOrderByColumn())); + page.addOrder(orderItemList); LambdaQueryWrapper lqw = new LambdaQueryWrapper<>(); - lqw.eq(imagePageRes.getStatus() != null, ModelProduct::getAuditStatus, imagePageRes.getStatus()) + lqw.eq(imagePageRes.getStatus() != null && imagePageRes.getStatus() != 0, ModelProduct::getAuditStatus, imagePageRes.getStatus()) .eq( ModelProduct::getUserId, SecurityUtils.getUserId()) .ge(imagePageRes.getStartTime() != null, ModelProduct::getCreateTime, imagePageRes.getStartTime()) .le(imagePageRes.getEndTime() != null, ModelProduct::getCreateTime, imagePageRes.getEndTime()); - postMapper.selectPage(page, lqw); // 获取分页数据 List modelImageList = page.getRecords();