package com.ho.business.mapper;

import com.ho.business.entity.DeviceCall;
import com.ho.business.vo.req.DeviceReqVO;
import com.ho.business.vo.resp.DeviceRespVO;
import com.ho.business.vo.resp.chargepile.ChargePileRespVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* @author yule
* @description 针对表【device】的数据库操作Mapper
* @createDate 2022-08-25 16:38:44
* @Entity com.ho.business.entity.Device
*/
@Mapper
public interface DeviceCallMapper {

    int deleteByPrimaryKey(Integer id);

    int insert(DeviceCall record);

    int insertSelective(DeviceCall record);

    DeviceCall selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(DeviceCall record);

    int updateByPrimaryKey(DeviceCall record);

    DeviceCall selectBySId(Integer id);

    List<ChargePileRespVO> selectBySrcIds(Integer stationId,List<Integer> srcIds);

    List<DeviceRespVO> selectByInfo(@Param("deviceTypeList")List<String> deviceTypeList,@Param("deviceReqVO") DeviceCall deviceReqVO, @Param("stationIds") List<Integer> stationIds);

    List<DeviceRespVO> selectByCondition(DeviceReqVO deviceReqVO);

    DeviceCall selectByStationIdAndSrcId(Integer stationId, Integer srcId);

    List<String> selectDistinctDeviceTypeByStationId(Integer stationId);

    List<DeviceCall> selectDevicesByStationId(Integer stationId);

    List<DeviceRespVO> selectByStationIdAndSrcIds(Integer stationId, List<Integer> srcIds);

    List<DeviceRespVO> selectByIdAndSrcIdNotZero(Integer stationId,Integer needAccessPoint);

}
