# CompRoomEmailTargetServiceImpl.java

    package cloud.wconnect.frontoffice.service.comproom.impl;

    import cloud.wconnect.frontoffice.entity.comproom.CompRoomEmailTarget;
    import cloud.wconnect.frontoffice.mapper.comproom.CompRoomEmailTargetMapper;
    import cloud.wconnect.frontoffice.service.comproom.ICompRoomEmailTargetService;
    import com.baomidou.dynamic.datasource.annotation.DS;
    import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
    import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
    import org.apache.commons.collections.CollectionUtils;
    import org.springframework.stereotype.Service;

    import java.util.Collections;
    import java.util.List;

    /**
     * <p>
     * Comp Room 功能的邮件配置（收件人、抄送人）表 服务实现类
     * </p>
     *
     * @author lichen
     * @since 2023-03-28
     */
    @Service
    @DS("logbook")
    public class CompRoomEmailTargetServiceImpl extends ServiceImpl<CompRoomEmailTargetMapper, CompRoomEmailTarget> implements ICompRoomEmailTargetService {

        /**
         * 查询通知对象集合
         *
         * @param configIds 邮件配置ID集合
         * @return java.util.List<cloud.wconnect.frontoffice.entity.comproom.CompRoomEmailTarget>
         * @author lichen
         * @date 2024/3/13
         */
        @Override
        public List<CompRoomEmailTarget> listByConfigId(List<Integer> configIds) {
            if (CollectionUtils.isEmpty(configIds)) return Collections.emptyList();
            return list(new LambdaQueryWrapper<CompRoomEmailTarget>().in(CompRoomEmailTarget::getConfigId, configIds));
        }

        /**
         * 删除通知对象
         *
         * @param configId 邮件配置ID
         * @return void
         * @author lichen
         * @date 2024/3/13
         */
        @Override
        public void removeByConfigId(Integer configId) {
            remove(new LambdaQueryWrapper<CompRoomEmailTarget>().eq(CompRoomEmailTarget::getConfigId, configId));
        }
    }