package com.fdkankan.ucenter.service;

import com.fdkankan.ucenter.entity.CameraDetail;
import com.baomidou.mybatisplus.extension.service.IService;
import com.fdkankan.ucenter.entity.CameraType;
import com.fdkankan.ucenter.entity.IncrementType;
import com.fdkankan.ucenter.entity.User;
import com.fdkankan.ucenter.vo.response.CameraAppVo;
import com.fdkankan.ucenter.vo.response.CameraExcelVo;

import java.util.HashMap;
import java.util.List;

/**
 * <p>
 * 相机子表 服务类
 * </p>
 *
 * @author 
 * @since 2022-07-04
 */
public interface ICameraDetailService extends IService<CameraDetail> {

    CameraDetail getByCameraId(Long cameraId);

    Long getCountByUserId(Long userId,Integer type);

    Integer deadlineNumber(String username);

    void unbindCamera(List<Long> cameraIds);

    void bindCamera(List<Long> cameraIds, User user);

    HashMap<Long, CameraDetail> getByCameraIds(List<Long> cameraIds);

    void updateCooperationByIds(List<Long> cameraIds, Long id);

    void addUsedSpace(HashMap<Long, Long> cameraMap);

    void addUsedSpace(CameraDetail cameraDetail,Long space);

    List<CameraAppVo> getListByUserAndType(Long userId, Integer cameraType);

    List<CameraAppVo> getListByUserIdsAndType(List<Long> userId, Integer cameraType);

    boolean updateCameraBalance(Long cameraId, int body, Integer points);

    void uploadUserCameraInfo(Long id, String cameraVersion, String appVersion);

    List<CameraExcelVo> getListByUserAndTypeEx(Long cameraId);


    Long getTotalSpaceByCameraId(CameraDetail detailEntity);

    Boolean checkSpace(CameraDetail detailEntity, IncrementType incrementType, Long space,CameraType cameraType);

    Boolean checkSpace(Long cameraId,CameraType cameraType);
    Boolean checkSpace(CameraDetail cameraId,CameraType cameraType);

    void initSpace(CameraDetail cameraDetail);
    void initSpace(Long cameraId);
}
