# AdjNotifyRuleServiceImpl.java

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

    import cloud.wconnect.frontoffice.entity.adjustment.AdjNotifyRule;
    import cloud.wconnect.frontoffice.mapper.adjustment.AdjNotifyRuleMapper;
    import cloud.wconnect.frontoffice.service.adjustment.IAdjNotifyRuleService;
    import com.baomidou.dynamic.datasource.annotation.DS;
    import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
    import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
    import lombok.extern.slf4j.Slf4j;
    import org.springframework.stereotype.Service;

    /**
     * <p>
     * 调账功能通知规则表 服务实现类
     * </p>
     *
     * @author lichen
     * @since 2024-09-20
     */
    @Service
    @DS("logbook")
    @Slf4j
    public class AdjNotifyRuleServiceImpl extends ServiceImpl<AdjNotifyRuleMapper, AdjNotifyRule> implements IAdjNotifyRuleService {

        /**
         * 根据资产ID和类型获取通知规则
         *
         * @param propertyId 资产ID
         * @param type       类型
         * @return cloud.wconnect.frontoffice.entity.adjustment.AdjNotifyRule
         * @author lichen
         * @date 2024/9/20
         */
        @Override
        public AdjNotifyRule getByPropertyIdAndType(Integer propertyId, Integer type) {
            return getOne(new LambdaQueryWrapper<AdjNotifyRule>().eq(AdjNotifyRule::getPropertyId, propertyId)
                    .eq(AdjNotifyRule::getType, type));
        }
    }