Commit Graph

7 Commits

Author SHA1 Message Date
richarjiang
afe6ae1c6a feat(medications): 实现V2版本药品AI分析功能及结构化数据支持
- 新增 V2 版药品分析服务,通过 AI 生成包含适用人群、副作用等字段的结构化 JSON 数据
- 添加 `POST :id/ai-analysis/v2` 接口,集成用户免费次数校验与自动扣费逻辑
- 在药品创建流程中增加异步触发自动 AI 分析的机制
- fix(users): 修复 Apple 登录未获取到邮箱时的报错问题,改为自动生成随机唯一邮箱
- perf(medications): 将服药提醒定时任务的检查频率调整为每 5 分钟一次
- refactor(push-notifications): 移除不再使用的 PushTestService
2025-11-20 17:55:05 +08:00
richarjiang
07fae9bdc0 refactor(push-notifications): 移除推送测试服务模块
删除PushTestService及其相关依赖,该服务用于在应用启动时执行挑战相关的推送测试。移除内容包括:
- 删除push-test.service.ts文件(287行代码)
- 从push-notifications.module.ts中移除PushTestService的导入和注册
- 移除了挑战提醒推送测试、活跃参与者查询等测试功能

此变更简化了推送通知模块结构,移除了仅用于测试目的的代码。
2025-11-18 15:33:05 +08:00
richarjiang
37cc2a729b feat(push-notifications): 新增挑战提醒定时推送功能
新增每日定时推送系统,根据用户参与状态发送不同类型的挑战提醒:
- 已参与用户:每日发送鼓励推送
- 未参与用户:隔天发送挑战邀请
- 匿名用户:隔天发送通用邀请

包含推送历史记录表、定时任务调度、多类型文案模板和防重复发送机制
2025-11-03 17:49:14 +08:00
richarjiang
200484ce39 feat(push-notifications): 将推送测试改为基于挑战的个性化提醒
重构推送测试服务,从简单的测试推送改为针对正在进行中挑战的个性化提醒推送。
新增功能包括:
- 获取正在进行中的挑战和活跃参与者
- 根据挑战类型生成个性化推送内容
- 为挑战参与者发送针对性的提醒推送
- 支持多种挑战类型的推送模板(饮水、运动、饮食、心情、睡眠、体重管理)
2025-11-03 16:11:30 +08:00
richarjiang
cc83b84c80 feat(push): 新增设备推送和测试功能
- 新增基于设备令牌的推送通知接口
- 添加推送测试服务,支持应用启动时自动测试
- 新增推送测试文档说明
- 更新 APNS 配置和日志记录
- 迁移至 apns2 库的 PushType 枚举
- 替换订阅密钥文件
- 添加项目规则文档
2025-10-15 19:09:51 +08:00
richarjiang
38dd740c8c feat(push): migrate APNs provider from @parse/node-apn to apns2 library
- Replace @parse/node-apn with apns2 for improved APNs integration
- Update ApnsProvider to use new ApnsClient with modern API
- Refactor notification creation and sending logic for better error handling
- Add proper error event listeners for device token issues
- Update configuration interface to match apns2 requirements
- Modify push notification endpoints to allow public access for token registration
- Update service methods to handle new response format from apns2
- Add UsersModule dependency to PushNotificationsModule
2025-10-14 19:25:30 +08:00
richarjiang
305a969912 feat: 支持 push 2025-10-11 17:38:04 +08:00