成功开店代码改造

This commit is contained in:
shuo.wang
2025-07-02 17:53:46 +08:00
parent 8b94e49334
commit cb69bef277
10 changed files with 55 additions and 48 deletions

View File

@@ -90,15 +90,27 @@
</where>
</select>
<select id="getSubStoreByRegionIds" resultMap="BaseResultMap">
select *
<select id="getSubStoreByRegionIdsAndMobile" resultType="com.cool.store.response.MiniShopsResponse">
select store_id as storeId, store_name as shopName, store_num as shopCode, store_address as detailAddress,
from store_${enterpriseId}
where is_delete = 'effective'
and (
<if test="regionIdList != null and regionIdList.size >0 ">
<foreach collection="regionIdList" item="regionId" separator=" or " open="and (" close=" )">
<foreach collection="regionIdList" item="regionId" separator=" or " open=" (" close=" )">
region_path like concat('%/', #{regionId}, '/%')
</foreach>
</if>
<if test="mobile!=null and mobile !=''">
<choose>
<when test="regionIdList != null and regionIdList.size >0 ">
or `extend_field` like concat('%', #{mobile}, '%')
</when>
<otherwise>
`extend_field` like concat('%', #{mobile}, '%')
</otherwise>
</choose>
</if>
)
</select>
<select id="list" resultMap="BaseResultMap">