From aa5c4d78b7bb0f774194d966b6e1e84e9b6f21c8 Mon Sep 17 00:00:00 2001 From: LHS-11 Date: Tue, 2 Jan 2024 23:55:02 +0900 Subject: [PATCH] =?UTF-8?q?fix=20:=20=EC=A0=95=EC=B1=85=20=EC=A1=B0?= =?UTF-8?q?=ED=9A=8C=20API=20=EC=97=90=EC=84=9C=20applyFlag,=20interestFla?= =?UTF-8?q?g=20=EA=B3=A0=EC=A0=95=EA=B0=92=EC=97=90=EC=84=9C=20userPolicy?= =?UTF-8?q?=20=ED=85=8C=EC=9D=B4=EB=B8=94=EC=97=90=EC=84=9C=20=EA=B0=92=20?= =?UTF-8?q?=EA=B0=80=EC=A0=B8=20=EC=98=A4=EB=8F=84=EB=A1=9D=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../domain/policy/dao/PolicyQueryRepository.java | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/cmc/zenefitserver/domain/policy/dao/PolicyQueryRepository.java b/src/main/java/com/cmc/zenefitserver/domain/policy/dao/PolicyQueryRepository.java index 836baea..9fddb6a 100644 --- a/src/main/java/com/cmc/zenefitserver/domain/policy/dao/PolicyQueryRepository.java +++ b/src/main/java/com/cmc/zenefitserver/domain/policy/dao/PolicyQueryRepository.java @@ -39,8 +39,16 @@ public Page searchByPaging(User user, SupportPolicyType s policy.cityCode.stringValue(), policy.policyDateType, policy.benefit, - ExpressionUtils.as(Expressions.constant(false), "applyFlag"), - ExpressionUtils.as(Expressions.constant(false), "interestFlag"), + Expressions.cases() + .when(userPolicy.applyFlag.isNull()) + .then(false) + .otherwise(userPolicy.applyFlag) + .as("applyFlag"), + Expressions.cases() + .when(userPolicy.interestFlag.isNull()) + .then(false) + .otherwise(userPolicy.interestFlag) + .as("interestFlag"), policy.applicationProcedureContent.as("policyMethodTypeDescription") ) )