has语句的使用
select b.TypeName,a.Name,a.Unit,a.Brand,a.Price,a.Number,a.Manufacturer from
aos_consumable_ConsumableAsset as a right join aos_consumable_ConsumableType as b on
a.ConsumableTypeId = b.DirectoryID where 1=1 and (a.BuyDate between ${buyDate} and
${endTime} ) ${has(name)?(" and a.name like '%"+name+"%'"):""} ${has(typeName)?(" and
b.TypeName like '%"+typeName+"%'"):""} ${has(storeAddr)?(" and a.StoreAddr like
'%"+storeAddr+"%'"):""}
这条SQL语句对不?????
为什么查询出来总是没有数据???