package com.njcn.gather.tool.addledger.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.njcn.gather.tool.addledger.pojo.param.AddLedgerLinePathQueryParam;
import com.njcn.gather.tool.addledger.pojo.po.AddLedgerLinePO;
import com.njcn.gather.tool.addledger.pojo.vo.AddLedgerLinePathVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 监测点 Mapper。
 */
public interface AddLedgerLineMapper extends BaseMapper<AddLedgerLinePO> {

    List<Integer> selectUsedLineNos(@Param("deviceId") String deviceId, @Param("lineId") String lineId);

    int countActiveLineNo(@Param("deviceId") String deviceId,
                          @Param("lineNo") Integer lineNo,
                          @Param("lineId") String lineId);

    List<AddLedgerLinePathVO> selectLinePathByLineIds(@Param("lineIds") List<String> lineIds);

    List<AddLedgerLinePathVO> selectLinePathByQuery(@Param("param") AddLedgerLinePathQueryParam param);

    int softDeleteByIds(@Param("ids") List<String> ids, @Param("updateBy") String updateBy);
}
