From d2e25cf1acc734953a9a53b3f890f6b50989df6a Mon Sep 17 00:00:00 2001 From: xiaochanghai Date: Thu, 25 Jul 2024 18:07:59 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=BA=E8=AF=81=E5=AF=B9=E7=85=A7=E8=A1=A8?= =?UTF-8?q?=E3=80=81=E5=AD=A6=E5=88=86=E6=9F=A5=E8=AF=A2=E3=80=81=E5=9F=B9?= =?UTF-8?q?=E8=AE=AD=E8=AE=B0=E5=BD=95=20=20=E9=83=A8=E9=97=A8/=E5=B2=97?= =?UTF-8?q?=E4=BD=8D=20=E6=96=B0=E5=A2=9E=E5=8F=AF=E5=A4=9A=E9=80=89?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=EF=BC=8C=E6=9F=A5=E8=AF=A2=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Ghre/Ghre_CertificateServices.cs | 40 +------------------ 1 file changed, 1 insertion(+), 39 deletions(-) diff --git a/Tiobon.Core.Services/Ghre/Ghre_CertificateServices.cs b/Tiobon.Core.Services/Ghre/Ghre_CertificateServices.cs index 8371af6a..c80bd73d 100644 --- a/Tiobon.Core.Services/Ghre/Ghre_CertificateServices.cs +++ b/Tiobon.Core.Services/Ghre/Ghre_CertificateServices.cs @@ -63,45 +63,7 @@ public class Ghre_CertificateServices : BaseServices(value); - - switch (jsonParam.operationKey) - { - case "Include": - conditions += $" AND {name} LIKE '%{jsonParam.columnValue}%'"; - break; - case "NotInclude": - conditions += $" AND {name} NOT LIKE '%{jsonParam.columnValue}%'"; - break; - case "IsNull": - conditions += $" AND {name} IS NULL"; - break; - case "NotNull": - conditions += $" AND {name} IS NOT NULL"; - break; - case "Equal": - conditions += $" AND {name} ='{jsonParam.columnValue}'"; - break; - case "NotEqual": - conditions += $" AND {name} !='{jsonParam.columnValue}'"; - break; - case "GreaterOrEqual"://大于等于 - conditions += $" AND {name} >='{jsonParam.columnValue}'"; - break; - case "Greater"://大于 - conditions += $" AND {name} >'{jsonParam.columnValue}'"; - break; - case "LessOrEqual"://小于等于 - conditions += $" AND {name} <='{jsonParam.columnValue}'"; - break; - case "Less"://小于 - conditions += $" AND {name} <'{jsonParam.columnValue}'"; - break; - default: - break; - } - } + conditions = DealConditions(conditions, name, value); } sql += conditions;