package cn.iocoder.yudao.module.system.dal.mysql.attendance.addressgroup;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.module.system.controller.admin.addressgroup.vo.AttendanceAddressGroupPageReqVO;
import cn.iocoder.yudao.module.system.dal.dataobject.attendance.addressgroup.AttendanceAddressGroupDO;
import org.apache.ibatis.annotations.Mapper;

/**
 * 考勤地址组 Mapper
 *
 * @author 艾楷
 */
@Mapper
public interface AttendanceAddressGroupMapper extends BaseMapperX<AttendanceAddressGroupDO> {

    default PageResult<AttendanceAddressGroupDO> selectPage(AttendanceAddressGroupPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<AttendanceAddressGroupDO>()
                .likeIfPresent(AttendanceAddressGroupDO::getName, reqVO.getName())
                .betweenIfPresent(AttendanceAddressGroupDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(AttendanceAddressGroupDO::getId));
    }

}
