获取服务配置2

This commit is contained in:
xuelijun
2025-08-19 18:27:27 +08:00
parent a99402c6b0
commit a5f992c090
17 changed files with 353 additions and 48 deletions

View File

@@ -10,6 +10,6 @@
-->
<delete id="deleteAdditionalFeeDates">
delete from tz_prod_additional_fee_dates where prod_id = #{configId} AND type = #{type}
delete from tz_prod_additional_fee_dates where prod_id = #{prodId} AND type = #{type}
</delete>
</mapper>

View File

@@ -89,17 +89,21 @@
<!-- 新增:映射体重区间价格配置列表 (prodWeightConfigList) -->
<collection property="prodWeightConfig" ofType="com.tashow.cloud.productapi.api.product.dto.ProdWeightRangePricesDO">
<id property="id" column="wrp_record_id"/>
<result property="prodId" column="wrp_prod_id"/>
<result property="weightRange" column="wrp_weight_range"/> <!-- 注意:数据库列是 weight_range -->
<result property="price" column="wrp_price"/>
<result property="isEnabled" column="wrp_is_enabled"/>
<!-- <result property="createTime" column="wrp_create_time"/> -->
<!-- <result property="updateTime" column="wrp_update_time"/> -->
<!-- <result property="creator" column="wrp_creator"/> -->
<!-- <result property="updater" column="wrp_updater"/> -->
</collection>
<association property="prodWeightConfig" javaType="com.tashow.cloud.productapi.api.product.vo.prodweightrangeprices.ProdWeightRangePricesSaveInfoVO">
<result property="isWeightCharge" column="tpe_is_weight_charge"/>
<!-- 新增:映射体重区间价格配置列表 (prodWeightConfigList) -->
<collection property="prodWeightConfigList" ofType="com.tashow.cloud.productapi.api.product.dto.ProdWeightRangePricesDO">
<id property="id" column="wrp_record_id"/>
<result property="prodId" column="wrp_prod_id"/>
<result property="weightRange" column="wrp_weight_range"/> <!-- 注意:数据库列是 weight_range -->
<result property="price" column="wrp_price"/>
<result property="isEnabled" column="wrp_is_enabled"/>
<!-- <result property="createTime" column="wrp_create_time"/> -->
<!-- <result property="updateTime" column="wrp_update_time"/> -->
<!-- <result property="creator" column="wrp_creator"/> -->
<!-- <result property="updater" column="wrp_updater"/> -->
</collection>
</association>
<!-- 新增:映射特殊日期规则配置列表 (prodAdditionalFeePeriodsList) -->
<collection property="prodAdditionalFeePeriodsList" ofType="com.tashow.cloud.productapi.api.product.dto.ProdAdditionalFeePeriodsDO">
@@ -204,19 +208,23 @@
<result property="maxOrders" column="ol_max_orders"/>
</association>
<association property="prodWeightConfig" javaType="com.tashow.cloud.productapi.api.product.vo.prodweightrangeprices.ProdWeightRangePricesSaveInfoVO">
<result property="isWeightCharge" column="tpe_is_weight_charge"/>
<!-- 新增:映射体重区间价格配置列表 (prodWeightConfigList) -->
<collection property="prodWeightConfigList" ofType="com.tashow.cloud.productapi.api.product.dto.ProdWeightRangePricesDO">
<id property="id" column="wrp_record_id"/>
<result property="prodId" column="wrp_prod_id"/>
<result property="weightRange" column="wrp_weight_range"/> <!-- 注意:数据库列是 weight_range -->
<result property="price" column="wrp_price"/>
<result property="isEnabled" column="wrp_is_enabled"/>
<!-- <result property="createTime" column="wrp_create_time"/> -->
<!-- <result property="updateTime" column="wrp_update_time"/> -->
<!-- <result property="creator" column="wrp_creator"/> -->
<!-- <result property="updater" column="wrp_updater"/> -->
</collection>
</association>
<!-- 新增:映射体重区间价格配置列表 (prodWeightConfigList) -->
<collection property="prodWeightConfig" ofType="com.tashow.cloud.productapi.api.product.dto.ProdWeightRangePricesDO">
<id property="id" column="wrp_record_id"/>
<result property="prodId" column="wrp_prod_id"/>
<result property="weightRange" column="wrp_weight_range"/> <!-- 注意:数据库列是 weight_range -->
<result property="price" column="wrp_price"/>
<result property="isEnabled" column="wrp_is_enabled"/>
<!-- <result property="createTime" column="wrp_create_time"/> -->
<!-- <result property="updateTime" column="wrp_update_time"/> -->
<!-- <result property="creator" column="wrp_creator"/> -->
<!-- <result property="updater" column="wrp_updater"/> -->
</collection>
<!-- 新增:映射特殊日期规则配置列表 (prodAdditionalFeePeriodsList) -->
<collection property="prodAdditionalFeePeriodsList" ofType="com.tashow.cloud.productapi.api.product.dto.ProdAdditionalFeePeriodsDO">
@@ -268,6 +276,7 @@
p.category_name,
<!-- 只有当 emergencySwitch 开启时,才查询紧急响应相关字段 -->
<if test="emergencySwitch != null and emergencySwitch == 1">
erc.id AS erc_record_id,
erc.response_time_slots as erc_response_time_slots,
epafd.id AS erc_record_id,
epafd.date_type as erc_date_type,
@@ -340,6 +349,7 @@
</if>
<!-- 只有当 weightSwitch 开启时,才查询体重区间价格相关字段 -->
<if test="weightSwitch != null and weightSwitch == 1">
tpe.is_weight_charge as tpe_is_weight_charge,
wrp.id AS wrp_record_id,
wrp.prod_id AS wrp_prod_id,
wrp.weight_range AS wrp_weight_range,
@@ -377,6 +387,7 @@
LEFT JOIN tz_product_order_limit ol ON p.prod_id = ol.prod_id AND ol.deleted = 0
</if>
<if test="weightSwitch != null and weightSwitch == 1">
LEFT JOIN tz_prod_extend tpe ON p.prod_id = tpe.prod_id
LEFT JOIN tz_prod_weight_range_prices wrp ON p.prod_id = wrp.prod_id AND wrp.deleted = 0
</if>
<if test="regionSwitch != null and regionSwitch == 1">
@@ -405,6 +416,7 @@
p.region_switch,
<!-- 只有当 emergencySwitch 开启时,才查询紧急响应相关字段 -->
<if test="emergencySwitch != null and emergencySwitch == 1">
erc.id AS erc_record_id,
erc.response_time_slots as erc_response_time_slots,
epafd.id AS erc_record_id,
epafd.date_type as erc_date_type,
@@ -477,6 +489,7 @@
</if>
<!-- 只有当 weightSwitch 开启时,才查询体重区间价格相关字段 -->
<if test="weightSwitch != null and weightSwitch == 1">
tpe.is_weight_charge as tpe_is_weight_charge,
wrp.id AS wrp_record_id,
wrp.prod_id AS wrp_prod_id,
wrp.weight_range AS wrp_weight_range,
@@ -506,6 +519,7 @@
LEFT JOIN tz_product_order_limit ol ON p.prod_id = ol.prod_id AND ol.deleted = 0
</if>
<if test="weightSwitch != null and weightSwitch == 1">
LEFT JOIN tz_prod_extend tpe ON p.prod_id = tpe.prod_id
LEFT JOIN tz_prod_weight_range_prices wrp ON p.prod_id = wrp.prod_id AND wrp.deleted = 0
</if>
where p.deleted = 0

View File

@@ -9,6 +9,6 @@
文档可见https://www.iocoder.cn/MyBatis/x-plugins/
-->
<delete id="deleteReservationConfig">
delete from tz_prod_reservation_config where prod_id = #{configId}
delete from tz_prod_reservation_config where prod_id = #{prodId}
</delete>
</mapper>

View File

@@ -8,5 +8,7 @@
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
文档可见https://www.iocoder.cn/MyBatis/x-plugins/
-->
<delete id="deleteWeightRangePrices">
delete from tz_prod_weight_range_prices where prod_id = #{prodId}
</delete>
</mapper>