SELECT `id`,`warehosetName`,`warehoseCode`,`pastureId` FROM warehouse
   WHERE warehouse.`pastureId` =115 AND warehouse.isWhPostion=1 
  --  AND (warehouse.warehoseCode LIKE CONCAT('%',?,'%') OR ?='')
ORDER BY warehoseCode