获取服务配置1

This commit is contained in:
xuelijun
2025-08-18 14:41:52 +08:00
parent ce643990d8
commit a99402c6b0
13 changed files with 269 additions and 145 deletions

View File

@@ -9,4 +9,7 @@
文档可见https://www.iocoder.cn/MyBatis/x-plugins/
-->
<delete id="deleteAdditionalFeeDates">
delete from tz_prod_additional_fee_dates where prod_id = #{configId} AND type = #{type}
</delete>
</mapper>

View File

@@ -25,11 +25,15 @@
<association property="prodEmergencyInfoVO" javaType="com.tashow.cloud.productapi.api.product.vo.prodemergencyresponse.ProdEmergencyInfoVO">
<id property="id" column="erc_record_id"/>
<result property="prodId" column="erc_prod_id"/>
<result property="responseTimeSlots" column="response_time_slots"/>
<result property="blacklistedDates" column="blacklisted_dates"/>
<result property="blackAppointDates" column="black_appoint_dates"/>
<result property="blackHappy" column="black_happy"/>
<result property="blackWeekend" column="black_weekend"/>
<result property="responseTimeSlots" column="erc_response_time_slots"/>
<!-- 嵌套集合:紧急响应时间区间 -->
<collection property="prodEmergencyResponseBlackList" ofType="com.tashow.cloud.productapi.api.product.vo.prodadditionalfeedates.ProdAdditionalFeeBlackVO">
<id property="id" column="erc_record_id"/>
<result property="dateType" column="erc_date_type"/>
<result property="customTimeSlots" column="erc_custom_time_slots"/>
<result property="type" column="erc_type"/>
<result property="isEnabled" column="erc_is_enabled"/>
</collection>
<!-- 嵌套集合:紧急响应时间区间 -->
<collection property="prodEmergencyResponseIntervalsList" ofType="com.tashow.cloud.productapi.api.product.dto.ProdEmergencyResponseIntervalsDO">
<id property="id" column="eri_record_id"/>
@@ -42,7 +46,7 @@
</collection>
</association>
<association property="prodReservationConfig" javaType="com.tashow.cloud.productapi.api.product.dto.ProdReservationConfigDO">
<association property="prodReservationConfig" javaType="com.tashow.cloud.productapi.api.product.vo.prodreservationconfig.ProdReservationInfoVO">
<id property="id" column="rc_record_id"/>
<result property="prodId" column="rc_prod_id"/>
<result property="reservationTimeSlots" column="rc_reservation_time_slots"/>
@@ -52,12 +56,14 @@
<result property="changeTimeRule" column="rc_change_time_rule"/>
<result property="timeSlot" column="rc_time_slot"/>
<result property="maxChangeTimes" column="rc_max_change_times"/>
<result property="blacklistedDates" column="rc_blacklisted_dates"/>
<result property="isBlacklisted" column="rc_is_blacklisted"/>
<result property="blackAppointDates" column="rc_black_appoint_dates"/>
<result property="isBlackAppoint" column="rc_is_black_appoint"/>
<result property="blackHappy" column="rc_black_happy"/>
<result property="blackWeekend" column="rc_black_weekend"/>
<!-- 嵌套集合:紧急响应时间区间 -->
<collection property="prodReservationBlackList" ofType="com.tashow.cloud.productapi.api.product.vo.prodadditionalfeedates.ProdAdditionalFeeBlackVO">
<id property="id" column="rcp_record_id"/>
<result property="dateType" column="rcp_date_type"/>
<result property="customTimeSlots" column="rcp_custom_time_slots"/>
<result property="type" column="rcp_type"/>
<result property="isEnabled" column="rcp_is_enabled"/>
</collection>
</association>
<!-- 映射接单上限配置 (productOrderLimitVO) -->
@@ -113,7 +119,7 @@
<result property="name" column="afd_name"/>
<result property="dateType" column="afd_date_type"/>
<result property="customTimeSlots" column="afd_custom_time_slots"/>
<result property="specificDates" column="afd_specific_dates"/>
<!-- <result property="specificDates" column="afd_specific_dates"/>-->
<result property="chargeMode" column="afd_charge_mode"/>
<result property="price" column="afd_price"/>
<result property="isEnabled" column="afd_is_enabled"/>
@@ -149,11 +155,15 @@
<association property="prodEmergencyInfoVO" javaType="com.tashow.cloud.productapi.api.product.vo.prodemergencyresponse.ProdEmergencyInfoVO">
<id property="id" column="erc_record_id"/>
<result property="prodId" column="erc_prod_id"/>
<result property="responseTimeSlots" column="response_time_slots"/>
<result property="blacklistedDates" column="blacklisted_dates"/>
<result property="blackAppointDates" column="black_appoint_dates"/>
<result property="blackHappy" column="black_happy"/>
<result property="blackWeekend" column="black_weekend"/>
<result property="responseTimeSlots" column="erc_response_time_slots"/>
<!-- 嵌套集合:紧急响应时间区间 -->
<collection property="prodEmergencyResponseBlackList" ofType="com.tashow.cloud.productapi.api.product.vo.prodadditionalfeedates.ProdAdditionalFeeBlackVO">
<id property="id" column="erc_record_id"/>
<result property="dateType" column="erc_date_type"/>
<result property="customTimeSlots" column="erc_custom_time_slots"/>
<result property="type" column="erc_type"/>
<result property="isEnabled" column="erc_is_enabled"/>
</collection>
<!-- 嵌套集合:紧急响应时间区间 -->
<collection property="prodEmergencyResponseIntervalsList" ofType="com.tashow.cloud.productapi.api.product.dto.ProdEmergencyResponseIntervalsDO">
<id property="id" column="eri_record_id"/>
@@ -166,7 +176,7 @@
</collection>
</association>
<association property="prodReservationConfig" javaType="com.tashow.cloud.productapi.api.product.dto.ProdReservationConfigDO">
<association property="prodReservationConfig" javaType="com.tashow.cloud.productapi.api.product.vo.prodreservationconfig.ProdReservationInfoVO">
<id property="id" column="rc_record_id"/>
<result property="prodId" column="rc_prod_id"/>
<result property="reservationTimeSlots" column="rc_reservation_time_slots"/>
@@ -176,12 +186,14 @@
<result property="changeTimeRule" column="rc_change_time_rule"/>
<result property="timeSlot" column="rc_time_slot"/>
<result property="maxChangeTimes" column="rc_max_change_times"/>
<result property="blacklistedDates" column="rc_blacklisted_dates"/>
<result property="isBlacklisted" column="rc_is_blacklisted"/>
<result property="blackAppointDates" column="rc_black_appoint_dates"/>
<result property="isBlackAppoint" column="rc_is_black_appoint"/>
<result property="blackHappy" column="rc_black_happy"/>
<result property="blackWeekend" column="rc_black_weekend"/>
<!-- 嵌套集合:紧急响应时间区间 -->
<collection property="prodReservationBlackList" ofType="com.tashow.cloud.productapi.api.product.vo.prodadditionalfeedates.ProdAdditionalFeeBlackVO">
<id property="id" column="rcp_record_id"/>
<result property="dateType" column="rcp_date_type"/>
<result property="customTimeSlots" column="rcp_custom_time_slots"/>
<result property="type" column="rcp_type"/>
<result property="isEnabled" column="rcp_is_enabled"/>
</collection>
</association>
<!-- 映射接单上限配置 (productOrderLimitVO) -->
@@ -224,7 +236,7 @@
<result property="name" column="afd_name"/>
<result property="dateType" column="afd_date_type"/>
<result property="customTimeSlots" column="afd_custom_time_slots"/>
<result property="specificDates" column="afd_specific_dates"/>
<!-- <result property="specificDates" column="afd_specific_dates"/>-->
<result property="chargeMode" column="afd_charge_mode"/>
<result property="price" column="afd_price"/>
<result property="isEnabled" column="afd_is_enabled"/>
@@ -256,18 +268,12 @@
p.category_name,
<!-- 只有当 emergencySwitch 开启时,才查询紧急响应相关字段 -->
<if test="emergencySwitch != null and emergencySwitch == 1">
erc.id AS erc_record_id,
erc.prod_id AS erc_prod_id,
erc.response_time_slots,
erc.blacklisted_dates,
erc.black_appoint_dates,
erc.black_happy,
erc.black_weekend,
erc.create_time AS erc_create_time,
erc.update_time AS erc_update_time,
erc.creator AS erc_creator,
erc.updater AS erc_updater,
erc.deleted AS erc_deleted,
erc.response_time_slots as erc_response_time_slots,
epafd.id AS erc_record_id,
epafd.date_type as erc_date_type,
epafd.custom_time_slots as erc_custom_time_slots,
epafd.type as erc_type,
epafd.is_enabled as erc_is_enabled,
eri.id AS eri_record_id,
eri.config_id AS eri_config_id,
eri.mode_name,
@@ -319,12 +325,11 @@
rc.change_time_rule AS rc_change_time_rule,
rc.time_slot AS rc_time_slot,
rc.max_change_times AS rc_max_change_times,
rc.blacklisted_dates AS rc_blacklisted_dates,
rc.is_blacklisted AS rc_is_blacklisted,
rc.black_appoint_dates AS rc_black_appoint_dates,
rc.is_black_appoint AS rc_is_black_appoint,
rc.black_happy AS rc_black_happy,
rc.black_weekend AS rc_black_weekend,
rpafd.id AS rcp_record_id,
rpafd.date_type as rcp_date_type,
rpafd.custom_time_slots as rcp_custom_time_slots,
rpafd.type as rcp_type,
rpafd.is_enabled as rcp_is_enabled,
</if>
<!-- 只有当 orderLimitSwitch 开启时,才查询接单上限配置相关字段 -->
<if test="orderLimitSwitch != null and orderLimitSwitch == 1">
@@ -355,16 +360,18 @@
<!-- 只有当 emergencySwitch 开启时才进行 LEFT JOIN -->
<if test="emergencySwitch != null and emergencySwitch == 1">
LEFT JOIN tz_prod_emergency_response erc ON p.prod_id = erc.prod_id AND erc.deleted = 0
LEFT JOIN tz_prod_additional_fee_dates epafd ON erc.prod_id = epafd.prod_id AND epafd.deleted = 0 AND epafd.type = 3
LEFT JOIN tz_prod_emergency_response_intervals eri ON erc.id = eri.config_id AND eri.deleted = 0
</if>
<if test="additionalFeeSwitch != null and additionalFeeSwitch == 1">
LEFT JOIN tz_prod_additional_fee_periods afp ON p.prod_id = afp.prod_id AND afp.deleted = 0
</if>
<if test="additionalSwitch != null and additionalSwitch == 1">
LEFT JOIN tz_prod_additional_fee_dates afd ON p.prod_id = afd.prod_id AND afd.deleted = 0
LEFT JOIN tz_prod_additional_fee_dates afd ON p.prod_id = afd.prod_id AND afd.deleted = 0 and afd.type = 1
</if>
<if test="reservationSwitch != null and reservationSwitch == 1">
LEFT JOIN tz_prod_reservation_config rc ON p.prod_id = rc.prod_id AND rc.deleted = 0
LEFT JOIN tz_prod_additional_fee_dates rpafd ON rc.id = rpafd.prod_id AND rpafd.deleted = 0 AND rpafd.type = 2
</if>
<if test="orderLimitSwitch != null and orderLimitSwitch == 1">
LEFT JOIN tz_product_order_limit ol ON p.prod_id = ol.prod_id AND ol.deleted = 0
@@ -398,18 +405,12 @@
p.region_switch,
<!-- 只有当 emergencySwitch 开启时,才查询紧急响应相关字段 -->
<if test="emergencySwitch != null and emergencySwitch == 1">
erc.id AS erc_record_id,
erc.prod_id AS erc_prod_id,
erc.response_time_slots,
erc.blacklisted_dates,
erc.black_appoint_dates,
erc.black_happy,
erc.black_weekend,
erc.create_time AS erc_create_time,
erc.update_time AS erc_update_time,
erc.creator AS erc_creator,
erc.updater AS erc_updater,
erc.deleted AS erc_deleted,
erc.response_time_slots as erc_response_time_slots,
epafd.id AS erc_record_id,
epafd.date_type as erc_date_type,
epafd.custom_time_slots as erc_custom_time_slots,
epafd.type as erc_type,
epafd.is_enabled as erc_is_enabled,
eri.id AS eri_record_id,
eri.config_id AS eri_config_id,
eri.mode_name,
@@ -461,12 +462,11 @@
rc.change_time_rule AS rc_change_time_rule,
rc.time_slot AS rc_time_slot,
rc.max_change_times AS rc_max_change_times,
rc.blacklisted_dates AS rc_blacklisted_dates,
rc.is_blacklisted AS rc_is_blacklisted,
rc.black_appoint_dates AS rc_black_appoint_dates,
rc.is_black_appoint AS rc_is_black_appoint,
rc.black_happy AS rc_black_happy,
rc.black_weekend AS rc_black_weekend,
rpafd.id AS rcp_record_id,
rpafd.date_type as rcp_date_type,
rpafd.custom_time_slots as rcp_custom_time_slots,
rpafd.type as rcp_type,
rpafd.is_enabled as rcp_is_enabled,
</if>
<!-- 只有当 orderLimitSwitch 开启时,才查询接单上限配置相关字段 -->
<if test="orderLimitSwitch != null and orderLimitSwitch == 1">
@@ -489,16 +489,18 @@
<!-- 只有当 emergencySwitch 开启时才进行 LEFT JOIN -->
<if test="emergencySwitch != null and emergencySwitch == 1">
LEFT JOIN tz_prod_emergency_response erc ON p.prod_id = erc.prod_id AND erc.deleted = 0
LEFT JOIN tz_prod_additional_fee_dates epafd ON erc.prod_id = epafd.prod_id AND epafd.deleted = 0 AND epafd.type = 3
LEFT JOIN tz_prod_emergency_response_intervals eri ON erc.id = eri.config_id AND eri.deleted = 0
</if>
<if test="additionalFeeSwitch != null and additionalFeeSwitch == 1">
LEFT JOIN tz_prod_additional_fee_periods afp ON p.prod_id = afp.prod_id AND afp.deleted = 0
</if>
<if test="additionalSwitch != null and additionalSwitch == 1">
LEFT JOIN tz_prod_additional_fee_dates afd ON p.prod_id = afd.prod_id AND afd.deleted = 0
LEFT JOIN tz_prod_additional_fee_dates afd ON p.prod_id = afd.prod_id AND afd.deleted = 0 afd.type = 1
</if>
<if test="reservationSwitch != null and reservationSwitch == 1">
LEFT JOIN tz_prod_reservation_config rc ON p.prod_id = rc.prod_id AND rc.deleted = 0
LEFT JOIN tz_prod_additional_fee_dates rpafd ON rc.id = rpafd.prod_id AND rpafd.deleted = 0 AND rpafd.type = 2
</if>
<if test="orderLimitSwitch != null and orderLimitSwitch == 1">
LEFT JOIN tz_product_order_limit ol ON p.prod_id = ol.prod_id AND ol.deleted = 0

View File

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