package com.railway.business.baseinfo.mapper;

import com.github.pagehelper.Page;
import com.railway.business.baseinfo.domain.BaseStation;
import com.railway.business.baseinfo.domain.vo.BaseStationQuery;
import com.railway.business.baseinfo.domain.vo.BaseStationVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

/**
 * primary key (station_id) using
 *
 * @author author
 * @date 2021/10/16
 */
@Mapper
@Repository
public interface BaseStationMapper {

  /**
   * 新增
   */
  int insert(BaseStation baseStation);

  /**
   * 删除
   */
  int delete(@Param("stationId") Long stationId);

  /**
   * 更新
   */
  int update(BaseStation baseStation);

  /**
   * 获取单个
   */
  BaseStationVo getInfo(@Param("stationId") Long stationId);

  /**
   * 查询列表
   */
  Page<BaseStationVo> getList(BaseStationQuery query);

  /**
   * 查询列表
   */
  Page<BaseStation> getStationList(BaseStationQuery query);

}
