From d87b1f98b7a2878c07d13a13276ab0b766e4a932 Mon Sep 17 00:00:00 2001 From: admin Date: Sun, 26 Mar 2023 16:18:03 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E6=9E=90=E6=95=B0=E6=8D=AE=E8=87=B3?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=BA=93=EF=BC=8C=E5=A2=9E=E5=8A=A0=E5=8D=95?= =?UTF-8?q?=E5=BC=95=E5=8F=B7=E8=BD=AC=E4=B9=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/glxp/sale/admin/idc/service/impl/IdcServiceImpl.java | 3 ++- .../src/main/java/com/glxp/sale/admin/idc/utils/DBAUtils.java | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/api-admin/src/main/java/com/glxp/sale/admin/idc/service/impl/IdcServiceImpl.java b/api-admin/src/main/java/com/glxp/sale/admin/idc/service/impl/IdcServiceImpl.java index 4cf58dd..e5a967c 100644 --- a/api-admin/src/main/java/com/glxp/sale/admin/idc/service/impl/IdcServiceImpl.java +++ b/api-admin/src/main/java/com/glxp/sale/admin/idc/service/impl/IdcServiceImpl.java @@ -503,6 +503,7 @@ public class IdcServiceImpl implements IdcService { String extra = columnList.get(k).get("extra")!=null&&columnList.get(k).get("extra").toLowerCase().contains("auto") ? "A" : "N"; String attrName = columnList.get(k).get("attrName"); String value = list.get(i).get(attrName) !=null ? list.get(i).get(attrName).toString() : ""; + value = DBAUtils.escape(value); String dataType = columnList.get(k).get("dataType").toLowerCase().contains("char") || columnList.get(k).get("dataType").toLowerCase().contains("text") ? "C" : columnList.get(k).get("dataType").toLowerCase().contains("date") ? "D" : "N" ; if(extra.equals("N")) { @@ -615,7 +616,7 @@ public class IdcServiceImpl implements IdcService { } /*检查当前系统为自助平台(下发)还是UDI系统(上传),返回传输方向,如果都未设置,默认返回下发*/ private String getDirection() { - SystemParamConfigEntity systemParamConfigEntity = getSystemParamConfig("sync_system_type","系统类型" , "IDC","UDI(UDI管理系统,需要往自助平台上传数据),SPS(自助平台,需要往UDI系统下发数据),IDC(中继服务,只接收,转发或暂存数据供下一级服务拉取数据)"); + SystemParamConfigEntity systemParamConfigEntity = getSystemParamConfig("sync_system_type","系统类型" , "IDC","UDI(UDI管理系统,由UDI系统往自助平台上传数据),SPS(自助平台,由自助平台往UDI系统下发数据),IDC(中继服务,只接收,转发或暂存数据供下一级服务拉取数据)"); return systemParamConfigEntity.getParamValue().equals("UDI") ? "U" : systemParamConfigEntity.getParamValue().equals("SPS") ? "I" : "N"; } diff --git a/api-admin/src/main/java/com/glxp/sale/admin/idc/utils/DBAUtils.java b/api-admin/src/main/java/com/glxp/sale/admin/idc/utils/DBAUtils.java index edd59ff..8fa5633 100644 --- a/api-admin/src/main/java/com/glxp/sale/admin/idc/utils/DBAUtils.java +++ b/api-admin/src/main/java/com/glxp/sale/admin/idc/utils/DBAUtils.java @@ -389,8 +389,8 @@ public class DBAUtils { public static String escape(String str) { String value = str; if(value!=null&&value.contains("'")) { - value = value.replaceAll("'", "AAA12345ZZZ"); - value = value.replaceAll("AAA12345ZZZ", "''"); + value = value.replaceAll("'", "CCCBBBAAA12345ZZZYYYXXX"); + value = value.replaceAll("CCCBBBAAA12345ZZZYYYXXX", "''"); } return value; }