package com.hdkj.lt.bf.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hdkj.lt.bf.mapper.FaultAwaitTransferSwitchSectionMapper;
import com.hdkj.lt.bf.service.IFaultAwaitTransferSwitchSectionService;
import com.hdkj.lt.core.bizms.modle.dto.FhzgFaultDistCustomerDTO;
import com.hdkj.lt.core.bizms.modle.po.fault.FaultAwaitTransferSwitchSection;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 故障停电待转供开关段信息表 服务实现类
 * </p>
 *
 * @author luorui
 * @since 2025-05-29
 */
@Service
public class FaultAwaitTransferSwitchSectionServiceImpl extends ServiceImpl<FaultAwaitTransferSwitchSectionMapper, FaultAwaitTransferSwitchSection> implements IFaultAwaitTransferSwitchSectionService {

    @Override
    public Page<FaultAwaitTransferSwitchSection> getSwitchSectionList(FhzgFaultDistCustomerDTO dto) {
        Page<FaultAwaitTransferSwitchSection> page = new Page<>();
        page.setCurrent(dto.getPageNum());
        page.setSize(dto.getPageSize());
        List<FaultAwaitTransferSwitchSection> list = baseMapper.selectSwitchSectionList(page, dto);
        return page.setRecords(list);
    }
}
