package com.yc.ship.module.otc.dal.mysql.storescheduling;

import com.yc.ship.framework.common.pojo.PageResult;
import com.yc.ship.framework.mybatis.core.mapper.BaseMapperX;
import com.yc.ship.framework.mybatis.core.query.LambdaQueryWrapperX;
import com.yc.ship.module.otc.controller.admin.storescheduling.user.StoreSchedulingUserPageReqVO;
import com.yc.ship.module.otc.dal.dataobject.storescheduling.StoreSchedulingUserDO;
import org.apache.ibatis.annotations.Mapper;

/**
 * 班次售票员 Mapper
 *
 * @author 管理员
 */
@Mapper
public interface StoreSchedulingUserMapper extends BaseMapperX<StoreSchedulingUserDO> {

    default PageResult<StoreSchedulingUserDO> selectPage(StoreSchedulingUserPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<StoreSchedulingUserDO>()
                .eqIfPresent(StoreSchedulingUserDO::getUserId, reqVO.getUserId())
                .eqIfPresent(StoreSchedulingUserDO::getSchedulingId, reqVO.getSchedulingId())
                .betweenIfPresent(StoreSchedulingUserDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(StoreSchedulingUserDO::getId));
    }

}
