package com.railway.business.baseinfo.mapper;

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

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

  /**
   * 新增
   */
  int insert(BaseSubstation baseSubstation);

  /**
   * 删除
   */
  int delete(@Param("substationId") String substationId);

  /**
   * 更新
   */
  int update(BaseSubstation baseSubstation);

  /**
   * 获取单个
   */
  BaseSubstation getInfo(@Param("substationId") String substationId);

  /**
   * 查询列表
   */
  Page<BaseSubstation> getList(BaseSubstation baseSubstation);

  /**
   *
   * @param lineId
   * @return
   */
  Page<BaseDeptSubstationVo> getDeptSubList(@Param("lineId") Long lineId);

}
