# WeeklyMonthlyRevenueEmailTargetServiceImpl.java

    package cloud.wconnect.rateshop.service.weeklymonthlyrevenue.impl;

    import cloud.wconnect.rateshop.entity.weeklymonthlyrevenue.WeeklyMonthlyRevenueEmailTarget;
    import cloud.wconnect.rateshop.mapper.weeklymonthlyrevenue.WeeklyMonthlyRevenueEmailTargetMapper;
    import cloud.wconnect.rateshop.service.weeklymonthlyrevenue.IWeeklyMonthlyRevenueEmailTargetService;
    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>
     * Weekly Monthly Revenue email target 服务实现类
     * </p>
     *
     * @author zc
     * @since 2024-05-13
     */
    @Service
    @DS("rate_shop")
    public class WeeklyMonthlyRevenueEmailTargetServiceImpl extends ServiceImpl<WeeklyMonthlyRevenueEmailTargetMapper, WeeklyMonthlyRevenueEmailTarget> implements IWeeklyMonthlyRevenueEmailTargetService {

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

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