package com.jsowell.pile.service;

import java.util.List;

import com.jsowell.common.core.page.PageResponse;
import com.jsowell.pile.dto.CreateReservedDTO;
import com.jsowell.pile.dto.PersonPileStopChargingDTO;
import com.jsowell.pile.dto.PileReservationDTO;
import com.jsowell.pile.domain.PileReservationInfo;

public interface PileReservationInfoService {
    int deleteByPrimaryKey(Integer id);

    int insert(PileReservationInfo record);

    int insertOrUpdate(PileReservationInfo record);

    int insertOrUpdateSelective(PileReservationInfo record);

    int insertSelective(PileReservationInfo record);

    PileReservationInfo selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(PileReservationInfo record);

    int updateByPrimaryKey(PileReservationInfo record);

    int updateBatch(List<PileReservationInfo> list);

    int batchInsert(List<PileReservationInfo> list);

    int updateBatchSelective(List<PileReservationInfo> list);

    List<PileReservationInfo> getReservationsByMemberIdAndPileSn(String memberId, String pileSn);

    /**
     * 启动预约
     * @param dto
     */
    void activateReserved(PileReservationDTO dto);

    /**
     * 关闭预约
     * @param dto
     */
    void deactivateReserved(PileReservationDTO dto);

    /**
     * 根据充电枪口编号发送预约指令
     * @param pileConnectorCode
     */
    void pushReservedByPileConnectorCode(String pileConnectorCode);

    /**
     * 拔枪时，根据充电桩枪口编号关闭仅一次的预约
     * @param pileConnectorCode
     */
    void cancelOneTimeReservation(String pileConnectorCode);

    void deleteReservation(PileReservationDTO dto);

    int createReservation(CreateReservedDTO dto);

    PageResponse queryReservationList(PileReservationDTO dto);

    void updateReservationStatus(PileReservationDTO dto);

    void updateReservation(PileReservationDTO dto);

    void personPileStopCharging(PersonPileStopChargingDTO dto);
}

