yudao-module-crm/src/main/java/cn/iocoder/yudao/module/crm/service/contract/CrmContractServiceImpl.java
@@ -530,9 +530,19 @@
        if (config == null || Boolean.FALSE.equals(config.getNotifyEnabled())) {
            return 0L;
        }
        // 提醒天数未配置时按默认 7 天处理,避免 config.getNotifyDays() 为 null 时拆箱抛 NPE 导致接口 500
        if (config.getNotifyDays() == null) {
            config = BeanUtils.toBean(config, CrmContractConfigDO.class);
            config.setNotifyDays(DEFAULT_NOTIFY_DAYS);
        }
        return contractMapper.selectCountByRemind(userId, config);
    }
    /**
     * 合同到期提醒的默认提前天数:合同提醒未配置 notifyDays 时使用
     */
    private static final Integer DEFAULT_NOTIFY_DAYS = 7;
    @Override
    public List<CrmContractDO> getContractListByCustomerIdOwnerUserId(Long customerId, Long ownerUserId) {
        return contractMapper.selectListByCustomerIdOwnerUserId(customerId, ownerUserId);