package com.iailab.module.system.dal.mysql.social; 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.socail.vo.client.SocialClientPageReqVO; import com.iailab.module.system.dal.dataobject.social.SocialClientDO; import org.apache.ibatis.annotations.Mapper; @Mapper public interface SocialClientMapper extends BaseMapperX { default SocialClientDO selectBySocialTypeAndUserType(Integer socialType, Integer userType) { return selectOne(SocialClientDO::getSocialType, socialType, SocialClientDO::getUserType, userType); } default PageResult selectPage(SocialClientPageReqVO reqVO) { return selectPage(reqVO, new LambdaQueryWrapperX() .likeIfPresent(SocialClientDO::getName, reqVO.getName()) .eqIfPresent(SocialClientDO::getSocialType, reqVO.getSocialType()) .eqIfPresent(SocialClientDO::getUserType, reqVO.getUserType()) .likeIfPresent(SocialClientDO::getClientId, reqVO.getClientId()) .eqIfPresent(SocialClientDO::getStatus, reqVO.getStatus()) .orderByDesc(SocialClientDO::getId)); } }