# HkEfficiencyEmailTargetServiceImpl.java

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

    import cloud.wconnect.workperformance.entity.hkefficiency.HkEfficiencyEmailTarget;
    import cloud.wconnect.workperformance.mapper.hkefficiency.HkEfficiencyEmailTargetMapper;
    import cloud.wconnect.workperformance.service.hkefficiency.IHkEfficiencyEmailTargetService;
    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>
     * SVA Housekeeping Efficiency 功能的邮件配置（收件人、抄送人） 服务实现类
     * </p>
     *
     * @author zc
     * @since 2023-03-30
     */
    @Service
    @DS("work_performance")
    public class HkEfficiencyEmailTargetServiceImpl extends ServiceImpl<HkEfficiencyEmailTargetMapper, HkEfficiencyEmailTarget> implements IHkEfficiencyEmailTargetService {

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

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