Просмотр исходного кода

简单商品查询接口规格和型号改为模糊筛选

hu 3 лет назад
Родитель
Сommit
b3bf015f75
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      src/rest/openapi/restcontroller/wechatapp/titem/Titem.java

+ 2 - 2
src/rest/openapi/restcontroller/wechatapp/titem/Titem.java

@@ -648,10 +648,10 @@ public class Titem extends Controller {
                 where = where + " and(t1.fitemno like'%" + whereObject.getString("condition") + "%' or t1.fspec like '%" + whereObject.getString("condition") + "%' or t1.fitemname like'%" + whereObject.getString("condition") + "%' or t1.fmodel like'%" + whereObject.getString("condition") + "%')";
             }
             if (whereObject.containsKey("fspec") && !"".equals(whereObject.getString("fspec"))) {
-                where = where + " and t1.fspec ='" + whereObject.getString("fspec") + "'";
+                where = where + " and t1.fspec like'%" + whereObject.getString("fspec") + "%'";
             }
             if (whereObject.containsKey("fmodel") && !"".equals(whereObject.getString("fmodel"))) {
-                where = where + " and t1.fmodel ='" + whereObject.getString("fmodel") + "'";
+                where = where + " and t1.fmodel like'%" + whereObject.getString("fmodel") + "%'";
             }
             if (whereObject.containsKey("fitemno") && !"".equals(whereObject.getString("fitemno"))) {
                 where = where + " and t1.fitemno ='" + whereObject.getString("fitemno") + "'";