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; }