package org.jeecg.modules.subwayNetwork.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.jeecg.common.api.dto.PageSearch;
import org.jeecg.modules.subwayNetwork.dto.LightRailQueryDTO;
import org.jeecg.modules.subwayNetwork.entity.LightRail;
import org.jeecg.modules.subwayNetwork.mapper.LightRailMapper;
import org.jeecg.modules.subwayNetwork.service.ILightRailService;
import org.jeecg.modules.subwayNetwork.vo.LightRailQueryVO;
import org.jeecg.modules.subwayNetwork.vo.SectionStationMapVO;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Description: 线路车站-线别管理
 */
@Service
public class LightRailServiceImpl extends ServiceImpl<LightRailMapper, LightRail> implements ILightRailService {

    @Override
    public IPage<LightRailQueryVO> queryPageList(PageSearch<LightRailQueryDTO> dto) {
        IPage<LightRailQueryVO> page = new Page<>(dto.getPageNo(), dto.getPageSize());

        page = this.baseMapper.queryPageList(page, dto.getQuery());
        return page;
    }

    @Override
    public List<SectionStationMapVO> getSectionStation() {
        return this.baseMapper.getSectionStation();
    }
}
