From 5d4f1f6f410219e6d826fe44550c9248d56858b2 Mon Sep 17 00:00:00 2001 From: dongsk Date: Sun, 2 Jul 2023 12:55:50 +0800 Subject: [PATCH] =?UTF-8?q?cps=E8=B0=83=E6=95=B4=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/cps/CpsQuestionGetService.java | 25 ++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/service/cps/CpsQuestionGetService.java b/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/service/cps/CpsQuestionGetService.java index 16d8d9a..ad318ca 100644 --- a/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/service/cps/CpsQuestionGetService.java +++ b/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/service/cps/CpsQuestionGetService.java @@ -73,7 +73,9 @@ public class CpsQuestionGetService extends AbsEAIService { List collectIds = questionInfo.stream().map(o -> MapUtils.getLong(o, "id")).collect(Collectors.toList()); LambdaQueryChainWrapper lambdaQuery = cpsQuestionInfoService.lambdaQuery().in(CpsQuestionInfo::getId, collectIds); - switch (option) { + String status = eaiRequest.getString("status"); + + /*switch (option) { case "1": lambdaQuery.eq(CpsQuestionInfo::getStatus1, MapUtils.getInteger(questionInfo.get(0), "status1")); break; @@ -92,6 +94,27 @@ public class CpsQuestionGetService extends AbsEAIService { case "6": lambdaQuery.eq(CpsQuestionInfo::getStatus6, MapUtils.getInteger(questionInfo.get(0), "status6")); break; + }*/ + + switch (option) { + case "1": + lambdaQuery.eq(CpsQuestionInfo::getStatus1, status); + break; + case "2": + lambdaQuery.eq(CpsQuestionInfo::getStatus2, status); + break; + case "3": + lambdaQuery.eq(CpsQuestionInfo::getStatus3, status); + break; + case "4": + lambdaQuery.eq(CpsQuestionInfo::getStatus4, status); + break; + case "5": + lambdaQuery.eq(CpsQuestionInfo::getStatus5, status); + break; + case "6": + lambdaQuery.eq(CpsQuestionInfo::getStatus6, status); + break; } return buildOK("question_info", lambdaQuery.list());