package com.fdkankan.scene.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.fdkankan.scene.entity.SceneResourceCooperation;
import com.fdkankan.scene.mapper.ISceneResourceCooperationMapper;
import com.fdkankan.scene.service.ISceneResourceCooperationService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 场景资源和协作用户关联表 服务实现类
 * </p>
 *
 * @author dengsixing
 * @since 2021-12-23
 */
@Service
public class SceneResourceCooperationServiceImpl extends ServiceImpl<ISceneResourceCooperationMapper, SceneResourceCooperation> implements ISceneResourceCooperationService {

    @Override
    public void deleteByCooperationId(Long id) {
        this.remove(new LambdaQueryWrapper<SceneResourceCooperation>().eq(SceneResourceCooperation::getSceneCooperationId, id));
    }

    @Override
    public void deleteByCooperationIds(List<Long> ids) {
        this.remove(new LambdaQueryWrapper<SceneResourceCooperation>().in(SceneResourceCooperation::getSceneCooperationId, ids));
    }
}
