From 789027cd17a31a439efeef8ba1ef61705ba43edc Mon Sep 17 00:00:00 2001
From: 13693261870 <252740454@qq.com>
Date: 星期六, 12 十一月 2022 08:55:41 +0800
Subject: [PATCH] 1

---
 JavaCode/FrmSys.cs |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/JavaCode/FrmSys.cs b/JavaCode/FrmSys.cs
index 5632b57..a803972 100644
--- a/JavaCode/FrmSys.cs
+++ b/JavaCode/FrmSys.cs
@@ -548,7 +548,8 @@
             string queryCol = colType + " " + colName;
 
             //string where = isString ? "\r\n        " + colName + " = \"%\" + (StringHelper.isNull(" + colName + ") ? \"\" : " + colName + ".trim()) + \"%\";\r\n" : "";
-            string where = colType == "String" ? "\r\n        " + colName + " = StringHelper.isNull(" + colName + ") ? null : \"%\" + " + colName + ".trim() + \"%\";\r\n" : "";
+            //string where = colType == "String" ? "\r\n        " + colName + " = StringHelper.isNull(" + colName + ") ? null : \"%\" + " + colName + ".trim() + \"%\";\r\n" : "";
+            string where = colType == "String" ? "\r\n        " + colName + " = StringHelper.getLikeStr(" + colName + ");\r\n" : "";
 
             string xml = File.ReadAllText(Path.Combine(baseDir, "SysTemplate\\Service.java"));
             xml = xml
@@ -562,7 +563,7 @@
                 .Replace("{bak}", bak)
                 .Replace("{queryCol}", queryCol)
                 .Replace("{colName}", colName)
-                .Replace("{where}", where);
+                .Replace("{where}", where); 
 
             string path = Path.Combine(baseDir, "SysGenerate");
             if (!Directory.Exists(path))

--
Gitblit v1.9.3