获取服务配置1
This commit is contained in:
@@ -7,6 +7,7 @@ import com.tashow.cloud.mybatis.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import com.tashow.cloud.mybatis.mybatis.core.mapper.BaseMapperX;
|
||||
import com.tashow.cloud.productapi.api.product.dto.ProdAdditionalFeeDatesDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* 特殊日期附加费用规则 Mapper
|
||||
@@ -16,5 +17,9 @@ import org.apache.ibatis.annotations.Mapper;
|
||||
@Mapper
|
||||
public interface ProdAdditionalFeeDatesMapper extends BaseMapperX<ProdAdditionalFeeDatesDO> {
|
||||
|
||||
/**
|
||||
* 删除关联
|
||||
*/
|
||||
public int deleteAdditionalFeeDates(@Param("prodId")Long prodId,@Param("type")Integer type);
|
||||
|
||||
}
|
||||
@@ -7,6 +7,7 @@ import com.tashow.cloud.mybatis.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import com.tashow.cloud.mybatis.mybatis.core.mapper.BaseMapperX;
|
||||
import com.tashow.cloud.productapi.api.product.dto.ProdReservationConfigDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* 商品预约配置 Mapper
|
||||
@@ -17,4 +18,8 @@ import org.apache.ibatis.annotations.Mapper;
|
||||
public interface ProdReservationConfigMapper extends BaseMapperX<ProdReservationConfigDO> {
|
||||
|
||||
|
||||
/**
|
||||
* 删除关联
|
||||
*/
|
||||
public int deleteReservationConfig(@Param("prodId")Long prodId);
|
||||
}
|
||||
@@ -12,6 +12,8 @@ import com.tashow.cloud.product.service.ProdPropService;
|
||||
import com.tashow.cloud.product.service.ProdService;
|
||||
|
||||
import com.tashow.cloud.productapi.api.product.vo.prod.*;
|
||||
import com.tashow.cloud.productapi.api.product.vo.prodadditionalfeedates.ProdAdditionalFeeBlackVO;
|
||||
import com.tashow.cloud.productapi.api.product.vo.prodreservationconfig.ProdReservationInfoVO;
|
||||
import com.tashow.cloud.productapi.api.product.vo.sku.SkuPageReqVO;
|
||||
import com.tashow.cloud.productapi.api.product.vo.sku.SkuRecycleBinVO;
|
||||
import com.tashow.cloud.productapi.enums.BaseEnum;
|
||||
@@ -123,12 +125,12 @@ public class ProdServiceImpl implements ProdService {
|
||||
}
|
||||
}
|
||||
//预约设置设置
|
||||
if (Objects.equals(prodServiceVO.getReservationSwitch(), BaseEnum.YES_ONE.getKey())) {
|
||||
/*if (Objects.equals(prodServiceVO.getReservationSwitch(), BaseEnum.YES_ONE.getKey())) {
|
||||
prodDO.setReservationSwitch(BaseEnum.YES_ONE.getKey());
|
||||
ProdReservationConfigDO prodReservationConfigDO = prodServiceVO.prodReservationConfig;
|
||||
ProdReservationInfoVO prodReservationConfigDO = prodServiceVO.getProdReservationConfig();
|
||||
prodReservationConfigDO.setProdId(prodDO.getProdId());
|
||||
prodReservationConfigMapper.insert(prodReservationConfigDO);
|
||||
}
|
||||
}*/
|
||||
//紧急响应设置
|
||||
if (Objects.equals(prodServiceVO.getEmergencySwitch(), BaseEnum.YES_ONE.getKey())) {
|
||||
prodDO.setEmergencySwitch(BaseEnum.YES_ONE.getKey());
|
||||
@@ -235,15 +237,35 @@ public class ProdServiceImpl implements ProdService {
|
||||
.eq(ProdReservationConfigDO::getProdId, prodServiceVO.getProdId()));
|
||||
if (reservationConfig == null) {
|
||||
prod.setReservationSwitch(BaseEnum.YES_ONE.getKey());
|
||||
ProdReservationConfigDO prodReservationConfigDO = prodServiceVO.getProdReservationConfig();
|
||||
ProdReservationInfoVO prodReservationInfoVO = prodServiceVO.getProdReservationConfig();
|
||||
ProdReservationConfigDO prodReservationConfigDO = BeanUtils.toBean(prodReservationInfoVO, ProdReservationConfigDO.class);
|
||||
prodReservationConfigDO.setProdId(prod.getProdId());
|
||||
prodReservationConfigDO.setTimeBook(prodServiceVO.getProdReservationConfig().getTimeBook());
|
||||
prodReservationConfigDO.setReservationTimeSlots(prodServiceVO.getProdReservationConfig().getReservationTimeSlots());
|
||||
prodReservationConfigMapper.insert(prodReservationConfigDO);
|
||||
if(prodServiceVO.getProdReservationConfig().getProdReservationBlackList()!=null){
|
||||
for (ProdAdditionalFeeBlackVO prodAdditionalFeeBlackVO : prodServiceVO.getProdReservationConfig().getProdReservationBlackList()) {
|
||||
ProdAdditionalFeeDatesDO prodAdditionalFeeDatesDO = BeanUtils.toBean(prodAdditionalFeeBlackVO, ProdAdditionalFeeDatesDO.class);
|
||||
prodAdditionalFeeDatesDO.setProdId(prod.getProdId());
|
||||
prodAdditionalFeeDatesDO.setType(2);
|
||||
prodAdditionalFeeDatesMapper.insert(prodAdditionalFeeDatesDO);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
prodServiceVO.getProdReservationConfig().setTimeBook(prodServiceVO.getProdReservationConfig().getTimeBook());
|
||||
prodServiceVO.getProdReservationConfig().setReservationTimeSlots(prodServiceVO.getProdReservationConfig().getReservationTimeSlots());
|
||||
prodReservationConfigMapper.updateById(prodServiceVO.getProdReservationConfig());
|
||||
ProdReservationConfigDO prodReservationConfigDO = BeanUtils.toBean(prodServiceVO.getProdReservationConfig(), ProdReservationConfigDO.class);
|
||||
prodReservationConfigDO.setTimeBook(prodServiceVO.getProdReservationConfig().getTimeBook());
|
||||
prodReservationConfigDO.setReservationTimeSlots(prodServiceVO.getProdReservationConfig().getReservationTimeSlots());
|
||||
prodReservationConfigMapper.updateById(prodReservationConfigDO);
|
||||
//先删除在新增
|
||||
prodAdditionalFeeDatesMapper.deleteAdditionalFeeDates(prod.getProdId(),2);
|
||||
if(prodServiceVO.getProdReservationConfig().getProdReservationBlackList()!=null){
|
||||
for (ProdAdditionalFeeBlackVO prodAdditionalFeeBlackVO : prodServiceVO.getProdReservationConfig().getProdReservationBlackList()) {
|
||||
ProdAdditionalFeeDatesDO prodAdditionalFeeDatesDO = BeanUtils.toBean(prodAdditionalFeeBlackVO, ProdAdditionalFeeDatesDO.class);
|
||||
prodAdditionalFeeDatesDO.setProdId(prod.getProdId());
|
||||
prodAdditionalFeeDatesDO.setType(2);
|
||||
prodAdditionalFeeDatesMapper.insert(prodAdditionalFeeDatesDO);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
//紧急响应设置
|
||||
@@ -263,7 +285,14 @@ public class ProdServiceImpl implements ProdService {
|
||||
prodEmergencyResponseIntervalsMapper.insert(prodEmergencyResponseIntervals);
|
||||
}
|
||||
}
|
||||
|
||||
if(prodServiceVO.getProdEmergencyInfoVO().getProdEmergencyResponseBlackList()!=null){
|
||||
for (ProdAdditionalFeeBlackVO prodAdditionalFeeBlackVO : prodServiceVO.getProdEmergencyInfoVO().getProdEmergencyResponseBlackList()) {
|
||||
ProdAdditionalFeeDatesDO prodAdditionalFeeDatesDO = BeanUtils.toBean(prodAdditionalFeeBlackVO, ProdAdditionalFeeDatesDO.class);
|
||||
prodAdditionalFeeDatesDO.setProdId(prod.getProdId());
|
||||
prodAdditionalFeeDatesDO.setType(3);
|
||||
prodAdditionalFeeDatesMapper.insert(prodAdditionalFeeDatesDO);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
ProdEmergencyResponseDO prodEmergencyResponse = BeanUtils.toBean(prodServiceVO.getProdEmergencyInfoVO(), ProdEmergencyResponseDO.class);
|
||||
if (prodEmergencyResponse != null) {
|
||||
@@ -276,6 +305,15 @@ public class ProdServiceImpl implements ProdService {
|
||||
prodEmergencyResponseIntervalsMapper.insert(prodEmergencyResponseIntervals);
|
||||
}
|
||||
}
|
||||
//先删除在新增
|
||||
prodAdditionalFeeDatesMapper.deleteAdditionalFeeDates(prod.getProdId(),3);
|
||||
if(prodServiceVO.getProdReservationConfig().getProdReservationBlackList()!=null){
|
||||
for (ProdAdditionalFeeBlackVO prodAdditionalFeeBlackVO : prodServiceVO.getProdReservationConfig().getProdReservationBlackList()) {
|
||||
ProdAdditionalFeeDatesDO prodAdditionalFeeDatesDO = BeanUtils.toBean(prodAdditionalFeeBlackVO, ProdAdditionalFeeDatesDO.class);
|
||||
prodAdditionalFeeDatesDO.setProdId(prod.getProdId());
|
||||
prodAdditionalFeeDatesMapper.insert(prodAdditionalFeeDatesDO);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -298,6 +336,7 @@ public class ProdServiceImpl implements ProdService {
|
||||
for (ProdAdditionalFeeDatesDO prodAdditionalFeeDates : prodServiceVO.getProdAdditionalFeeDatesList()) {
|
||||
if (prodAdditionalFeeDates.getId() == null) {
|
||||
prodAdditionalFeeDates.setProdId(prodServiceVO.getProdId());
|
||||
prodAdditionalFeeDates.setType(1);
|
||||
prodAdditionalFeeDatesMapper.insert(prodAdditionalFeeDates);
|
||||
} else {
|
||||
prodAdditionalFeeDatesMapper.updateById(prodAdditionalFeeDates);
|
||||
|
||||
@@ -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>
|
||||
@@ -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
|
||||
|
||||
@@ -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>
|
||||
Reference in New Issue
Block a user