fix region_path like concat("%/",#{regionPath},"/%")

This commit is contained in:
shuo.wang
2024-10-12 13:48:30 +08:00
parent cdd5bbf608
commit 1a7a93b018

View File

@@ -186,7 +186,7 @@
deleted as deleted
from region_${enterpriseId}
where deleted = 0
and region_path like concat(#{regionPath},'%')
and region_path like concat("%/",#{regionPath},"/%")
</select>
<select id="getRegionPathByIds" resultType="com.cool.store.entity.RegionDO">
@@ -271,7 +271,7 @@
where
deleted = 0
and
<foreach collection="regionPaths" separator=" or " open="(" close=")" item="region" > region_path like concat(#{region}, "%")</foreach>
<foreach collection="regionPaths" separator=" or " open="(" close=")" item="region" > region_path like concat("%/",#{regionPath},"/%")</foreach>
</select>
<select id="getSubRegionIdsByRegionIds" resultType="string">
@@ -305,7 +305,7 @@
deleted = 0
and region_type = 'path'
and
<foreach collection="regionPaths" separator=" or " open="(" close=")" item="region" > region_path like concat('%',#{region}, "%")</foreach>
<foreach collection="regionPaths" separator=" or " open="(" close=")" item="region" > region_path like concat("%/",#{regionPath},"/%")</foreach>
</select>
<select id="getRegionPathByRegionIds" resultType="string">