mybatis处理LIKE模糊查询字符串拼接
作者:互联网
-- 最佳实践
<select id="getSealByMap" parameterType="map" resultType="map">
SELECT
ls.`id`,ls.`in_date`,ls.`name`,ls.`seal_type`,ls.`crop_no`,sos.`SEAL_ORDER_ID`
FROM lv_seal ls
LEFT JOIN se_seal_order_seal sos ON ls.`id`=sos.`SEAL_ID`
LEFT JOIN se_seal_order sso ON sso.`ID`=sos.`SEAL_ORDER_ID`
WHERE ls.`is_deleted`='N' AND ls.`crop_no`=#{cropNo} AND ls.`name` LIKE CONCAT('%',#{sealName},'%') AND ls.`seal_type`=#{sealType}
ORDER BY ls.`in_date`
</select>
标签:LIKE,SEAL,ORDER,sos,拼接,ls,seal,mybatis,ID 来源: https://www.cnblogs.com/sung1024/p/11178628.html