package com.iailab.module.infra.dal.mysql.config; import com.iailab.framework.common.pojo.PageResult; import com.iailab.framework.mybatis.core.mapper.BaseMapperX; import com.iailab.framework.mybatis.core.query.LambdaQueryWrapperX; import com.iailab.module.infra.controller.admin.config.vo.ConfigPageReqVO; import com.iailab.module.infra.dal.dataobject.config.ConfigDO; import org.apache.ibatis.annotations.Mapper; @Mapper public interface ConfigMapper extends BaseMapperX { default ConfigDO selectByKey(String key) { return selectOne(ConfigDO::getConfigKey, key); } default PageResult selectPage(ConfigPageReqVO reqVO) { return selectPage(reqVO, new LambdaQueryWrapperX() .likeIfPresent(ConfigDO::getName, reqVO.getName()) .likeIfPresent(ConfigDO::getConfigKey, reqVO.getKey()) .eqIfPresent(ConfigDO::getType, reqVO.getType()) .betweenIfPresent(ConfigDO::getCreateTime, reqVO.getCreateTime())); } }