Просмотр исходного кода

fix(api): 改版v1 C类调研提交 - 修正旅程阶段映射(3→2)

调研提交后应推进到stage 2(调研已提交),非stage 3(已购买)。修正newUserIntent首次创建和已有intent的stage更新逻辑。

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
E2E Test Bot 1 месяц назад
Родитель
Сommit
68a7e3b15b

+ 4 - 4
cfc-backend/src/main/java/com/etotem/cfc/controller/ProblemSurveyController.java

@@ -129,7 +129,7 @@ public class ProblemSurveyController {
             intent.setUserId(userId);
             intent.setIntentType(domain != null ? "C" : "B");
             intent.setProblemDomainCode(problemDomainCode != null ? problemDomainCode : "");
-            intent.setJourneyStage(3);
+            intent.setJourneyStage(2);
             intent.setStageUpdatedAt(now);
             intent.setSurveyTemplateId(template.getId());
             intent.setSurveySubmittedAt(now);
@@ -141,9 +141,9 @@ public class ProblemSurveyController {
             intent.setSurveyTemplateId(template.getId());
             intent.setSurveySubmittedAt(now);
             intent.setSurveyResultJson(toJson(snapshot));
-            // 调研完成推进到阶段3
-            if (intent.getJourneyStage() == null || intent.getJourneyStage() < 3) {
-                intent.setJourneyStage(3);
+            // 调研完成推进到阶段2(文档状态机:2=调研已提交)
+            if (intent.getJourneyStage() == null || intent.getJourneyStage() < 2) {
+                intent.setJourneyStage(2);
                 intent.setStageUpdatedAt(now);
             }
             intent.setUpdatedAt(now);