package com.iailab.module.system.dal.mysql.tenant; 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.system.controller.admin.tenant.vo.packages.TenantPackagePageReqVO; import com.iailab.module.system.dal.dataobject.tenant.TenantPackageDO; import org.apache.ibatis.annotations.Mapper; import java.util.List; /** * 租户套餐 Mapper * * @author iailab */ @Mapper public interface TenantPackageMapper extends BaseMapperX { default PageResult selectPage(TenantPackagePageReqVO reqVO) { return selectPage(reqVO, new LambdaQueryWrapperX() .likeIfPresent(TenantPackageDO::getName, reqVO.getName()) .eqIfPresent(TenantPackageDO::getStatus, reqVO.getStatus()) .likeIfPresent(TenantPackageDO::getRemark, reqVO.getRemark()) .betweenIfPresent(TenantPackageDO::getCreateTime, reqVO.getCreateTime()) .orderByDesc(TenantPackageDO::getId)); } default List selectListByStatus(Integer status) { return selectList(TenantPackageDO::getStatus, status); } default TenantPackageDO selectByName(String name) { return selectOne(TenantPackageDO::getName, name); } }