package com.zksy.WaterSupply.WaterPumpStation.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zksy.WaterSupply.WaterPumpStation.domain.WaterPumpStation;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

import java.time.LocalDateTime;
import java.util.List;

public interface WaterPumpStationMapper extends BaseMapper<WaterPumpStation> {

    /**
     * 条件查询泵站列表
     */
    List<WaterPumpStation> selectStationList(
            @Param("stationCode") String stationCode,
            @Param("stationName") String stationName,
            @Param("status") String status,
            @Param("principal") String principal,
            @Param("startTime") LocalDateTime startTime,
            @Param("endTime") LocalDateTime endTime);

    /**
     * 查询已删除的泵站数据
     */
    List<WaterPumpStation> selectDeletedList(
            @Param("stationCode") String stationCode,
            @Param("stationName") String stationName,
            @Param("status") String status,
            @Param("startTime") LocalDateTime startTime,
            @Param("endTime") LocalDateTime endTime);

    /**
     * 批量恢复已删除数据
     */
    int restoreByIds(@Param("ids") List<Long> ids, @Param("updateBy") String updateBy);

    /**
     * 批量彻底物理删除数据
     */
    int deleteByIdsPhysically(@Param("ids") List<Long> ids);
}