package cn.iocoder.yudao.module.member.dal.mysql.orderdetaillog;

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.member.dal.dataobject.orderdetaillog.OrderDetailLogDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.member.controller.admin.orderdetaillog.vo.*;

/**
 * 打菜日志 Mapper
 *
 * @author 我是秦俊旗
 */
@Mapper
public interface OrderDetailLogMapper extends BaseMapperX<OrderDetailLogDO> {

    default PageResult<OrderDetailLogDO> selectPage(OrderDetailLogPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<OrderDetailLogDO>()
                .eqIfPresent(OrderDetailLogDO::getDeviceSn, reqVO.getDeviceSn())
                .eqIfPresent(OrderDetailLogDO::getStoreId, reqVO.getStoreId())
                .eqIfPresent(OrderDetailLogDO::getParam, reqVO.getParam())
                .betweenIfPresent(OrderDetailLogDO::getCreateTime, reqVO.getCreateTime())
                .eqIfPresent(OrderDetailLogDO::getInsertParam, reqVO.getInsertParam())
                .orderByDesc(OrderDetailLogDO::getId));
    }

}