You've already forked FrameTour-BE
feat(notify): 添加微信订阅消息去重功能
- 在 WechatSubscribeTemplateConfigEntity 中新增 dedupSeconds 字段用于配置去重窗口 - 将去重配置从事件模板映射复制到通知配置实体中 - 集成 RedisTemplate 实现基于时间窗口的消息去重机制 - 支持三种去重模式:永久去重(0)、不设去重(负数)、窗口期去重(正数) - 实现基于 Redis 分布式锁的重复消息过滤逻辑 - 为非永久去重场景生成唯一数据库幂等键以避免冲突
This commit is contained in:
@@ -428,6 +428,8 @@ public class WechatSubscribeNotifyConfigRepository {
|
||||
if (cfg == null || !Objects.equals(cfg.getEnabled(), 1)) {
|
||||
continue;
|
||||
}
|
||||
// 复制去重配置到模板实体中
|
||||
cfg.setDedupSeconds(mapping.getDedupSeconds());
|
||||
result.add(cfg);
|
||||
}
|
||||
return result;
|
||||
|
||||
Reference in New Issue
Block a user