Commit Graph

82 Commits

Author SHA1 Message Date
82d1450182 feat(send): pass record_id and tenant_code, accept async response 2026-07-10 12:26:05 +08:00
302e0ab442 feat(channel): add channel account event receiver endpoint 2026-07-10 12:24:00 +08:00
1fabc04d70 feat(channel): add event handling service 2026-07-10 12:21:33 +08:00
e3bae8aa1f feat(db): add channel event record idempotency table 2026-07-10 12:20:35 +08:00
4b0780c181 feat(event): add daily cleanup for delivered/dead-letter events 2026-07-10 12:19:43 +08:00
c3aefc97de feat(main): start and stop event publisher worker 2026-07-10 12:19:14 +08:00
1641553d31 feat(send): async acceptance and send_result event 2026-07-10 12:18:54 +08:00
1d2948677e feat(login): emit login and online status events 2026-07-10 12:16:27 +08:00
2f4783f1f9 feat(heartbeat): emit heartbeat event to SQLite 2026-07-10 12:11:18 +08:00
0cf57bfaca feat(config): add event publisher settings 2026-07-10 12:09:27 +08:00
0e6f7a3072 feat(event): add single-thread event publisher with retry and cleanup 2026-07-10 12:08:24 +08:00
96ec929378 feat(client): add mci-server event poster 2026-07-10 12:06:21 +08:00
41cb52daa1 feat(event): add SQLite outbound event store 2026-07-10 12:06:19 +08:00
b2e5cc187c feat(event): add outbound event models 2026-07-10 12:00:08 +08:00
b0624126ad docs: add system menu redesign spec 2026-07-09 10:53:08 +08:00
78a46977ba fix(channel-conversation): address code review issues for Task 5
- Make frontend account filter case-insensitive in Conversation.vue
- Warn when bind dialog is submitted without selecting an account
- Reuse AccountSelector.isHealthy in resolvePersonTarget
- Expand ConversationService.bindAccount unit tests
- Update channel mismatch assertion in SendServiceResolveTargetTest
- Move currentConversationId declaration near tag binding state
2026-07-08 17:58:35 +08:00
2cdbc662f3 feat(send-record): support tag and rule targets in test send
- Add tag/rule options to the target type selector.
- Show tag selector + scope selector (all/conversation/person) for tag targets.
- Show rule JSON textarea for rule targets.
- Load tag list on mount.
- Update buildTargetValue to build tag_id/scope and parsed rule payloads.
2026-07-08 17:48:53 +08:00
ec0733cb28 feat(ui): conversation account binding for send/receive primary/backup
- Filter account selector by conversation channelType
- Add sortOrder priority input
- Use currentBindConversation ref for binding context
2026-07-08 17:48:31 +08:00
fc6dbb2ca3 fix(send): apply AccountSelector health checks to fallback owner account and add person-target validation tests
- Make AccountSelector.isHealthy public static so SendService can reuse it.
- Use isHealthy for the resolved/fallback conversation account instead of
  a weaker existence/status/channel check, covering risk level and PYWECHAT
  heartbeat/online status.
- Add null-safe channel-type comparison in resolvePersonTarget.
- Add @Min(0) to BindConversationAccountRequest.sortOrder.
- Rename misleading conversation fallback test and add tests for
  resolvePersonTarget disabled/cross-tenant/channel-mismatch cases.
- Remove unused java.util.Arrays import from test file.
2026-07-08 17:42:51 +08:00
ed7c64de7c fix(channel/send): restore AccountSelector delegation and validate conversation account binding
- SendService.selectSendAccount now delegates to AccountSelector with
  extractStrategy(channelStrategy) instead of an inline filter that only
  checked tenant/status, restoring risk/online/heartbeat checks.
- ConversationService.bindAccount validates the account exists, belongs
  to the same tenant, and matches the conversation channel type before
  creating the binding.
- Add unit tests for ConversationService.bindAccount validation and
  SendService.resolveConversationTarget strategy/health behaviors.
2026-07-08 17:31:18 +08:00
6288f0a305 feat(channel/send): support all 4 binding types and validate send targets
- BindConversationAccountRequest: restrict bindingType to 1-4
- ConversationService.bindAccount: upsert binding by account+conversation+type with sortOrder and status=1
- SendService.selectSendAccount: prefer send-primary(1), fallback send-backup(2), status=1, tenant/channel match, sortOrder asc
- SendService.resolveConversationTarget/resolvePersonTarget: verify account tenant, channel type and status; ensure person identity channel type matches for single chat
2026-07-08 17:08:38 +08:00
1298a558e8 wip: baseline changes before channel-conversation-task boundary implementation 2026-07-08 16:23:09 +08:00
89c9e6a066 fix(channel): add null guard when loading person during sync 2026-07-08 16:07:26 +08:00
d7c996de0e fix(channel): address Task 1 spec review issues for business-field preservation
- Strengthen WeComSyncTest personType assertion by seeding a value (3)
  that differs from what resolvePersonType(user001/INTERNAL) would assign (1),
  so the test actually detects an overwrite.
- Remove redundant personMapper/conversationMapper selectById calls in
  upsertContact and upsertConversation; preserve original business fields
  by reading them from the already-loaded entity before mutation.
- Delete the manual regression shell script; the unit tests are the primary
  verification and the script required manual DB edits and only covered
  conversation fields.
2026-07-08 15:33:10 +08:00
7ec77732e0 fix: protect business fields during wecom sync 2026-07-08 15:07:58 +08:00
f350313395 feat(send): 实现 outbound rule 目标解析 2026-07-07 20:43:15 +08:00
d28c959494 feat(channel): 账号心跳与状态监控 2026-07-07 20:25:23 +08:00
79fed8b607 feat(channel): add mci-channel-wechat-personal adapter
- New module: mci-channel-wechat-personal
- Implements ChannelAdapter SPI for personal WeChat
- Calls Python channel-service pywechat HTTP APIs:
  - /v1/wechat-personal/login/start for initAccount QR code
  - /v1/wechat-personal/send/text and /send/image for sendMessage
- Configurable base URL via sino.channel.wechat-personal.base-url
- Added MockWebServer unit tests
- Wired module into backend parent and mci-server
2026-07-07 20:13:39 +08:00
f5d07b7eb5 feat(channel-wecom): 实现企微联系人/群聊同步 2026-07-07 19:57:02 +08:00
7b16160bba feat(channel-wecom): 实现企微会话存档接收骨架(Finance SDK 接口 + 回调 + 异步拉取) 2026-07-07 19:42:49 +08:00
7edbb0a178 feat(channel-wecom): 实现企微 CP 官方 API 发送器 2026-07-07 19:20:55 +08:00
f88230687c chore(db): V17 审计并补齐软删除与 FK 一致性 2026-07-07 18:58:51 +08:00
4dbc190f68 fix(db): V16 补充 conversation 租户时间索引,脚本使用 MYSQL_PWD 避免密码暴露,增加生产部署提示 2026-07-07 18:50:26 +08:00
3b45a669f9 feat(db): V15 为高频表添加 RANGE 月分区 2026-07-07 18:34:47 +08:00
3b5ddc8f74 fix(build): Dockerfile 改为 jar-only 构建,修复策略组 DTO policies 类型为 List<Map<String,Object>> 2026-07-07 18:21:28 +08:00
d43fbbcc3c feat(mci-server): Phase 1 数据模型调整
- 新增 V11 媒体文件表 mci_message_media 及实体/Mapper
- 新增 V12 建群任务表 mci_conversation_create_task 及实体/Mapper
- 新增 V13 策略组表 mci_policy_group 及实体/Mapper/Service/Controller
- V14 将 mci_flow_definition.flow_type 由 VARCHAR 迁移为 TINYINT,实体改为 Integer
- FlowDefinitionService 兼容字符串/数值 flowType,FlowEngine 按数值 1 过滤入站流程
- MybatisPlusConfig 增加 message、policy 仓库扫描包
2026-07-07 18:06:59 +08:00
0795979ba5 fix(docker): mci-server Dockerfile 复制并构建 mci-channel-wecom 模块 2026-07-07 17:41:12 +08:00
a0db14fb2b feat(channel): 新增 mci-channel-wecom 模块及 WeComChannelAdapter 桩实现 2026-07-07 17:37:01 +08:00
616f5fd2d3 docs(architecture): 提交消息与客户互动中台架构设计文档 2026-07-07 17:29:44 +08:00
403f7b0620 fix(build): 移除 backend/pom.xml 中缺失的渠道子模块声明
当前仓库仅存在 mci-shared、mci-channel-common、mci-server,
删除不存在的 mci-channel-wecom/dingtalk/feishu/ivr 模块,
使根目录 [INFO] Scanning for projects...
[ERROR] [ERROR] Could not find the selected project in the reactor: mci-server @
[ERROR] Could not find the selected project in the reactor: mci-server -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MavenExecutionException 可正常执行。
2026-07-07 17:29:31 +08:00
bccd32ea73 fix(health): 添加 /api/v1/health 端点并修正 mci-server 健康检查
- HealthController: 提供无鉴权健康检查接口,返回 {status: ok}
- AuthInterceptor/WebConfig: 放行 /api/v1/health
- docker-compose.yml: mci-server 健康检查地址改为 /msg-platform/api/v1/health

注意:mci-server Docker 镜像当前因 Maven Central 无法解析 spring-boot-maven-plugin:4.1.0 而无法重新构建,健康检查修复已入库,待网络恢复后重新构建即可生效。
2026-07-07 16:13:44 +08:00
24a70eb530 fix(task12): 修复前端登录租户编码透传、补充 tenant_admin 角色迁移与外部 API 测试脚本
- admin-web/api/client.ts: 请求拦截器仅在未显式传入 X-Tenant-Code 时使用 localStorage 默认值
- admin-web/api/account.ts: login 显式携带租户编码请求头,解决浏览器登录 401
- db/migration/V10: 新增 tenant_admin 平台角色,供外部 API 测试创建租户管理员
- scripts/test-external-api.sh: 创建租户后自动创建管理员并登录,后续接口使用 Bearer Token
- docs/superpowers/plans: 提交总体规划与 Task 12 测试计划
2026-07-07 16:08:20 +08:00
cc4e5bcc2f feat(web): add message test module 2026-07-07 15:42:14 +08:00
2180fc4354 feat(web): add Vue Flow editor and flow trace viewer 2026-07-07 15:39:14 +08:00
6921f0d3e4 feat(web): improve send record UX with dropdowns 2026-07-07 15:36:56 +08:00
9a1565dd8d feat(web): load real data in dashboard and list pages 2026-07-07 15:34:35 +08:00
d0e9f5fb42 feat(web): add tenant and user management pages 2026-07-07 15:30:20 +08:00
e731ee7a2e feat(web): add login, auth store and router guard 2026-07-07 15:25:47 +08:00
bcef04a8cc feat(web): add pinia/vue-flow deps and update API layer 2026-07-07 15:22:05 +08:00
891ded382e feat(inbound): add flow execution trace recording and query 2026-07-07 15:18:55 +08:00