统一将 bms_region 替换为 region,更新相关注释和文档以反映这一变化。

This commit is contained in:
wuweihua
2026-09-29 08:57:41 +08:00
parent 0ad90f6183
commit b8e1f8cd40
23 changed files with 68 additions and 54 deletions
@@ -34,7 +34,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
continent, sub_region, currency_code, currency_name, currency_symbol,
phone_prefix, flag_emoji, flag_url, is_independent, is_eu,
status, del_flag, create_by, create_time, update_by, update_time, remark
from bms_region
from region
</sql>
<select id="selectRegionById" parameterType="Long" resultMap="BmsRegionResult">
@@ -76,7 +76,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
<insert id="insertRegion" parameterType="BmsRegion" useGeneratedKeys="true" keyProperty="regionId">
insert into bms_region (
insert into region (
<if test="countryNameCn != null">country_name_cn,</if>
<if test="countryNameEn != null and countryNameEn != ''">country_name_en,</if>
<if test="countryCode2 != null and countryCode2 != ''">country_code_2,</if>
@@ -120,7 +120,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</insert>
<update id="updateRegion" parameterType="BmsRegion">
update bms_region
update region
<set>
<if test="countryNameCn != null">country_name_cn = #{countryNameCn},</if>
<if test="countryNameEn != null and countryNameEn != ''">country_name_en = #{countryNameEn},</if>
@@ -145,14 +145,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</update>
<delete id="deleteRegionByIds" parameterType="Long">
delete from bms_region where region_id in
delete from region where region_id in
<foreach item="regionId" collection="array" open="(" separator="," close=")">
#{regionId}
</foreach>
</delete>
<insert id="upsertByCode2" parameterType="BmsRegion">
insert into bms_region (
insert into region (
country_name_cn, country_name_en, country_code_2, country_code_3,
continent, sub_region, currency_code, currency_name, currency_symbol,
phone_prefix, flag_emoji, flag_url, is_independent, is_eu,
@@ -23,7 +23,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<sql id="selectSyncLogVo">
select log_id, sync_type, status, total_count, insert_count, update_count,
fail_count, duration_ms, error_msg, create_by, create_time, update_by, update_time
from bms_region_sync_log
from region_sync_log
</sql>
<select id="selectSyncLogById" parameterType="Long" resultMap="BmsRegionSyncLogResult">
@@ -51,7 +51,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
<insert id="insertSyncLog" parameterType="BmsRegionSyncLog" useGeneratedKeys="true" keyProperty="logId">
insert into bms_region_sync_log (
insert into region_sync_log (
<if test="syncType != null and syncType != ''">sync_type,</if>
<if test="status != null and status != ''">status,</if>
<if test="totalCount != null">total_count,</if>
@@ -77,7 +77,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</insert>
<update id="updateSyncLog" parameterType="BmsRegionSyncLog">
update bms_region_sync_log
update region_sync_log
<set>
<if test="status != null and status != ''">status = #{status},</if>
<if test="totalCount != null">total_count = #{totalCount},</if>
@@ -92,7 +92,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</update>
<delete id="deleteSyncLogByIds" parameterType="Long">
delete from bms_region_sync_log where log_id in
delete from region_sync_log where log_id in
<foreach item="logId" collection="array" open="(" separator="," close=")">
#{logId}
</foreach>
@@ -54,10 +54,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
AND fail_code = #{failCode}
</if>
<if test="params.beginTime != null and params.beginTime != ''">
AND create_time &gt;= #{params.beginTime}
AND date_format(bill_time,'%Y%m%d') &gt;= date_format(#{params.beginTime},'%Y%m%d')
</if>
<if test="params.endTime != null and params.endTime != ''">
AND create_time &lt;= #{params.endTime}
AND date_format(bill_time,'%Y%m%d') &lt;= date_format(#{params.endTime},'%Y%m%d')
</if>
</where>
order by task_id desc
@@ -53,7 +53,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
r.country_name_cn,
(select count(1) from prc_zone_detail d where d.zone_id = z.zone_id) as detail_count
from prc_zone z
left join bms_region r on r.region_id = z.region_id
left join region r on r.region_id = z.region_id
<where>
<if test="regionId != null">
AND z.region_id = #{regionId}
@@ -76,7 +76,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
count(distinct z.zone_id) as zone_count,
count(d.detail_id) as detail_count
from prc_zone z
inner join bms_region r on r.region_id = z.region_id
inner join region r on r.region_id = z.region_id
left join prc_zone_detail d on d.zone_id = z.zone_id
<where>
<if test="countryNameCn != null and countryNameCn != ''">
@@ -99,7 +99,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
(select count(1) from prc_zone_detail d
inner join prc_zone z on z.zone_id = d.zone_id
where z.region_id = r.region_id) as detail_count
from bms_region r
from region r
where r.region_id = #{regionId}
</select>