# BgEmailTargetServiceImpl.java

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

    import cloud.wconnect.frontoffice.entity.badguest.BgEmailTarget;
    import cloud.wconnect.frontoffice.mapper.badguest.BgEmailTargetMapper;
    import cloud.wconnect.frontoffice.service.badguest.IBgEmailTargetService;
    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>
     * Guests Blacklist 功能的邮件配置（收件人、抄送人）表 服务实现类
     * </p>
     *
     * @author lichen
     * @since 2023-03-20
     */
    @Service
    @DS("logbook")
    public class BgEmailTargetServiceImpl extends ServiceImpl<BgEmailTargetMapper, BgEmailTarget> implements IBgEmailTargetService {

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

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

    }