package com.project.zcustom.mapper.unit;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.project.zcustom.domain.addional.LargeCamera;
import org.apache.ibatis.annotations.Param;

import java.util.List;


/**
 * 摄像头Mapper接口
 *
 * @author change
 * @date 2024-12-30
 */
public interface LargeCameraMapper extends BaseMapper<LargeCamera>
{
    /**
     * 查询摄像头
     *
     * @param id 摄像头主键
     * @return 摄像头
     */
    public LargeCamera selectLargeCameraById(Long id);

    /**
     * 查询摄像头列表
     *
     * @param largeCamera 摄像头
     * @return 摄像头集合
     */
    public List<LargeCamera> selectLargeCameraList(LargeCamera largeCamera);

    /**
     * 新增摄像头
     *
     * @param largeCamera 摄像头
     * @return 结果
     */
    public int insertLargeCamera(LargeCamera largeCamera);

    /**
     * 修改摄像头
     *
     * @param largeCamera 摄像头
     * @return 结果
     */
    public int updateLargeCamera(LargeCamera largeCamera);

    /**
     * 删除摄像头
     *
     * @param id 摄像头主键
     * @return 结果
     */
    public int deleteLargeCameraById(Long id);

    /**
     * 批量删除摄像头
     *
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteLargeCameraByIds(Long[] ids);

    /**
    * 真删接口
    */
    Integer reallyDeleteByWrapper(@Param(Constants.WRAPPER) LambdaQueryWrapper<LargeCamera> deleteWrapper);

    public List<LargeCamera> getCameraList(Long projectId);

    public int getCameraNum();
    public List<LargeCamera> getConnectCameraNumByProject(Long projectId);
    public int getConnectOnlineCameraNum();
}
