package com.hys.app.raycoswebapi.mapper.product;

import com.hys.app.framework.database.WebPage;
import com.hys.app.framework.database.mybatisplus.base.BaseMapperX;
import com.hys.app.raycoswebapi.model.dao.product.RaycosStockvirtualskuDao;
import com.hys.app.raycoswebapi.model.dao.product.RaycosStockvirtualskuDao;
import com.hys.app.raycoswebapi.model.dto.product.StockVirtualSkuDto;
import com.hys.app.raycoswebapi.model.dto.product.StockplusDto;

public interface StockVirtualSkuMapper extends BaseMapperX<RaycosStockvirtualskuDao> {
    default WebPage<RaycosStockvirtualskuDao> selectPage(StockVirtualSkuDto params) {
        return lambdaQuery()
                .eqIfPresent(RaycosStockvirtualskuDao::getCompanyId, params.getCompanyId())
                .eqIfPresent(RaycosStockvirtualskuDao::getImportTaskSeq, params.getImportTaskSeq())
                .eqIfPresent(RaycosStockvirtualskuDao::getStockId, params.getStockId())
                .eqIfPresent(RaycosStockvirtualskuDao::getVirtualSku, params.getVirtualSku())
                .eqIfPresent(RaycosStockvirtualskuDao::getPlatformId, params.getPlatformId())
                .eqIfPresent(RaycosStockvirtualskuDao::getTimeCreated, params.getTimeCreated())
                .orderByDesc(RaycosStockvirtualskuDao::getTimeCreated)
                .page(params);
    }

}
