feat(rvw): complete journal config center MVP and tenant login routing

Deliver the RVW V4.0 journal configuration center across backend, frontend, migration, and docs with zh/en editorial baseline support and tenant-level prompt/template overrides. Unify tenant login to /:tenantCode/login and auto-enable RVW module when tenant type is JOURNAL to prevent post-login access gaps.

Made-with: Cursor
This commit is contained in:
2026-03-15 11:51:35 +08:00
parent 16179e16ca
commit 83e395824b
44 changed files with 2555 additions and 312 deletions

View File

@@ -28,15 +28,18 @@ export interface ClinicalReviewResult {
export async function reviewClinical(
text: string,
modelType: ModelType = 'deepseek-v3',
userId?: string
userId?: string,
tenantExpertPrompt?: string | null
): Promise<ClinicalReviewResult> {
try {
const promptService = getPromptService(prisma);
const { content: businessPrompt, isDraft } = await promptService.get(
'RVW_CLINICAL',
{},
{ userId }
);
let businessPrompt = tenantExpertPrompt?.trim() || '';
let isDraft = false;
if (!businessPrompt) {
const promptService = getPromptService(prisma);
const result = await promptService.get('RVW_CLINICAL', {}, { userId });
businessPrompt = result.content;
isDraft = result.isDraft;
}
if (isDraft) {
logger.info('[RVW:Clinical] 使用 DRAFT 版本 Prompt调试模式', { userId });