# FdProcedureCheckEmailTargetServiceImpl.java

    package cloud.wconnect.workperformance.service.fdprocedurecheck.impl;

    import cloud.wconnect.workperformance.entity.fdprocedurecheck.FdProcedureCheckEmailTarget;
    import cloud.wconnect.workperformance.mapper.fdprocedurecheck.FdProcedureCheckEmailTargetMapper;
    import cloud.wconnect.workperformance.service.fdprocedurecheck.IFdProcedureCheckEmailTargetService;
    import com.baomidou.dynamic.datasource.annotation.DS;
    import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
    import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
    import org.springframework.stereotype.Service;

    import java.util.List;

    /**
     * <p>
     * FdProcedureCheck 功能的邮件配置（收件人、抄送人） 服务实现类
     * </p>
     *
     * @author zc
     * @since 2023-10-17
     */
    @Service
    @DS("work_performance")
    public class FdProcedureCheckEmailTargetServiceImpl extends ServiceImpl<FdProcedureCheckEmailTargetMapper, FdProcedureCheckEmailTarget> implements IFdProcedureCheckEmailTargetService {

        /**
         * 获取邮件通知对象
         *
         * @param configId 邮件配置 id
         * @return 邮件通知对象
         * @author zc
         * @date 2024/3/16
         */
        @Override
        public List<FdProcedureCheckEmailTarget> listByConfigId(int configId) {
            return list(new QueryWrapper<FdProcedureCheckEmailTarget>().lambda()
                    .eq(FdProcedureCheckEmailTarget::getConfigId, configId));
        }

        /**
         * 根据配置 id 删除 target
         *
         * @param emailConfigId 邮件配置 id
         * @author zc
         * @date 2024/11/13
         */
        @Override
        public void removeByConfigId(int emailConfigId) {
            remove(new QueryWrapper<FdProcedureCheckEmailTarget>().lambda()
                    .eq(FdProcedureCheckEmailTarget::getConfigId, emailConfigId));
        }
    }