收口微信领域能力

将 api-server 微信 HTTP/BFF 适配统一迁移到 wechat 目录。

将微信支付和虚拟支付消息协议细节下沉到 platform-wechat。

拆分 platform-wechat 的订阅消息与支付模块并补齐依赖。

修正微信相关测试的用户 ID 夹具并同步后端架构文档。
This commit is contained in:
kdletters
2026-06-08 21:05:37 +08:00
parent 11c5e3edf4
commit 088470a315
34 changed files with 925 additions and 837 deletions

View File

@@ -35,7 +35,7 @@ use crate::{
prompt::visual_novel as vn_prompt,
request_context::RequestContext,
state::AppState,
wechat_subscribe_message::{
wechat::subscribe_message::{
GenerationResultSubscribeMessage, GenerationResultSubscribeMessageStatus,
send_generation_result_subscribe_message_after_completion,
},
@@ -1748,12 +1748,15 @@ async fn compile_visual_novel_session_inner(
);
let projection = project_draft_for_work(&draft, &profile_id)?;
let notification_work_name = projection.work_title.clone();
let generation_points_cost = crate::creation_entry_config::resolve_creation_entry_mud_point_cost(
state,
VISUAL_NOVEL_RUNTIME_KIND,
u64::from(shared_contracts::creation_entry_config::DEFAULT_UNIFIED_CREATION_MUD_POINT_COST),
)
.await;
let generation_points_cost =
crate::creation_entry_config::resolve_creation_entry_mud_point_cost(
state,
VISUAL_NOVEL_RUNTIME_KIND,
u64::from(
shared_contracts::creation_entry_config::DEFAULT_UNIFIED_CREATION_MUD_POINT_COST,
),
)
.await;
let author = resolve_work_author_by_user_id(state, &owner_user_id, None, None);
let compile_result = state
.spacetime_client()
@@ -1770,9 +1773,7 @@ async fn compile_visual_novel_session_inner(
compiled_at_micros: current_utc_micros(),
})
.await
.map_err(|error| {
visual_novel_error_response(request_context, map_spacetime_error(error))
});
.map_err(|error| visual_novel_error_response(request_context, map_spacetime_error(error)));
let compiled_session = match compile_result {
Ok(session) => {
send_generation_result_subscribe_message_after_completion(