package cd.casic.module.machine.dal.mysql;

import cd.casic.framework.commons.pojo.PageResult;
import cd.casic.framework.mybatis.core.mapper.BaseMapperX;
import cd.casic.framework.mybatis.core.query.LambdaQueryWrapperX;
import cd.casic.module.machine.controller.vo.SecretKeyVO;
import cd.casic.module.machine.dal.dataobject.SecretKeyDO;
import org.apache.ibatis.annotations.Mapper;

@Mapper
public interface SecretKeyMapper extends BaseMapperX<SecretKeyDO> {
    //查询列表
    default PageResult<SecretKeyDO> selectPage(SecretKeyVO secretKeyVO) {
        return selectPage(secretKeyVO, new LambdaQueryWrapperX<SecretKeyDO>()
            .likeIfPresent(SecretKeyDO::getName, secretKeyVO.getName())
            .likeIfPresent(SecretKeyDO::getDescription, secretKeyVO.getDescription()));
    }
}
