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:
@@ -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 });
|
||||
|
||||
Reference in New Issue
Block a user