package com.sz.admin.monitor.mapper;

import com.mybatisflex.core.BaseMapper;
import com.mybatisflex.core.query.QueryWrapper;
import com.sz.admin.monitor.pojo.po.Camera;
import com.sz.admin.monitor.pojo.po.CameraSnapshot;

import java.io.Serializable;
import java.util.List;

/**
 * ClassName: CameraSnapshotMapper
 * Package: com.sz.admin.monitor.mapper
 * Description:
 */
public interface CameraSnapshotMapper extends BaseMapper<CameraSnapshot> {

    default void removeByCameraIds(List<? extends Serializable> cameraIds) {
        QueryWrapper wrapper = QueryWrapper.create().select().from(CameraSnapshot.class)
            .where(CameraSnapshot::getCameraId).in(cameraIds);
           this.deleteByQuery(wrapper);
    }
}
