package com.zfire.mall.manager.logic.manage.v2.product.price;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zfire.mall.manager.bean.manage.v2.product.price.PriceSaleTypeRelaVO;
import com.zfire.mall.manager.commonmapper.manage.product.PriceSaleTypeRelaReserveMapper;
import com.zfire.mall.manager.zfire.bean.ZfireParamBean;
import com.zfire.mall.manager.zfire.util.FieldUtils;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Slf4j
@Service
public class PriceSaleTypeRelaV2Logic {

    @Resource
    PriceSaleTypeRelaReserveMapper priceSaleTypeRelaReserveMapper;

    public IPage<PriceSaleTypeRelaVO> v2ListPage(ZfireParamBean zfireParamBean) {
        zfireParamBean = FieldUtils.supplyParam(zfireParamBean);

        return priceSaleTypeRelaReserveMapper.v2ListPage(new Page(zfireParamBean.getPageNum(), zfireParamBean.getPageSize()), zfireParamBean);
    }
}
