package cn.iocoder.yudao.module.system.dal.mysql.actionlog;

import java.util.*;

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

/**
 * 车辆动作记录 Mapper
 *
 * @author 陈宾顺
 */
@Mapper
public interface RobotTaskDetailActionLogMapper extends BaseMapperX<RobotTaskDetailActionLogDO> {

    default PageResult<RobotTaskDetailActionLogDO> selectPage(RobotTaskDetailActionLogPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<RobotTaskDetailActionLogDO>()
                .eqIfPresent(RobotTaskDetailActionLogDO::getCommandId, reqVO.getCommandId())
                .eqIfPresent(RobotTaskDetailActionLogDO::getCommandType, reqVO.getCommandType())
                .eqIfPresent(RobotTaskDetailActionLogDO::getCommandMsg, reqVO.getCommandMsg())
                .likeIfPresent(RobotTaskDetailActionLogDO::getActionMsg, reqVO.getActionMsg())
                .eqIfPresent(RobotTaskDetailActionLogDO::getActionStatus, reqVO.getActionStatus())
                .eqIfPresent(RobotTaskDetailActionLogDO::getRobotNo, reqVO.getRobotNo())
                .betweenIfPresent(RobotTaskDetailActionLogDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(RobotTaskDetailActionLogDO::getId));
    }

}