package com.ruoyi.other.service.impl; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.ruoyi.other.api.domain.TBalanceWarningRecord; import com.ruoyi.other.mapper.TBalanceWarningRecordMapper; import com.ruoyi.other.service.TBalanceWarningRecordService; import org.springframework.stereotype.Service; import java.time.LocalDate; /** *

* 公司余额预警短信提醒记录 服务实现类 *

* * @author mxcd * @since 2026-10-10 */ @Service public class TBalanceWarningRecordServiceImpl extends ServiceImpl implements TBalanceWarningRecordService { @Override public boolean isNotifiedToday(Integer companyId, Integer warnScope, String subIdentifier) { if (companyId == null || warnScope == null) { return false; } String identifier = subIdentifier == null ? "" : subIdentifier; return count(Wrappers.lambdaQuery() .eq(TBalanceWarningRecord::getCompanyId, companyId) .eq(TBalanceWarningRecord::getWarnScope, warnScope) .eq(TBalanceWarningRecord::getSubIdentifier, identifier) .eq(TBalanceWarningRecord::getWarnDate, LocalDate.now())) > 0; } }