SELECT
*
FROM
acv_gds_category
WHERE
corp_id = ?
AND is_deleted = ?
AND (
cat_no LIKE CONCAT( '',?, '%' )
OR cat_no LIKE CONCAT( '',?, '%' )
OR cat_no LIKE CONCAT( '',?, '%' )
)
对应mybatis的xml
<select id="selectLikeCatNos" resultType="com.zbw.saas.data.archives.goods.entity.AcvGoodsCategory">
select * from acv_gds_category where corp_id = #{corpId} and is_deleted = #{isDeleted}
<foreach collection="list" item="item" open="AND (" close=")" separator="or" >
cat_no like CONCAT('',#{item},'%')
</foreach>
</select>