根据关键词查找商品信息接口(解决会查询出被禁用商品的bug)

This commit is contained in:
季圣华
2023-03-25 21:52:02 +08:00
parent dc9e5bb8d6
commit 6c9c60fa3c

View File

@@ -302,7 +302,7 @@
select me.bar_code, m.name, m.standard, m.model, m.color, me.commodity_unit unit select me.bar_code, m.name, m.standard, m.model, m.color, me.commodity_unit unit
from jsh_material m from jsh_material m
left join jsh_material_extend me on m.id = me.material_id and ifnull(me.delete_Flag,'0') !='1' left join jsh_material_extend me on m.id = me.material_id and ifnull(me.delete_Flag,'0') !='1'
where 1=1 where m.enabled=1 and me.id is not null
<if test="materialParam != null and materialParam !=''"> <if test="materialParam != null and materialParam !=''">
<bind name="bindKey" value="'%'+materialParam+'%'"/> <bind name="bindKey" value="'%'+materialParam+'%'"/>
and (me.bar_code like #{bindKey} or m.name like #{bindKey} or m.standard like #{bindKey} or m.model like #{bindKey}) and (me.bar_code like #{bindKey} or m.name like #{bindKey} or m.standard like #{bindKey} or m.model like #{bindKey})