package com.fjhx.sale.service.serviceContract.impl;

import com.fjhx.sale.entity.serviceContract.po.ServiceContractProduct;
import com.fjhx.sale.mapper.serviceContract.ServiceContractProductMapper;
import com.fjhx.sale.service.serviceContract.ServiceContractProductService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fjhx.sale.entity.serviceContract.vo.ServiceContractProductVo;
import com.fjhx.sale.entity.serviceContract.dto.ServiceContractProductSelectDto;
import com.ruoyi.common.utils.wrapper.IWrapper;


/**
 * <p>
 * 服务合同-报价单关联表 服务实现类
 * </p>
 *
 * @author
 * @since 2023-04-18
 */
@Service
public class ServiceContractProductServiceImpl extends ServiceImpl<ServiceContractProductMapper, ServiceContractProduct> implements ServiceContractProductService {

    @Override
    public Page<ServiceContractProductVo> getPage(ServiceContractProductSelectDto dto) {
        IWrapper<ServiceContractProduct> wrapper = getWrapper();
        wrapper.orderByDesc("scp", ServiceContractProduct::getId);
        Page<ServiceContractProductVo> page = this.baseMapper.getPage(dto.getPage(), wrapper);
        return page;
    }

}
