iven
|
96a6196373
|
feat(health): consent 门控 — handler 层 check_consent_active 患者数据访问拦截
- 新增 consent_check.rs: check_consent_active() 检查患者有效同意记录
- 医护角色 (admin/doctor/nurse/health_manager) 自动跳过检查
- 5 个 handler / 10 处端点添加 consent 门控:
- daily_monitoring_handler: list_daily_monitoring
- vital_signs_daily_handler: get_daily_aggregations
- alert_handler: list_alerts
- health_data_handler: 5 个列表/趋势/时间序列端点
- device_reading_handler: list_readings + list_hourly
|
2026-05-22 00:24:41 +08:00 |
|
iven
|
d70b027f20
|
fix(health): 全 handler page_size 上限 100 防止 DoS
22 个 handler 文件统一添加 .min(100) 限制分页大小
|
2026-05-21 22:38:29 +08:00 |
|
iven
|
4b40d47b71
|
fix(health): DTO 输入校验补全 + handler .validate() 调用
- daily_monitoring_dto: Create/Update 添加 Validate derive + 血压/体重/血糖/入液量范围校验
- health_data_dto: LabReport/HealthRecord Create/Update/Review 添加 Validate derive
- consultation_dto: CreateSessionReq/CreateMessageReq 添加 Validate + content length
- article_dto: title max=500→200 匹配 DB VARCHAR(200)
- health_data_handler: 7 个 create/update handler 添加 .validate() 调用
- consultation_handler: create_session/create_message 添加 .validate() 调用
- daily_monitoring_handler: create/update 添加 .validate() 调用
|
2026-05-21 22:37:26 +08:00 |
|
iven
|
8e616f2210
|
fix(health): 身份证号18位校验位验证 + 手机号1[3-9]格式校验
后端:
- validation.rs: 新增 validate_id_number(含加权校验位)和 validate_phone(1[3-9]\d{9})
- patient_dto.rs: CreatePatientReq/UpdatePatientReq/FamilyMemberReq 添加 Validate derive
- patient_handler.rs: create/update/family_member handler 调用格式校验
前端:
- PatientList/PatientDetail/FamilyMembersTab: Form.Item 添加 pattern rules + maxLength
测试:15 个新测试用例全部通过
|
2026-05-21 18:16:41 +08:00 |
|
iven
|
b0f96258ee
|
fix(health+server): 多专家组生产就绪度分析 — DTO 校验补全 + 审计日志用户名
五维度分析结果(DevOps 4.0/10, 医疗合规 9C/6P/1NC, 前端 Lighthouse 94/100/100):
1. Article/Category/Tag DTO 补全 #[derive(Validate)] + handler .validate() 调用(6 DTO + 8 handler)
2. 审计日志 API 新增 user_name 字段(批量关联 users 表),仪表盘显示用户名而非 UUID
3. 多专家组分析报告存档 docs/discussions/
|
2026-05-21 17:53:00 +08:00 |
|
iven
|
4d8658ae98
|
fix(health+web): action-inbox 参数绑定修复 + antd 弃用警告清理
- action_inbox_service: count_sql 补齐 $4/$5 占位符,修复参数绑定数不匹配导致 500
- AiSidebar: Drawer width → size(antd v5 弃用替换)
- 6 个页面 Statistic: valueStyle → styles.content(antd v5 弃用替换)
- RealtimeMonitor: 移除未使用的 _alerts 变量
|
2026-05-21 08:08:47 +08:00 |
|
iven
|
41a865cf68
|
feat(health+core+ai): 业务流程全面修复 Phase 4-6 + 集成测试修复
Phase 4 — Dead-letter 重试 + 内容推送 + 安全加固:
- erp-core: retry_dead_letters() 定时重试 + PII payload 脱敏
- erp-core: audit_service 哈希链定时验证 + 写入失败告警
- erp-health: article.published 消费者匹配 patient_tag 推送消息
- erp-health: care_plan 事件消费者 (激活通知 + 完成积分)
Phase 5 — 患者批量操作 + 咨询增强 + 护理事件:
- patient: batch_import_patients + bind_by_phone + refer_patient
- consultation: rate_session 满意度评价 (rating + feedback)
- consent: patient_sign_consent 患者端签署
- validation: source 枚举 (7值) + relationship 枚举 (7值) + 12 单元测试
Phase 6 — 咨询文件上传 + AI 引用标注:
- consultation_message: media_id 附件上传端点
- ai_suggestion: references JSONB + [ref:id] 格式引用标注
- AI system prompt 增加引用指令 + output_parser 提取逻辑
迁移: 000161 (media_id + references) + 000162 (rating + feedback)
集成测试: consultation/follow_up/pii_encryption 新字段同步修复
讨论文档: 2026-05-20-business-process-brainstorm.md (10域审核报告)
|
2026-05-21 01:34:20 +08:00 |
|
iven
|
ec7f76127d
|
feat(health): 积分触发扩展 + 随访模板关联 — Phase 3
- 新增 follow_up.completed 事件积分消费者,随访完成触发 30 积分
- follow_up_task 新增 template_id FK 关联随访模板
- follow_up_record 新增 form_data JSONB 存储结构化表单数据
- 新增 POST /health/follow-up-tasks/from-template 基于模板创建随访任务端点
- 数据库迁移 160:follow_up_task.template_id + follow_up_record.form_data + 积分规则种子
|
2026-05-21 00:50:29 +08:00 |
|
iven
|
4728794604
|
fix(health+web): PII 解密日志 + 负年龄防护 + 随访页面中文 placeholder
- helper.rs: 提取 decrypt_field 辅助函数,解密失败时输出 warn 日志而非静默返回 None
- format.ts: calcAge 负年龄(未来出生日期)返回 '--' 而非 '-72岁'
- FollowUpTaskList.tsx: DatePicker.RangePicker 添加中文 placeholder
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
2026-05-20 21:01:55 +08:00 |
|
iven
|
65cf96f119
|
fix(security): 安全加固 — analytics 权限校验 + HSTS/CSP 安全头 + SSE no-cache + SQL 参数化
- analytics batch() 添加 require_permission + 事件数上限 100
- main.rs 添加 HSTS/Content-Security-Policy/Permissions-Policy 安全头
- sse_handler SSE 响应添加 Cache-Control: no-store 防 token 泄漏
- action_inbox_service SQL 查询改为参数化,防注入
- wechat_handler 日志脱敏,不打印 appid/secret 长度
- dynamic_table sanitize_identifier 添加 63 字节限制
|
2026-05-20 17:52:28 +08:00 |
|
iven
|
fa1dc764a3
|
feat(health+ai): P2 咨询联动 + AI 巡检消费 — 全链路打通
业务链路打通 5/5 断点全部完成:
- 咨询→随访:医生端新增"创建随访"按钮,从咨询会话直接创建随访任务
- 咨询→AI:医生端新增"AI 分析"按钮,对咨询上下文触发 AI 分析
- 告警→咨询:小程序告警详情页新增"在线咨询"快捷入口
- AI 巡检消费:erp-ai 新增 patrol_consumer,订阅 ai.patrol.requested 事件
- 前端联动:Web ConsultationDetail + 小程序 alerts 页面联动实现
后端:2 新 API + 2 handler + 1 service + AI event consumer
前端:Web 2 API + 1 页面改造 + 小程序 2 页面改造
测试:Web consultations.test.ts 9/9 通过
|
2026-05-20 17:50:49 +08:00 |
|
iven
|
5f34e5715a
|
feat(health): AI 主动巡检定时任务 — 每日扫描异常患者触发 AI 分析
- 新增 start_ai_patrol 定时任务(启动延迟 10 分钟 + 每 24 小时执行)
- 新增 get_patrol_candidates 函数:查询最近 7 天有未处理告警的患者
- 每个候选患者发布 ai.patrol.requested 事件(含 patient_id/doctor_id/reason)
- AI 模块可订阅此事件执行自动化分析(erp-ai 侧消费)
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
2026-05-20 12:30:04 +08:00 |
|
iven
|
17114d492e
|
feat(health): 业务链路打通 — 告警自动随访 + 健康数据积分激励
- 迁移 000157: follow_up_task 新增 source_type/source_id 字段追踪任务来源
- 迁移 000157: points_rule 新增 health_data_report/lab_report_upload/streak_7_days 种子规则
- P0-2: follow_up 事件处理器新增 health_data.critical_alert 消费,告警触发时自动创建随访任务
- 自动查找管床医生分配,critical 级别 1 天内、warning 级别 3 天内
- 新增 alert_auto 随访类型,source_type 标记来源为 critical_alert
- P1-1: points 事件处理器新增 daily_monitoring.created 消费,日常监测上报自动获取积分
- P1-1: points 事件处理器新增 lab_report.uploaded 消费,化验报告上传自动获取积分
- 更新 HMS 系统设计思路文档 v2.0(实体数/链路图/业务链路章节全面更新)
- 新增业务链路打通讨论记录
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
2026-05-20 12:25:28 +08:00 |
|
iven
|
e83101dd23
|
fix(health+plugin): 空标签名校验 + 出生日期校验 + metrics 错误映射 + 测试报告修正
- C1 已修复: CreateTagReq 添加 validate(length(min=1)) + handler 调 .validate()
- C2 非BUG: 媒体库实际路径 /health/media-folders(非 /health/media/folders)
- H6 已修复: create/update patient 添加 birth_date <= today 校验
- H7 已修复: 插件 metrics 移除手动 map_err,用 From trait 自动映射
- H1-H5 非BUG: 测试使用了错误的 API 路径(积分/随访/告警/设备)
- M1-M2 非BUG: Pagination 已有 .min(100) 上限 + u64 不接受负数
- 测试报告更新: Go/No-Go 从 CONDITIONAL GO 升级为 GO
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
2026-05-20 07:25:38 +08:00 |
|
iven
|
f3bf8b3b1d
|
fix: DTO 输入校验补全 + 编译修复 + AuthButton 类型修复
- erp-auth/config/workflow/message/plugin/health: 44 处 DTO 校验缺失修复
- erp-plugin/data_dto: utoipa derive 宏 import 修复
- erp-server/main: tracing 宏类型推断修复
- web AuthButton: AiAnalysisCard/VitalSignsTab Button 包裹在 children 内
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
2026-05-20 06:58:54 +08:00 |
|
iven
|
2660f1afff
|
feat(ai): Phase 2A-3 随访页 AI 辅助生成小结 — SSE 端点 + 前端集成
- AnalysisType 新增 FollowUpSummary 变体(as_str/prompt_name)
- HealthDataProvider 新增 get_follow_up_summary_data() + FollowUpSummaryDataDto
- erp-health 实现随访数据查询(task + records + PII 解密)
- 新增 /ai/analyze/follow-up-summary SSE 端点
- SanitizationService 新增 sanitize_follow_up_data()
- 前端 analysisSse.ts/AiAnalysisCard 支持 follow-up-summary 类型
- FollowUpTaskList 操作列新增「AI 小结」按钮
|
2026-05-19 00:54:15 +08:00 |
|
iven
|
b2053d5bcc
|
feat(ai): Phase 2A-4 新增 3 个 Agent Tool — 化验报告/预约/用药查询
新增 3 个 AI Agent Tool 扩展医护沙箱能力:
- query_patient_lab_reports: 查询患者化验报告列表(含异常计数)
- query_patient_appointments: 查询患者即将到来的预约
- query_patient_medications: 查询患者当前用药列表
同时:
- HealthDataProvider trait 新增 get_patient_lab_reports 方法 + LabReportListItemDto
- erp-health 实现新 trait 方法(含 PII 解密)
- sandbox.rs 更新角色权限:Patient 可查体征/化验/用药,MedicalStaff 额外可查预约
- 修复 ai_prompt_tests.rs 中 AnalysisService::new 签名变更的遗留编译错误
- 新增 5 个 agent 测试覆盖新 Tool 和沙箱权限过滤
|
2026-05-19 00:19:10 +08:00 |
|
iven
|
d623f8b2ff
|
fix: V1 测试版本端到端验证修复 — 6 CRITICAL + 3 HIGH 问题全量修复
修复项:
- fix(db): 迁移 149 — 修复 Admin 角色权限绑定被迁移链破坏 (FE-C1)
- fix(health): 4 个 handler 添加空名称验证 — Doctor/Article/AlertRule/Tag (API-C1~C4)
- fix(health): Stats 仪表盘 new_this_week 查询修复 — SeaORM date_trunc bug (FE-C2)
- fix(server): 添加安全响应头 — X-Frame-Options/CSP/XSS-Protection/Referrer-Policy (SEC-H1)
- fix(mp): 预约创建契约修复 — notes/reason 字段映射 + 移除 schedule_id (MP-H1)
- fix(mp): 咨询会话 subject/last_message 字段改为可选 (MP-H3)
- fix(ai): AiConfig Default derive 替代手写 impl (clippy)
测试报告:
- 8 维度端到端测试全部完成 (后端 87 用例 / 前端 30 页面 / 小程序 80+ API / 安全 20 项 / 性能 20 端点)
- 多角色 7 角色 49 检查 100% 通过
- 综合测试报告 + 专家评估报告
|
2026-05-18 10:24:40 +08:00 |
|
iven
|
f668f0995a
|
feat(core): HealthDataProvider 新增 get_upcoming_appointments + get_medication_list
|
2026-05-18 02:47:15 +08:00 |
|
iven
|
c631d364b3
|
fix(core): 消除乐观锁 version.unwrap() 潜在 panic
20 处 ActiveValue::unwrap() + 1 乐观锁递增改为 take().unwrap_or(0) + 1,
避免数据库记录缺少 version 字段时 panic。覆盖 erp-auth/erp-config/
erp-workflow/erp-health/erp-ai/erp-server 7 个 crate。
DTO 层 Option<i32> 字段保持原有 unwrap_or(0) 不变。
|
2026-05-17 13:05:40 +08:00 |
|
iven
|
6841c45846
|
fix(security): 文件上传 MIME 白名单 + OAuth JWT 密钥路径统一
P0 #1: 媒体文件上传增加 MIME 类型白名单校验(jpeg/png/gif/webp/svg/mp4/webm/pdf)
和文件大小限制(10MB),扩展名使用白名单清理防止路径遍历攻击。
P0 #2: OAuth JWT 密钥从环境变量改为 State 注入,消除运行时 env::var 依赖,
FHIR 路由中间件使用闭包捕获 jwt_secret 保持类型安全。
|
2026-05-17 12:40:02 +08:00 |
|
iven
|
c38967a36e
|
fix(mp): 修复小程序角色路由 + 前后端字段对齐 + E2E 测试报告
- 修复 stores/auth.ts 三种登录方式从错误路径提取 roles(resp.roles → resp.user.roles)
- 首页添加医护人员自动跳转医生端(useDidShow + isMedicalStaff)
- services/auth.ts credentialLogin 返回类型补全 roles 字段
- Web 前端 healthData.ts 字段对齐后端 DTO(indicators→items, content→overall_assessment)
- Web 前端 medicationReminders.ts 字段对齐(time_slots→reminder_times)
- 小程序 report.ts / reports 页面字段对齐后端(indicators→items, doctor_interpretation→doctor_notes)
- 小程序 patient.ts / followup.ts / alert.ts 补全缺失字段
- 后端 stats_handler.rs 权限码修正(health.patient.list→health.dashboard.manage)
- 新增 V1 E2E 测试报告和五专家组评审报告
|
2026-05-17 01:51:02 +08:00 |
|
iven
|
4be28de3ce
|
fix(health): 修复患者端咨询权限+聊天页UI+SVG模板警告
- consultation_handler: create_message/mark_session_read 从 .manage 降为 .list,
患者端只有 list 权限,导致发送消息和标记已读 403
- consultation.ts: 同步后端 DTO doctor_name/patient_name 等缺失字段
- messages/index.tsx: 咨询卡片显示医生姓名替代 consultation_type
- consultation/index.tsx: 同步显示 doctor_name
- pkg-consultation/detail: 按原型重写聊天页(医生头像+在线状态+非对称气泡+药丸输入栏)
- ProgressRing: SVG 替换为 conic-gradient 纯 CSS,消除 tmpl_0_svg 模板警告
- usePageData: stopPullDownRefresh 加 try-catch 防止 DevTools fd race
|
2026-05-16 22:38:21 +08:00 |
|
iven
|
bf8bcdbd5d
|
fix: E2E 测试发现的后端 BUG 修复 — 限流拆分 + 积分查询 + 错误码修正
- 拆分 refresh token 限流为独立中间件(30次/分 vs 登录5次/分)
- 修复积分 recent-activity 500:JOIN 通过 points_account 中间表
- 修复患者/医生不存在返回 400 → 正确的 404 NotFound
|
2026-05-15 22:58:02 +08:00 |
|
iven
|
50e3b16381
|
fix(health): 添加 GET 单条轮播图端点 — 修复 Switch 切换 405
后端 /health/banners/{id} 路由只注册了 PUT/DELETE,缺少 GET handler。
前端 bannerApi.get(id) 调用时返回 405 Method Not Allowed,导致轮播图
状态切换失败。新增 banner_service::get_banner + banner_handler::get_banner
+ BannerNotFound 错误类型 + 路由注册。
|
2026-05-15 21:40:59 +08:00 |
|
iven
|
d44c6167b1
|
fix: E2E 测试发现的 10 项 BUG 修复 — 全栈验证通过
P0 修复:
- 侧边栏路由不稳定: Content 区域添加 key={currentPath} 强制重渲染
- 轮播图缩略图不显示: BannerManage 导入 resolveMediaUrl + 反斜杠转正斜杠
- 超长名称导致 500: patient_handler 添加 name.len() > 255 校验
- 迁移 m20260515_000146: version 乐观锁 version+1 修复
P1 修复:
- 排班路由被冻结: routeConfig.ts 移除 /health/schedules 的 frozen 标记
- 轮播图 Switch 切换无效: 切换前先 GET 最新 version 避免乐观锁冲突
- thumbnail_url 反斜杠: media_service 存储时统一 replace('\', '/')
P2 修复:
- 预约类型 follow_up 未映射: APPOINTMENT_TYPE_MAP 补充 '随访'
- 日期选择器未汉化: DatePicker.RangePicker 添加中文 placeholder
- 轮播图 title 必填校验: banner_handler 添加空标题拒绝
- 文章分类重名: article_category_service 添加同名检查
|
2026-05-15 21:13:49 +08:00 |
|
iven
|
8763e10d6e
|
fix: 全局权限优化 — 7 项问题修复
1. 菜单权限修复:补充 10 个菜单的 permission 字段 + 修复 menu_service
回退逻辑(admin 直接跳过过滤,非 admin 无关联则不显示)+ 收紧前端过滤
2. 管理员重置密码:新增 POST /users/{id}/reset-password 端点 + 前端按钮
3. 告警处理人姓名:AlertResponse 添加 acknowledged_by_name 字段
4. Tab 权限过滤:PatientDetail 6 个 Tab 按权限过滤 + 状态字段 Tooltip
5. 消息中心 UI:添加 Popconfirm/AuthButton,移除 inline isDark
|
2026-05-15 19:00:48 +08:00 |
|
iven
|
4ca9027cd6
|
fix: 联合调试问题修复 — 预约错误提示 + request 错误提取 + copilot 解包
- ISSUE-APPOINTMENT-001: 后端 DoctorNotFound 改为 Validation 错误(400)
+ 改善错误消息"所选医生暂无医护档案,请联系管理员"
+ 小程序预约创建 catch 传递实际错误消息(不再硬编码"预约失败")
+ 小程序 request.ts 提取后端 message 字段作为用户提示
- copilot API: listInsights/listRules/getPatientRisk 补齐 data.data 解包
- 移除 error.rs 重复的 AppointmentNotFound 分支
|
2026-05-15 15:25:26 +08:00 |
|
iven
|
057d9b5896
|
fix(health): 修复咨询统计返回零值 BUG + 清理 secure-storage 过时注释
BUG-CONSULTATION-001: safe_aggregate 包装导致 compute_avg_response_time
SQL JOIN 错误时整个统计函数返回零值默认。修复方式:
- handler 层移除 safe_aggregate 改为直接 .await?
- service 层对 compute_avg_response_time 独立错误处理(warn + None)
同时清理 secure-storage.ts 中关于 crypto-js 的过时注释(已移除)。
|
2026-05-15 15:05:53 +08:00 |
|
iven
|
212c08b7ae
|
feat(health,ai): 后端服务优化 + 媒体文件处理
- erp-health: article/banner/consultation/media 服务层优化
- erp-ai: analysis/insight/prompt 服务增强
- erp-auth: auth/role/token 服务改进
- erp-workflow: executor 执行引擎修复
- erp-plugin: 服务层改进
- 新增媒体上传文件样例
|
2026-05-13 23:28:57 +08:00 |
|
iven
|
0a8ff4bbe7
|
docs(health): OpenAPI 注解 — diagnosis + device_reading + vital_signs_daily
为 3 个 handler 文件共 8 个函数添加 #[utoipa::path] 注解。
P1-5 批次 2/N。
|
2026-05-11 13:07:57 +08:00 |
|
iven
|
ac8d300dc0
|
docs(health): OpenAPI 注解 — device_handler + consent_handler
为 device_handler (2 函数) 和 consent_handler (3 函数) 添加
#[utoipa::path] 注解。P1-5 批次 1/N。
|
2026-05-11 13:05:11 +08:00 |
|
iven
|
d0cb45f457
|
refactor(health): 拆分 module.rs 路由注册为 13 个子模块
protected_routes (800+ 行) 按业务域拆分为 routes/ 目录下 13 个文件:
patient / health_data / follow_up / appointment / consultation /
article / points / stats / alert / device / media / care / admin。
module.rs 从 1595 行降至 798 行,路由注册逻辑更清晰。
|
2026-05-11 12:59:56 +08:00 |
|
iven
|
8c347a5de9
|
refactor(health): 拆分 event.rs(2871 行)为 13 个领域文件
将单体 event.rs 按业务域拆分为 event/ 模块目录:
- mod.rs (219 行): 31 事件常量 + 调度器 + 测试
- 12 个消费者文件: workflow/device/alert/patient/appointment/
follow_up/health_data/ai/consent/consultation/points/lab_report
每个消费者文件 50-215 行,独立可维护。
编译零错误,测试全部通过。
|
2026-05-11 10:09:10 +08:00 |
|
iven
|
129a7b175c
|
fix(health): 允许已发布文章重新提交审核 — published → pending_review
状态机新增 published → pending_review 转换,
已发布文章编辑后可直接提交审核,无需先撤回。
审核期间旧版本继续对外展示,审核通过后覆盖发布。
|
2026-05-11 09:49:56 +08:00 |
|
iven
|
e00ee69d28
|
fix(core,health): 文章内容 sanitize 保留安全 HTML 标签 + 血透测试文章种子
- 新增 sanitize_rich_html() 使用 ammonia 白名单保留安全 HTML 标签和内联样式
- 修复文章创建/更新时 content 被 strip_html_tags() 完全剥离的问题
- ammonia 4 不允许手动指定 <a> 的 rel 属性(自动管理),已从 tag_attrs 移除
- 新增 3 个 sanitize_rich_html 单元测试
- 新增 seed-dialysis-articles.mjs 种子脚本(4 篇血透相关富文本文章)
|
2026-05-11 03:13:43 +08:00 |
|
iven
|
4788e19a1d
|
fix(health,miniprogram): 轮播图图片改用相对路径 + wx.downloadFile 解决 HTTP 限制
问题:微信小程序 <image> 不支持 HTTP URL,签名 URL 与 upload 中间件不兼容。
修复:
1. 公开轮播图 API 返回相对路径(/uploads/...)而非签名 URL
2. 小程序用 wx.downloadFile 下载图片后使用本地临时路径
3. 移除 banner_handler 中不再需要的 base_url/Host header 逻辑
|
2026-05-10 20:14:43 +08:00 |
|
iven
|
a6ec8129c9
|
refactor(web,health): 消除硬编码路径 — 统一 resolveMediaUrl + 动态 base_url
1. 新增 resolveMediaUrl() 工具函数,统一处理 storage_path 前缀和 JWT token
2. MediaLibrary 和 MediaPicker 改用 resolveMediaUrl,消除重复逻辑
3. banner_handler 不再硬编码 localhost:3000,改为从 Host header 动态构建 base_url
|
2026-05-10 20:00:39 +08:00 |
|
iven
|
fca0b5a78f
|
feat(health): 新增公开文章列表端点 /public/articles 供小程序访客首页使用
访客首页文章列表调用 /health/articles 需要 JWT 认证导致 401。
新增 GET /public/articles?tenant_id=xxx 端点,强制只返回已发布文章,
无需认证。小程序访客首页改用此公开端点。
|
2026-05-10 19:14:31 +08:00 |
|
iven
|
7fcabd2e6b
|
fix(health): 修复迁移外键表名引用 + 公开轮播图签名 URL 路径拼接
|
2026-05-10 17:13:02 +08:00 |
|
iven
|
85bff6f267
|
feat(server): 配置签名 URL 密钥 — StorageConfig.secret_key
|
2026-05-10 15:39:11 +08:00 |
|
iven
|
1a459de4ad
|
feat(health): 注册媒体库和轮播图路由 + 权限码 + 公开端点
|
2026-05-10 15:35:47 +08:00 |
|
iven
|
3a672636c0
|
feat(health): 实现媒体库 handler (12 端点) + 轮播图 handler (6 端点)
媒体库 handler (media_handler.rs):
- 上传/列表/详情/更新/删除媒体文件 + 文件夹 CRUD + 移动 + 裁剪
轮播图 handler (banner_handler.rs):
- 管理端 5 端点(列表/创建/更新/删除/排序)
- 公开端点 1 个(小程序无需认证获取生效轮播图)
|
2026-05-10 15:32:09 +08:00 |
|
iven
|
a9bd850ce2
|
feat(health): 实现轮播图 service — CRUD + 排序 + 签名 URL
- list_banners: 列出轮播图,可选状态筛选,批量加载 media_item 避免 N+1
- create_banner: 创建轮播图,验证 media_item 存在且未删除
- update_banner: 更新轮播图,带乐观锁
- delete_banner: 软删除轮播图
- sort_banners: 批量更新排序
- list_public_banners: 公开端点,查询生效轮播图 + HMAC-SHA256 签名 URL
- generate_signed_url: 同步函数,生成签名 URL token
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
2026-05-10 15:15:11 +08:00 |
|
iven
|
601d977438
|
feat(health): 实现媒体库 service — CRUD + 缩略图 + 裁剪
|
2026-05-10 15:08:26 +08:00 |
|
iven
|
603a986281
|
feat(health): 新增 media_folder/media_item/banner 实体 + image/hmac/sha2 依赖
|
2026-05-10 14:19:55 +08:00 |
|
iven
|
22b8ac7ac6
|
fix: 修复多角色找茬测试 V2 发现的 11 个问题
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
CI / security-audit (push) Has been cancelled
P0 (CRITICAL):
- C1: 统计 API 全部改为 safe_aggregate 容错,防止单个子查询崩溃导致 500
- C2: Token 刷新增加用户身份验证,防止并发场景下身份切换
- C3: 患者端线下活动接口添加患者档案验证,防止 Doctor/HM 越权访问
P1 (HIGH):
- H1: 操作记录用 EntityName 组件解析用户名,不再显示截断 UUID
- H4: 告警标题添加中英文映射 (translateAlertTitle)
- H5: 告警面板补全 message import + 修复 hooks 顺序
- H8: 咨询消息发送按钮添加 AuthButton 权限控制
- H9: routeConfig 日常监测权限码改为 health.daily-monitoring.*
P2 (MEDIUM):
- M4: 咨询类型映射补全 online/phone/doctor/follow_up 中文标签
DTO: LabReportStatisticsResp, AppointmentStatisticsResp, VitalSignsReportRateResp 添加 Default derive
|
2026-05-08 12:42:41 +08:00 |
|
iven
|
c82f7bda1d
|
fix: 系统性预防角色测试高频问题(5 方案落地)
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
CI / security-audit (push) Has been cancelled
P0 — 默认拒绝 + 强制守卫:
- 创建 routeConfig.ts 作为前端路由权限的单一真相源
- TypeScript 强制每个路由声明非空权限数组,不可能遗漏
- 自动生成 ROUTE_PERMISSIONS 和 FROZEN_ROUTES
- 修正 3 个前端权限码不匹配后端
P0 — CI 权限扫描:
- 新增 tools/check_permissions.py 校验脚本
- 发现并修复 tenant.manage 未注册问题
P1 — 聚合接口容错:
- erp-core 新增 safe_aggregate 工具函数
- 仪表盘统计 handler 重构
P1 — 状态机一致性自检:
- validation.rs 新增 3 个自检测试
fix: lint-staged eslint Windows 兼容性
|
2026-05-08 08:52:16 +08:00 |
|
iven
|
6d5a711d2c
|
fix: 修复测试发现的 7 个问题 + 全 workspace clippy 清零
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
CI / security-audit (push) Has been cancelled
功能修复:
1. 患者创建空名称验证:后端添加 name.trim().is_empty() 检查
2. 仪表盘统计容错:单个查询失败返回零值而非 500
3. FHIR 路由修复:从 /fhir 移到 /api/v1/fhir 保持一致
4. 冻结模块后端中间件:新增 frozen_module_middleware 拦截冻结路径
5. 积分端点权限码:health.health-data.list → health.points.list
6. 角色权限迁移:护士补充 devices.list,运营补充 points.list/manage
7. 测试结果文档:R01-R05 角色测试 + T00/T10 结果归档
Clippy 全 workspace 清零(14→0 errors):
- erp-core: 修复 empty doc line、collapsible if、redundant closure 等 9 处
- erp-health: 修复 too_many_arguments、unused var、unnecessary parens 等 58 处
- erp-ai: 修复 dead_code、unused import 等 11 处
- erp-plugin: 修复 too_many_arguments、wildcard pattern 等 11 处
- erp-server-migration: 修复 enum_variant_names 5 处
- erp-auth/config/workflow/message: 各 1-3 处
工程改进:
- lint-staged 配置迁移到 .lintstagedrc.js(函数式避免文件列表传给 clippy)
- cargo fmt 统一格式化
|
2026-05-07 23:43:14 +08:00 |
|
iven
|
786f57c151
|
fix: 修复角色测试发现的 5 个共性问题
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
CI / security-audit (push) Has been cancelled
- 修复前端路由守卫前缀碰撞(/health/articles 匹配 /health/article-categories)
- 补全 6 条缺失路由权限映射(appointments/follow-up-records/article-categories/article-tags/plugins/market)
- 修复 critical-alerts API 500(escalation_level 字段 INT2/i16 与 Entity i32 类型不匹配)
- 新增迁移 000128:告警状态修正 + 菜单权限码补全 + 非admin角色移除基础模块权限
|
2026-05-07 15:54:37 +08:00 |
|