获取服务配置1
This commit is contained in:
@@ -43,16 +43,22 @@ public class ProdAdditionalFeeDatesDO extends BaseDO {
|
|||||||
* 日期类型0:'自定义日期范围':1:'指定日期':2:'法定节假日',3:'固定休息日'
|
* 日期类型0:'自定义日期范围':1:'指定日期':2:'法定节假日',3:'固定休息日'
|
||||||
*/
|
*/
|
||||||
private Integer dateType;
|
private Integer dateType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 自定义日期时间段
|
* 类型:1:特殊日期 2:可预约时段黑名单日期 3:紧急相应服务黑名单日期
|
||||||
|
*/
|
||||||
|
private Integer type;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 日期
|
||||||
*/
|
*/
|
||||||
@TableField(typeHandler = StringListTypeHandler.class)
|
@TableField(typeHandler = StringListTypeHandler.class)
|
||||||
private List<String> customTimeSlots;
|
private List<String> customTimeSlots;
|
||||||
/**
|
/* *//**
|
||||||
* 指定日期
|
* 指定日期
|
||||||
*/
|
*//*
|
||||||
@TableField(typeHandler = StringListTypeHandler.class)
|
@TableField(typeHandler = StringListTypeHandler.class)
|
||||||
private List<String> specificDates;
|
private List<String> specificDates;*/
|
||||||
/**
|
/**
|
||||||
* 收费方式0:''固定金额'':1:''基准价上浮
|
* 收费方式0:''固定金额'':1:''基准价上浮
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -39,23 +39,5 @@ public class ProdEmergencyResponseDO extends BaseDO {
|
|||||||
*/
|
*/
|
||||||
@TableField(typeHandler = StringListTypeHandler.class)
|
@TableField(typeHandler = StringListTypeHandler.class)
|
||||||
private List<String> responseTimeSlots;
|
private List<String> responseTimeSlots;
|
||||||
/**
|
|
||||||
* 黑名自定义日期
|
|
||||||
*/
|
|
||||||
@TableField(typeHandler = StringListTypeHandler.class)
|
|
||||||
private List<String> blacklistedDates;
|
|
||||||
/**
|
|
||||||
* 黑名单指定日期
|
|
||||||
*/
|
|
||||||
@TableField(typeHandler = StringListTypeHandler.class)
|
|
||||||
private List<String> blackAppointDates;
|
|
||||||
/**
|
|
||||||
* 法定节假日是否开启0:关闭1开启
|
|
||||||
*/
|
|
||||||
private Integer blackHappy;
|
|
||||||
/**
|
|
||||||
* 固定休息日周末是否开启0关闭1开启
|
|
||||||
*/
|
|
||||||
private Integer blackWeekend;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -66,37 +66,6 @@ public class ProdReservationConfigDO extends BaseDO {
|
|||||||
* 允许更改预约时间的最大次数
|
* 允许更改预约时间的最大次数
|
||||||
*/
|
*/
|
||||||
private Integer maxChangeTimes;
|
private Integer maxChangeTimes;
|
||||||
/**
|
|
||||||
* 黑名自定义日期
|
|
||||||
*/
|
|
||||||
@TableField(typeHandler = StringListTypeHandler.class)
|
|
||||||
private List<String> blacklistedDates;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* '是否开启黑名单自定义0关1开'
|
|
||||||
*/
|
|
||||||
private Integer isBlacklisted;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* '是否开启黑名单指定日期0关1开'
|
|
||||||
*/
|
|
||||||
private Integer isBlackAppoint;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 黑名单指定日期
|
|
||||||
*/
|
|
||||||
//private String blackAppointDates;
|
|
||||||
@TableField(typeHandler = StringListTypeHandler.class)
|
|
||||||
private List<String> blackAppointDates;
|
|
||||||
/**
|
|
||||||
* 法定节假日是否开启0:关闭1开启
|
|
||||||
*/
|
|
||||||
private Integer blackHappy;
|
|
||||||
/**
|
|
||||||
* 固定休息日周末是否开启0关闭1开启
|
|
||||||
*/
|
|
||||||
private Integer blackWeekend;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 预约时间区间设置
|
* 预约时间区间设置
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package com.tashow.cloud.productapi.api.product.vo.prod;
|
|||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import com.tashow.cloud.productapi.api.product.vo.prodemergencyresponse.ProdEmergencyInfoVO;
|
import com.tashow.cloud.productapi.api.product.vo.prodemergencyresponse.ProdEmergencyInfoVO;
|
||||||
|
import com.tashow.cloud.productapi.api.product.vo.prodreservationconfig.ProdReservationInfoVO;
|
||||||
import com.tashow.cloud.productapi.api.product.vo.prodserviceareas.ProdServiceAreasInfoVO;
|
import com.tashow.cloud.productapi.api.product.vo.prodserviceareas.ProdServiceAreasInfoVO;
|
||||||
import com.tashow.cloud.productapi.api.product.dto.*;
|
import com.tashow.cloud.productapi.api.product.dto.*;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
@@ -43,7 +44,7 @@ public class ProdServiceVO {
|
|||||||
@Schema(description = "是否预约0关1开")
|
@Schema(description = "是否预约0关1开")
|
||||||
private Integer reservationSwitch;
|
private Integer reservationSwitch;
|
||||||
@Schema(description = "预约配置")
|
@Schema(description = "预约配置")
|
||||||
public ProdReservationConfigDO prodReservationConfig;
|
public ProdReservationInfoVO prodReservationConfig;
|
||||||
|
|
||||||
@Schema(description = "是否紧急响应服务0关1开")
|
@Schema(description = "是否紧急响应服务0关1开")
|
||||||
private Integer emergencySwitch;
|
private Integer emergencySwitch;
|
||||||
|
|||||||
@@ -0,0 +1,41 @@
|
|||||||
|
package com.tashow.cloud.productapi.api.product.vo.prodadditionalfeedates;
|
||||||
|
|
||||||
|
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||||
|
import com.alibaba.excel.annotation.ExcelProperty;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.tashow.cloud.productapi.general.StringListTypeHandler;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Schema(description = "管理后台 - 特殊日期附加费用规则 Response VO")
|
||||||
|
@Data
|
||||||
|
@ExcelIgnoreUnannotated
|
||||||
|
public class ProdAdditionalFeeBlackVO {
|
||||||
|
|
||||||
|
@Schema(description = "特殊日期规则的唯一标识符")
|
||||||
|
@ExcelProperty("特殊日期规则的唯一标识符")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@Schema(description = "日期类型0:'自定义日期范围':1:'指定日期':2:'法定节假日',3:'固定休息日'")
|
||||||
|
@ExcelProperty("日期类型0:'自定义日期范围':1:'指定日期':2:'法定节假日',3:'固定休息日'")
|
||||||
|
private Integer dateType;
|
||||||
|
|
||||||
|
@Schema(description = "黑名单日期设置")
|
||||||
|
@ExcelProperty("黑名单日期设置")
|
||||||
|
@TableField(typeHandler = StringListTypeHandler.class)
|
||||||
|
private List<String> customTimeSlots;
|
||||||
|
|
||||||
|
|
||||||
|
@Schema(description = "类型:1:特殊日期 2:可预约时段黑名单日期 3:紧急相应服务黑名单日期")
|
||||||
|
@ExcelProperty("类型:1:特殊日期 2:可预约时段黑名单日期 3:紧急相应服务黑名单日期")
|
||||||
|
private Integer type;
|
||||||
|
|
||||||
|
@Schema(description = "是否启用该规则是否启用该规则0关1开", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
@ExcelProperty("是否启用该规则是否启用该规则0关1开")
|
||||||
|
private Integer isEnabled;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,7 +1,10 @@
|
|||||||
package com.tashow.cloud.productapi.api.product.vo.prodemergencyresponse;
|
package com.tashow.cloud.productapi.api.product.vo.prodemergencyresponse;
|
||||||
|
|
||||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import com.tashow.cloud.productapi.api.product.dto.ProdEmergencyResponseIntervalsDO;
|
import com.tashow.cloud.productapi.api.product.dto.ProdEmergencyResponseIntervalsDO;
|
||||||
|
import com.tashow.cloud.productapi.api.product.vo.prodadditionalfeedates.ProdAdditionalFeeBlackVO;
|
||||||
|
import com.tashow.cloud.productapi.general.StringListTypeHandler;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
@@ -24,27 +27,12 @@ public class ProdEmergencyInfoVO {
|
|||||||
/**
|
/**
|
||||||
* 可响应时间段
|
* 可响应时间段
|
||||||
*/
|
*/
|
||||||
|
@TableField(typeHandler = StringListTypeHandler.class)
|
||||||
private List<String> responseTimeSlots;
|
private List<String> responseTimeSlots;
|
||||||
/**
|
|
||||||
* 黑名自定义日期
|
|
||||||
*/
|
|
||||||
private List<String> blacklistedDates;
|
|
||||||
/**
|
|
||||||
* 黑名单指定日期
|
|
||||||
*/
|
|
||||||
private List<String> blackAppointDates;
|
|
||||||
/**
|
|
||||||
* 法定节假日是否开启0:关闭1开启
|
|
||||||
*/
|
|
||||||
private Integer blackHappy;
|
|
||||||
/**
|
|
||||||
* 固定休息日周末是否开启0关闭1开启
|
|
||||||
*/
|
|
||||||
private Integer blackWeekend;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Schema(description = "紧急响应时间区间设置")
|
@Schema(description = "紧急响应时间区间设置")
|
||||||
public List<ProdEmergencyResponseIntervalsDO> prodEmergencyResponseIntervalsList;
|
public List<ProdEmergencyResponseIntervalsDO> prodEmergencyResponseIntervalsList;
|
||||||
|
|
||||||
|
@Schema(description = "紧急响应黑名单日期设置")
|
||||||
|
public List<ProdAdditionalFeeBlackVO> prodEmergencyResponseBlackList;
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,81 @@
|
|||||||
|
package com.tashow.cloud.productapi.api.product.vo.prodreservationconfig;
|
||||||
|
|
||||||
|
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.tashow.cloud.productapi.api.product.dto.ProdEmergencyResponseIntervalsDO;
|
||||||
|
import com.tashow.cloud.productapi.api.product.vo.prodadditionalfeedates.ProdAdditionalFeeBlackVO;
|
||||||
|
import com.tashow.cloud.productapi.general.StringListTypeHandler;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Schema(description = "管理后台 - 商品紧急响应服务设置 Response VO")
|
||||||
|
@Data
|
||||||
|
@ExcelIgnoreUnannotated
|
||||||
|
public class ProdReservationInfoVO {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 预约配置的唯一标识符
|
||||||
|
*/
|
||||||
|
@TableId
|
||||||
|
private Long id;
|
||||||
|
/**
|
||||||
|
* 关联的商品ID
|
||||||
|
*/
|
||||||
|
private Long prodId;
|
||||||
|
/**
|
||||||
|
* 预约时段设置
|
||||||
|
*/
|
||||||
|
@TableField(typeHandler = StringListTypeHandler.class)
|
||||||
|
private List<String> reservationTimeSlots;
|
||||||
|
/**
|
||||||
|
* 需提前多少小时预约
|
||||||
|
*/
|
||||||
|
private Integer advanceHours;
|
||||||
|
/**
|
||||||
|
* 预约日期范围 7天 10天 15天 30天
|
||||||
|
*/
|
||||||
|
private Integer reservationDateRange;
|
||||||
|
/**
|
||||||
|
* 是否允许更改预约时间 1可以 0不可以
|
||||||
|
*/
|
||||||
|
private Integer allowChange;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 时间段
|
||||||
|
*/
|
||||||
|
private Integer timeSlot;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更改预约时间的时间规则(如服务开始前1小时可更改)
|
||||||
|
*/
|
||||||
|
private Integer changeTimeRule;
|
||||||
|
/**
|
||||||
|
* 允许更改预约时间的最大次数
|
||||||
|
*/
|
||||||
|
private Integer maxChangeTimes;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 预约时间区间设置
|
||||||
|
*/
|
||||||
|
@TableField(exist=false)
|
||||||
|
private TimeBookVO timeBook;
|
||||||
|
|
||||||
|
public TimeBookVO getTimeBook() {
|
||||||
|
if (this.timeBook == null) {
|
||||||
|
this.timeBook = new TimeBookVO();
|
||||||
|
this.timeBook.setTimeSlot(this.timeSlot);
|
||||||
|
this.timeBook.setReservationTimeSlots(this.reservationTimeSlots);
|
||||||
|
}
|
||||||
|
return this.timeBook;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTimeBook(TimeBookVO timeBook) {
|
||||||
|
this.timeBook = timeBook;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Schema(description = "预约黑名单日期设置")
|
||||||
|
public List<ProdAdditionalFeeBlackVO> prodReservationBlackList;
|
||||||
|
}
|
||||||
@@ -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.mybatis.mybatis.core.mapper.BaseMapperX;
|
||||||
import com.tashow.cloud.productapi.api.product.dto.ProdAdditionalFeeDatesDO;
|
import com.tashow.cloud.productapi.api.product.dto.ProdAdditionalFeeDatesDO;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 特殊日期附加费用规则 Mapper
|
* 特殊日期附加费用规则 Mapper
|
||||||
@@ -16,5 +17,9 @@ import org.apache.ibatis.annotations.Mapper;
|
|||||||
@Mapper
|
@Mapper
|
||||||
public interface ProdAdditionalFeeDatesMapper extends BaseMapperX<ProdAdditionalFeeDatesDO> {
|
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.mybatis.mybatis.core.mapper.BaseMapperX;
|
||||||
import com.tashow.cloud.productapi.api.product.dto.ProdReservationConfigDO;
|
import com.tashow.cloud.productapi.api.product.dto.ProdReservationConfigDO;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 商品预约配置 Mapper
|
* 商品预约配置 Mapper
|
||||||
@@ -17,4 +18,8 @@ import org.apache.ibatis.annotations.Mapper;
|
|||||||
public interface ProdReservationConfigMapper extends BaseMapperX<ProdReservationConfigDO> {
|
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.product.service.ProdService;
|
||||||
|
|
||||||
import com.tashow.cloud.productapi.api.product.vo.prod.*;
|
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.SkuPageReqVO;
|
||||||
import com.tashow.cloud.productapi.api.product.vo.sku.SkuRecycleBinVO;
|
import com.tashow.cloud.productapi.api.product.vo.sku.SkuRecycleBinVO;
|
||||||
import com.tashow.cloud.productapi.enums.BaseEnum;
|
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());
|
prodDO.setReservationSwitch(BaseEnum.YES_ONE.getKey());
|
||||||
ProdReservationConfigDO prodReservationConfigDO = prodServiceVO.prodReservationConfig;
|
ProdReservationInfoVO prodReservationConfigDO = prodServiceVO.getProdReservationConfig();
|
||||||
prodReservationConfigDO.setProdId(prodDO.getProdId());
|
prodReservationConfigDO.setProdId(prodDO.getProdId());
|
||||||
prodReservationConfigMapper.insert(prodReservationConfigDO);
|
prodReservationConfigMapper.insert(prodReservationConfigDO);
|
||||||
}
|
}*/
|
||||||
//紧急响应设置
|
//紧急响应设置
|
||||||
if (Objects.equals(prodServiceVO.getEmergencySwitch(), BaseEnum.YES_ONE.getKey())) {
|
if (Objects.equals(prodServiceVO.getEmergencySwitch(), BaseEnum.YES_ONE.getKey())) {
|
||||||
prodDO.setEmergencySwitch(BaseEnum.YES_ONE.getKey());
|
prodDO.setEmergencySwitch(BaseEnum.YES_ONE.getKey());
|
||||||
@@ -235,15 +237,35 @@ public class ProdServiceImpl implements ProdService {
|
|||||||
.eq(ProdReservationConfigDO::getProdId, prodServiceVO.getProdId()));
|
.eq(ProdReservationConfigDO::getProdId, prodServiceVO.getProdId()));
|
||||||
if (reservationConfig == null) {
|
if (reservationConfig == null) {
|
||||||
prod.setReservationSwitch(BaseEnum.YES_ONE.getKey());
|
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.setProdId(prod.getProdId());
|
||||||
prodReservationConfigDO.setTimeBook(prodServiceVO.getProdReservationConfig().getTimeBook());
|
prodReservationConfigDO.setTimeBook(prodServiceVO.getProdReservationConfig().getTimeBook());
|
||||||
prodReservationConfigDO.setReservationTimeSlots(prodServiceVO.getProdReservationConfig().getReservationTimeSlots());
|
prodReservationConfigDO.setReservationTimeSlots(prodServiceVO.getProdReservationConfig().getReservationTimeSlots());
|
||||||
prodReservationConfigMapper.insert(prodReservationConfigDO);
|
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 {
|
} else {
|
||||||
prodServiceVO.getProdReservationConfig().setTimeBook(prodServiceVO.getProdReservationConfig().getTimeBook());
|
ProdReservationConfigDO prodReservationConfigDO = BeanUtils.toBean(prodServiceVO.getProdReservationConfig(), ProdReservationConfigDO.class);
|
||||||
prodServiceVO.getProdReservationConfig().setReservationTimeSlots(prodServiceVO.getProdReservationConfig().getReservationTimeSlots());
|
prodReservationConfigDO.setTimeBook(prodServiceVO.getProdReservationConfig().getTimeBook());
|
||||||
prodReservationConfigMapper.updateById(prodServiceVO.getProdReservationConfig());
|
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);
|
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 {
|
} else {
|
||||||
ProdEmergencyResponseDO prodEmergencyResponse = BeanUtils.toBean(prodServiceVO.getProdEmergencyInfoVO(), ProdEmergencyResponseDO.class);
|
ProdEmergencyResponseDO prodEmergencyResponse = BeanUtils.toBean(prodServiceVO.getProdEmergencyInfoVO(), ProdEmergencyResponseDO.class);
|
||||||
if (prodEmergencyResponse != null) {
|
if (prodEmergencyResponse != null) {
|
||||||
@@ -276,6 +305,15 @@ public class ProdServiceImpl implements ProdService {
|
|||||||
prodEmergencyResponseIntervalsMapper.insert(prodEmergencyResponseIntervals);
|
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()) {
|
for (ProdAdditionalFeeDatesDO prodAdditionalFeeDates : prodServiceVO.getProdAdditionalFeeDatesList()) {
|
||||||
if (prodAdditionalFeeDates.getId() == null) {
|
if (prodAdditionalFeeDates.getId() == null) {
|
||||||
prodAdditionalFeeDates.setProdId(prodServiceVO.getProdId());
|
prodAdditionalFeeDates.setProdId(prodServiceVO.getProdId());
|
||||||
|
prodAdditionalFeeDates.setType(1);
|
||||||
prodAdditionalFeeDatesMapper.insert(prodAdditionalFeeDates);
|
prodAdditionalFeeDatesMapper.insert(prodAdditionalFeeDates);
|
||||||
} else {
|
} else {
|
||||||
prodAdditionalFeeDatesMapper.updateById(prodAdditionalFeeDates);
|
prodAdditionalFeeDatesMapper.updateById(prodAdditionalFeeDates);
|
||||||
|
|||||||
@@ -9,4 +9,7 @@
|
|||||||
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
|
文档可见: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>
|
</mapper>
|
||||||
@@ -25,11 +25,15 @@
|
|||||||
<association property="prodEmergencyInfoVO" javaType="com.tashow.cloud.productapi.api.product.vo.prodemergencyresponse.ProdEmergencyInfoVO">
|
<association property="prodEmergencyInfoVO" javaType="com.tashow.cloud.productapi.api.product.vo.prodemergencyresponse.ProdEmergencyInfoVO">
|
||||||
<id property="id" column="erc_record_id"/>
|
<id property="id" column="erc_record_id"/>
|
||||||
<result property="prodId" column="erc_prod_id"/>
|
<result property="prodId" column="erc_prod_id"/>
|
||||||
<result property="responseTimeSlots" column="response_time_slots"/>
|
<result property="responseTimeSlots" column="erc_response_time_slots"/>
|
||||||
<result property="blacklistedDates" column="blacklisted_dates"/>
|
<!-- 嵌套集合:紧急响应时间区间 -->
|
||||||
<result property="blackAppointDates" column="black_appoint_dates"/>
|
<collection property="prodEmergencyResponseBlackList" ofType="com.tashow.cloud.productapi.api.product.vo.prodadditionalfeedates.ProdAdditionalFeeBlackVO">
|
||||||
<result property="blackHappy" column="black_happy"/>
|
<id property="id" column="erc_record_id"/>
|
||||||
<result property="blackWeekend" column="black_weekend"/>
|
<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">
|
<collection property="prodEmergencyResponseIntervalsList" ofType="com.tashow.cloud.productapi.api.product.dto.ProdEmergencyResponseIntervalsDO">
|
||||||
<id property="id" column="eri_record_id"/>
|
<id property="id" column="eri_record_id"/>
|
||||||
@@ -42,7 +46,7 @@
|
|||||||
</collection>
|
</collection>
|
||||||
</association>
|
</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"/>
|
<id property="id" column="rc_record_id"/>
|
||||||
<result property="prodId" column="rc_prod_id"/>
|
<result property="prodId" column="rc_prod_id"/>
|
||||||
<result property="reservationTimeSlots" column="rc_reservation_time_slots"/>
|
<result property="reservationTimeSlots" column="rc_reservation_time_slots"/>
|
||||||
@@ -52,12 +56,14 @@
|
|||||||
<result property="changeTimeRule" column="rc_change_time_rule"/>
|
<result property="changeTimeRule" column="rc_change_time_rule"/>
|
||||||
<result property="timeSlot" column="rc_time_slot"/>
|
<result property="timeSlot" column="rc_time_slot"/>
|
||||||
<result property="maxChangeTimes" column="rc_max_change_times"/>
|
<result property="maxChangeTimes" column="rc_max_change_times"/>
|
||||||
<result property="blacklistedDates" column="rc_blacklisted_dates"/>
|
<!-- 嵌套集合:紧急响应时间区间 -->
|
||||||
<result property="isBlacklisted" column="rc_is_blacklisted"/>
|
<collection property="prodReservationBlackList" ofType="com.tashow.cloud.productapi.api.product.vo.prodadditionalfeedates.ProdAdditionalFeeBlackVO">
|
||||||
<result property="blackAppointDates" column="rc_black_appoint_dates"/>
|
<id property="id" column="rcp_record_id"/>
|
||||||
<result property="isBlackAppoint" column="rc_is_black_appoint"/>
|
<result property="dateType" column="rcp_date_type"/>
|
||||||
<result property="blackHappy" column="rc_black_happy"/>
|
<result property="customTimeSlots" column="rcp_custom_time_slots"/>
|
||||||
<result property="blackWeekend" column="rc_black_weekend"/>
|
<result property="type" column="rcp_type"/>
|
||||||
|
<result property="isEnabled" column="rcp_is_enabled"/>
|
||||||
|
</collection>
|
||||||
</association>
|
</association>
|
||||||
|
|
||||||
<!-- 映射接单上限配置 (productOrderLimitVO) -->
|
<!-- 映射接单上限配置 (productOrderLimitVO) -->
|
||||||
@@ -113,7 +119,7 @@
|
|||||||
<result property="name" column="afd_name"/>
|
<result property="name" column="afd_name"/>
|
||||||
<result property="dateType" column="afd_date_type"/>
|
<result property="dateType" column="afd_date_type"/>
|
||||||
<result property="customTimeSlots" column="afd_custom_time_slots"/>
|
<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="chargeMode" column="afd_charge_mode"/>
|
||||||
<result property="price" column="afd_price"/>
|
<result property="price" column="afd_price"/>
|
||||||
<result property="isEnabled" column="afd_is_enabled"/>
|
<result property="isEnabled" column="afd_is_enabled"/>
|
||||||
@@ -149,11 +155,15 @@
|
|||||||
<association property="prodEmergencyInfoVO" javaType="com.tashow.cloud.productapi.api.product.vo.prodemergencyresponse.ProdEmergencyInfoVO">
|
<association property="prodEmergencyInfoVO" javaType="com.tashow.cloud.productapi.api.product.vo.prodemergencyresponse.ProdEmergencyInfoVO">
|
||||||
<id property="id" column="erc_record_id"/>
|
<id property="id" column="erc_record_id"/>
|
||||||
<result property="prodId" column="erc_prod_id"/>
|
<result property="prodId" column="erc_prod_id"/>
|
||||||
<result property="responseTimeSlots" column="response_time_slots"/>
|
<result property="responseTimeSlots" column="erc_response_time_slots"/>
|
||||||
<result property="blacklistedDates" column="blacklisted_dates"/>
|
<!-- 嵌套集合:紧急响应时间区间 -->
|
||||||
<result property="blackAppointDates" column="black_appoint_dates"/>
|
<collection property="prodEmergencyResponseBlackList" ofType="com.tashow.cloud.productapi.api.product.vo.prodadditionalfeedates.ProdAdditionalFeeBlackVO">
|
||||||
<result property="blackHappy" column="black_happy"/>
|
<id property="id" column="erc_record_id"/>
|
||||||
<result property="blackWeekend" column="black_weekend"/>
|
<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">
|
<collection property="prodEmergencyResponseIntervalsList" ofType="com.tashow.cloud.productapi.api.product.dto.ProdEmergencyResponseIntervalsDO">
|
||||||
<id property="id" column="eri_record_id"/>
|
<id property="id" column="eri_record_id"/>
|
||||||
@@ -166,7 +176,7 @@
|
|||||||
</collection>
|
</collection>
|
||||||
</association>
|
</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"/>
|
<id property="id" column="rc_record_id"/>
|
||||||
<result property="prodId" column="rc_prod_id"/>
|
<result property="prodId" column="rc_prod_id"/>
|
||||||
<result property="reservationTimeSlots" column="rc_reservation_time_slots"/>
|
<result property="reservationTimeSlots" column="rc_reservation_time_slots"/>
|
||||||
@@ -176,12 +186,14 @@
|
|||||||
<result property="changeTimeRule" column="rc_change_time_rule"/>
|
<result property="changeTimeRule" column="rc_change_time_rule"/>
|
||||||
<result property="timeSlot" column="rc_time_slot"/>
|
<result property="timeSlot" column="rc_time_slot"/>
|
||||||
<result property="maxChangeTimes" column="rc_max_change_times"/>
|
<result property="maxChangeTimes" column="rc_max_change_times"/>
|
||||||
<result property="blacklistedDates" column="rc_blacklisted_dates"/>
|
<!-- 嵌套集合:紧急响应时间区间 -->
|
||||||
<result property="isBlacklisted" column="rc_is_blacklisted"/>
|
<collection property="prodReservationBlackList" ofType="com.tashow.cloud.productapi.api.product.vo.prodadditionalfeedates.ProdAdditionalFeeBlackVO">
|
||||||
<result property="blackAppointDates" column="rc_black_appoint_dates"/>
|
<id property="id" column="rcp_record_id"/>
|
||||||
<result property="isBlackAppoint" column="rc_is_black_appoint"/>
|
<result property="dateType" column="rcp_date_type"/>
|
||||||
<result property="blackHappy" column="rc_black_happy"/>
|
<result property="customTimeSlots" column="rcp_custom_time_slots"/>
|
||||||
<result property="blackWeekend" column="rc_black_weekend"/>
|
<result property="type" column="rcp_type"/>
|
||||||
|
<result property="isEnabled" column="rcp_is_enabled"/>
|
||||||
|
</collection>
|
||||||
</association>
|
</association>
|
||||||
|
|
||||||
<!-- 映射接单上限配置 (productOrderLimitVO) -->
|
<!-- 映射接单上限配置 (productOrderLimitVO) -->
|
||||||
@@ -224,7 +236,7 @@
|
|||||||
<result property="name" column="afd_name"/>
|
<result property="name" column="afd_name"/>
|
||||||
<result property="dateType" column="afd_date_type"/>
|
<result property="dateType" column="afd_date_type"/>
|
||||||
<result property="customTimeSlots" column="afd_custom_time_slots"/>
|
<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="chargeMode" column="afd_charge_mode"/>
|
||||||
<result property="price" column="afd_price"/>
|
<result property="price" column="afd_price"/>
|
||||||
<result property="isEnabled" column="afd_is_enabled"/>
|
<result property="isEnabled" column="afd_is_enabled"/>
|
||||||
@@ -256,18 +268,12 @@
|
|||||||
p.category_name,
|
p.category_name,
|
||||||
<!-- 只有当 emergencySwitch 开启时,才查询紧急响应相关字段 -->
|
<!-- 只有当 emergencySwitch 开启时,才查询紧急响应相关字段 -->
|
||||||
<if test="emergencySwitch != null and emergencySwitch == 1">
|
<if test="emergencySwitch != null and emergencySwitch == 1">
|
||||||
erc.id AS erc_record_id,
|
erc.response_time_slots as erc_response_time_slots,
|
||||||
erc.prod_id AS erc_prod_id,
|
epafd.id AS erc_record_id,
|
||||||
erc.response_time_slots,
|
epafd.date_type as erc_date_type,
|
||||||
erc.blacklisted_dates,
|
epafd.custom_time_slots as erc_custom_time_slots,
|
||||||
erc.black_appoint_dates,
|
epafd.type as erc_type,
|
||||||
erc.black_happy,
|
epafd.is_enabled as erc_is_enabled,
|
||||||
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,
|
|
||||||
eri.id AS eri_record_id,
|
eri.id AS eri_record_id,
|
||||||
eri.config_id AS eri_config_id,
|
eri.config_id AS eri_config_id,
|
||||||
eri.mode_name,
|
eri.mode_name,
|
||||||
@@ -319,12 +325,11 @@
|
|||||||
rc.change_time_rule AS rc_change_time_rule,
|
rc.change_time_rule AS rc_change_time_rule,
|
||||||
rc.time_slot AS rc_time_slot,
|
rc.time_slot AS rc_time_slot,
|
||||||
rc.max_change_times AS rc_max_change_times,
|
rc.max_change_times AS rc_max_change_times,
|
||||||
rc.blacklisted_dates AS rc_blacklisted_dates,
|
rpafd.id AS rcp_record_id,
|
||||||
rc.is_blacklisted AS rc_is_blacklisted,
|
rpafd.date_type as rcp_date_type,
|
||||||
rc.black_appoint_dates AS rc_black_appoint_dates,
|
rpafd.custom_time_slots as rcp_custom_time_slots,
|
||||||
rc.is_black_appoint AS rc_is_black_appoint,
|
rpafd.type as rcp_type,
|
||||||
rc.black_happy AS rc_black_happy,
|
rpafd.is_enabled as rcp_is_enabled,
|
||||||
rc.black_weekend AS rc_black_weekend,
|
|
||||||
</if>
|
</if>
|
||||||
<!-- 只有当 orderLimitSwitch 开启时,才查询接单上限配置相关字段 -->
|
<!-- 只有当 orderLimitSwitch 开启时,才查询接单上限配置相关字段 -->
|
||||||
<if test="orderLimitSwitch != null and orderLimitSwitch == 1">
|
<if test="orderLimitSwitch != null and orderLimitSwitch == 1">
|
||||||
@@ -355,16 +360,18 @@
|
|||||||
<!-- 只有当 emergencySwitch 开启时才进行 LEFT JOIN -->
|
<!-- 只有当 emergencySwitch 开启时才进行 LEFT JOIN -->
|
||||||
<if test="emergencySwitch != null and emergencySwitch == 1">
|
<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_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
|
LEFT JOIN tz_prod_emergency_response_intervals eri ON erc.id = eri.config_id AND eri.deleted = 0
|
||||||
</if>
|
</if>
|
||||||
<if test="additionalFeeSwitch != null and additionalFeeSwitch == 1">
|
<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
|
LEFT JOIN tz_prod_additional_fee_periods afp ON p.prod_id = afp.prod_id AND afp.deleted = 0
|
||||||
</if>
|
</if>
|
||||||
<if test="additionalSwitch != null and additionalSwitch == 1">
|
<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>
|
||||||
<if test="reservationSwitch != null and reservationSwitch == 1">
|
<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_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>
|
||||||
<if test="orderLimitSwitch != null and orderLimitSwitch == 1">
|
<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
|
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,
|
p.region_switch,
|
||||||
<!-- 只有当 emergencySwitch 开启时,才查询紧急响应相关字段 -->
|
<!-- 只有当 emergencySwitch 开启时,才查询紧急响应相关字段 -->
|
||||||
<if test="emergencySwitch != null and emergencySwitch == 1">
|
<if test="emergencySwitch != null and emergencySwitch == 1">
|
||||||
erc.id AS erc_record_id,
|
erc.response_time_slots as erc_response_time_slots,
|
||||||
erc.prod_id AS erc_prod_id,
|
epafd.id AS erc_record_id,
|
||||||
erc.response_time_slots,
|
epafd.date_type as erc_date_type,
|
||||||
erc.blacklisted_dates,
|
epafd.custom_time_slots as erc_custom_time_slots,
|
||||||
erc.black_appoint_dates,
|
epafd.type as erc_type,
|
||||||
erc.black_happy,
|
epafd.is_enabled as erc_is_enabled,
|
||||||
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,
|
|
||||||
eri.id AS eri_record_id,
|
eri.id AS eri_record_id,
|
||||||
eri.config_id AS eri_config_id,
|
eri.config_id AS eri_config_id,
|
||||||
eri.mode_name,
|
eri.mode_name,
|
||||||
@@ -461,12 +462,11 @@
|
|||||||
rc.change_time_rule AS rc_change_time_rule,
|
rc.change_time_rule AS rc_change_time_rule,
|
||||||
rc.time_slot AS rc_time_slot,
|
rc.time_slot AS rc_time_slot,
|
||||||
rc.max_change_times AS rc_max_change_times,
|
rc.max_change_times AS rc_max_change_times,
|
||||||
rc.blacklisted_dates AS rc_blacklisted_dates,
|
rpafd.id AS rcp_record_id,
|
||||||
rc.is_blacklisted AS rc_is_blacklisted,
|
rpafd.date_type as rcp_date_type,
|
||||||
rc.black_appoint_dates AS rc_black_appoint_dates,
|
rpafd.custom_time_slots as rcp_custom_time_slots,
|
||||||
rc.is_black_appoint AS rc_is_black_appoint,
|
rpafd.type as rcp_type,
|
||||||
rc.black_happy AS rc_black_happy,
|
rpafd.is_enabled as rcp_is_enabled,
|
||||||
rc.black_weekend AS rc_black_weekend,
|
|
||||||
</if>
|
</if>
|
||||||
<!-- 只有当 orderLimitSwitch 开启时,才查询接单上限配置相关字段 -->
|
<!-- 只有当 orderLimitSwitch 开启时,才查询接单上限配置相关字段 -->
|
||||||
<if test="orderLimitSwitch != null and orderLimitSwitch == 1">
|
<if test="orderLimitSwitch != null and orderLimitSwitch == 1">
|
||||||
@@ -489,16 +489,18 @@
|
|||||||
<!-- 只有当 emergencySwitch 开启时才进行 LEFT JOIN -->
|
<!-- 只有当 emergencySwitch 开启时才进行 LEFT JOIN -->
|
||||||
<if test="emergencySwitch != null and emergencySwitch == 1">
|
<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_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
|
LEFT JOIN tz_prod_emergency_response_intervals eri ON erc.id = eri.config_id AND eri.deleted = 0
|
||||||
</if>
|
</if>
|
||||||
<if test="additionalFeeSwitch != null and additionalFeeSwitch == 1">
|
<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
|
LEFT JOIN tz_prod_additional_fee_periods afp ON p.prod_id = afp.prod_id AND afp.deleted = 0
|
||||||
</if>
|
</if>
|
||||||
<if test="additionalSwitch != null and additionalSwitch == 1">
|
<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>
|
||||||
<if test="reservationSwitch != null and reservationSwitch == 1">
|
<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_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>
|
||||||
<if test="orderLimitSwitch != null and orderLimitSwitch == 1">
|
<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
|
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 快速开发插件来生成查询。
|
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
|
||||||
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
|
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
|
||||||
-->
|
-->
|
||||||
|
<delete id="deleteReservationConfig">
|
||||||
|
delete from tz_prod_reservation_config where prod_id = #{configId}
|
||||||
|
</delete>
|
||||||
</mapper>
|
</mapper>
|
||||||
Reference in New Issue
Block a user