package cn.iocoder.yudao.module.tkdata.dal.mysql.comment;

import java.util.*;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.tkdata.controller.admin.configController.vo.CommentPageReqVO;
import cn.iocoder.yudao.module.tkdata.dal.dataobject.comment.CommentDO;
import org.apache.ibatis.annotations.Mapper;

/**
 * AI 评论内容
 Mapper
 *
 * @author 总后台
 */
@Mapper
public interface CommentMapper extends BaseMapperX<CommentDO> {

    default PageResult<CommentDO> selectPage(CommentPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<CommentDO>()
                .eqIfPresent(CommentDO::getContent, reqVO.getContent())
                .orderByDesc(CommentDO::getId));
    }

}