package com.sz.admin.monitor.mapper;

import com.mybatisflex.core.BaseMapper;
import com.mybatisflex.core.query.QueryWrapper;
import com.sz.admin.monitor.pojo.po.Nvr;
import com.sz.admin.monitor.pojo.po.Preset;
import com.sz.admin.monitor.pojo.po.table.PresetTableDef;

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

/**
 * ClassName: PresetMapper
 * Package: com.sz.admin.monitor.mapper
 * Description:
 */
public interface PresetMapper extends BaseMapper<Preset> {
    default void removeByCameraIds(List<? extends Serializable> cameraIds) {
        QueryWrapper wrapper = QueryWrapper.create()
            .from(PresetTableDef.PRESET)
            .where(PresetTableDef.PRESET.CAMERA_ID.in(cameraIds));
          this.deleteByQuery(wrapper);
    }
}
