From 149ec26524f25cb5a30d85f7ed86c8a703b6238a Mon Sep 17 00:00:00 2001 From: e Date: Mon, 26 Aug 2019 18:19:32 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E4=B8=8B=E6=9E=B6=E8=AF=BB=E5=8F=96?= =?UTF-8?q?=E5=95=86=E5=93=81=E5=90=8D=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/zzjee/md/controller/MdGoodsController.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/zzjee/md/controller/MdGoodsController.java b/src/main/java/com/zzjee/md/controller/MdGoodsController.java index 94e6e983..e4897742 100644 --- a/src/main/java/com/zzjee/md/controller/MdGoodsController.java +++ b/src/main/java/com/zzjee/md/controller/MdGoodsController.java @@ -494,11 +494,15 @@ public class MdGoodsController extends BaseController { String hql = " from MdGoodsEntity where 1 = 1 "; D0.setOK(true); if(!StringUtil.isEmpty(searchstr)) { - hql=hql+" and shpBianMa like '%" + searchstr + "%'"; - } + hql=hql+" and (shpBianMa like '%" + searchstr + "%'"; + hql=hql+" or shpTiaoMa like '%" + searchstr + "%')"; + + } if(!StringUtil.isEmpty(searchstr2)) { - hql=hql+" and shpTiaoMa like '%" + searchstr2 + "%'"; - } + hql=hql+" and (shpTiaoMa like '%" + searchstr2 + "%'"; + hql=hql+" or shpBianMa like '%" + searchstr2 + "%')"; + + } List listMdGoodss = mdGoodsService.findHql(hql); D0.setOK(true);