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

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.carteen.vo.CarteenPageReqVO;
import cn.iocoder.yudao.module.system.dal.dataobject.carteen.CarteenDO;
import org.apache.ibatis.annotations.Mapper;

/**
 * 门店管理 Mapper
 *
 * @author 开发账号
 */
@Mapper
public interface CarteenMapper extends BaseMapperX<CarteenDO> {

    default PageResult<CarteenDO> selectPage(CarteenPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<CarteenDO>()
                .likeIfPresent(CarteenDO::getStoresName, reqVO.getStoresName())
                .likeIfPresent(CarteenDO::getStoreAddress, reqVO.getStoreAddress())
                .eqIfPresent(CarteenDO::getStatus, reqVO.getStatus())
                .eqIfPresent(CarteenDO::getMultipleManage, reqVO.getMultipleManage())
                .eqIfPresent(CarteenDO::getAccountOrder, reqVO.getAccountOrder())
                .eqIfPresent(CarteenDO::getPhone, reqVO.getPhone())
                .betweenIfPresent(CarteenDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(CarteenDO::getId));
    }

}