package com.yolo.keyboard.dal.mysql.warningmessage;

import java.util.*;

import com.yolo.keyboard.framework.common.pojo.PageResult;
import com.yolo.keyboard.framework.mybatis.core.query.LambdaQueryWrapperX;
import com.yolo.keyboard.framework.mybatis.core.mapper.BaseMapperX;
import com.yolo.keyboard.dal.dataobject.warningmessage.KeyboardWarningMessageDO;
import org.apache.ibatis.annotations.Mapper;
import com.yolo.keyboard.controller.admin.warningmessage.vo.*;

/**
 * 用户注销提示信息 Mapper
 *
 * @author ziin
 */
@Mapper
public interface KeyboardWarningMessageMapper extends BaseMapperX<KeyboardWarningMessageDO> {

    default PageResult<KeyboardWarningMessageDO> selectPage(KeyboardWarningMessagePageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<KeyboardWarningMessageDO>()
                .eqIfPresent(KeyboardWarningMessageDO::getLocale, reqVO.getLocale())
                .eqIfPresent(KeyboardWarningMessageDO::getContent, reqVO.getContent())
                .eqIfPresent(KeyboardWarningMessageDO::getUpdatedAt, reqVO.getUpdatedAt())
                .eqIfPresent(KeyboardWarningMessageDO::getCreated, reqVO.getCreated())
                .orderByDesc(KeyboardWarningMessageDO::getId));
    }

}