package com.ho.business.mapper;

import com.ho.business.entity.Station;
import com.ho.business.vo.req.StationPageListReqVO;
import com.ho.business.vo.req.StationPageReqVO;
import com.ho.business.vo.req.StationReqVO;
import com.ho.business.vo.resp.StationInfoResp;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * @author yule
 * @description 针对表【station】的数据库操作Mapper
 * @createDate 2022-08-29 17:07:07
 * @Entity com.ho.business.entity.Station
 */
@Mapper
public interface StationMapper {

    int deleteByPrimaryKey(Integer id);

    int insert(@Param("record") Station record);

    void insertSelective(@Param("record") Station record);

    Station selectByPrimaryKey(@Param("id") Integer id);

    int updateByPrimaryKeySelective(@Param("record") Station record);

    int updateByPrimaryKey(Station record);

    Station selectByName(String name);

    List<Station> selectByDimName(String name,Integer groupId);

    List<Station> selectByIds(List<Integer> ids,String lang);

    Station selectByNameAndId(@Param("name") String name, @Param("id") Integer id, @Param("deptId") Integer deptId);

    List<Station> selectAll();

    List<Station> selectByCondition(@Param("record") StationReqVO vo, @Param("depts") List<Integer> depts);

    //根据dept_id进行查询
    List<Station> selectByDeptId(Integer deptId);

    /**
     * 根据条件查询电站信息
     * @param vo
     * @return
     */
    List<Station> selectByGroupIdNotExclude(@Param("record")StationPageReqVO vo);

    List<Station> getByName(String name);

    List<Station> selectStatistics(Integer deleted, Integer dailyCount);

    List<StationInfoResp> selectByParam(@Param("record") StationPageListReqVO stationPageReqVO);

    List<Station> selectByInverterFlag(@Param("inverterFlag")Integer inverterFlag);

    List<Map<String,String>> getTermDictionary(String language);

    /**
     * 批量更新站点信息
     * @param list
     * @return
     */
    int updateStationList(List<Station> list);
}
