获取服务配置2
This commit is contained in:
@@ -71,5 +71,7 @@ public class ProdAdditionalFeeDatesDO extends BaseDO {
|
||||
* 是否启用该规则是否启用该规则0关1开
|
||||
*/
|
||||
private Integer isEnabled;
|
||||
|
||||
public boolean isEmpty() {
|
||||
return id == null ;
|
||||
}
|
||||
}
|
||||
@@ -56,5 +56,7 @@ public class ProdAdditionalFeePeriodsDO extends BaseDO {
|
||||
* 浮动百分比
|
||||
*/
|
||||
private BigDecimal floatingPercentage;
|
||||
|
||||
public boolean isEmpty() {
|
||||
return id == null ;
|
||||
}
|
||||
}
|
||||
@@ -58,4 +58,8 @@ public class ProdEmergencyResponseIntervalsDO extends BaseDO {
|
||||
*/
|
||||
private BigDecimal price;
|
||||
|
||||
|
||||
public boolean isEmpty() {
|
||||
return id == null;
|
||||
}
|
||||
}
|
||||
@@ -41,4 +41,9 @@ public class ProdExtendDO {
|
||||
*/
|
||||
private Integer isDisable;
|
||||
|
||||
/**
|
||||
* 体重是否收费0否1是
|
||||
*/
|
||||
private Integer isWeightCharge;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,80 @@
|
||||
package com.tashow.cloud.productapi.api.product.vo.prod;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.tashow.cloud.productapi.api.product.dto.ProdAdditionalFeeDatesDO;
|
||||
import com.tashow.cloud.productapi.api.product.dto.ProdAdditionalFeePeriodsDO;
|
||||
import com.tashow.cloud.productapi.api.product.dto.ProdWeightRangePricesDO;
|
||||
import com.tashow.cloud.productapi.api.product.dto.ProductOrderLimitDO;
|
||||
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 io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Schema(description = "商品服务配置 VO")
|
||||
@Data
|
||||
public class ProdServiceInfoVO {
|
||||
|
||||
@Schema(description = "产品ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "6943")
|
||||
private Long prodId;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date createTime;
|
||||
|
||||
@Schema(description = "修改时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date updateTime;
|
||||
|
||||
@Schema(description = "新建人")
|
||||
private String creator;
|
||||
|
||||
@Schema(description = "修改人")
|
||||
private String updater;
|
||||
|
||||
@Schema(description = "分类名称")
|
||||
private String categoryName;
|
||||
|
||||
@Schema(description = "是否开启服务区域配置0关1开")
|
||||
private Integer regionSwitch;
|
||||
@Schema(description = "服务区域配置")
|
||||
public ProdServiceAreasInfoVO prodServiceAreasInfo;
|
||||
|
||||
|
||||
@Schema(description = "是否预约0关1开")
|
||||
private Integer reservationSwitch;
|
||||
@Schema(description = "预约配置")
|
||||
public ProdReservationInfoVO prodReservationConfig;
|
||||
|
||||
@Schema(description = "是否紧急响应服务0关1开")
|
||||
private Integer emergencySwitch;
|
||||
@Schema(description = "急响应服务配置")
|
||||
public ProdEmergencyInfoVO prodEmergencyInfoVO;
|
||||
|
||||
@Schema(description = "是否接单上线0关1开")
|
||||
private Integer orderLimitSwitch;
|
||||
@Schema(description = "接单上线配置")
|
||||
public ProductOrderLimitDO productOrderLimitVO;
|
||||
|
||||
|
||||
@Schema(description = "是否特殊时段0关1开")
|
||||
private Integer additionalSwitch;
|
||||
@Schema(description = "特殊时段规则配置")
|
||||
public List<ProdAdditionalFeeDatesDO> prodAdditionalFeeDatesList;
|
||||
|
||||
@Schema(description = "是否特殊日期(节假日周末什么的)0关1开")
|
||||
private Integer additionalFeeSwitch;
|
||||
@Schema(description = "特殊日期规则配置")
|
||||
public List<ProdAdditionalFeePeriodsDO> prodAdditionalFeePeriodsList;
|
||||
|
||||
|
||||
@Schema(description = "是否开启体重配置0关1开")
|
||||
private Integer weightSwitch;
|
||||
@Schema(description = "体重配置")
|
||||
public List<ProdWeightRangePricesDO> prodWeightConfig;
|
||||
|
||||
}
|
||||
@@ -5,11 +5,13 @@ import com.tashow.cloud.productapi.api.product.vo.prodemergencyresponse.ProdEmer
|
||||
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.dto.*;
|
||||
import com.tashow.cloud.productapi.api.product.vo.prodweightrangeprices.ProdWeightRangePricesSaveInfoVO;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Schema(description = "商品服务配置 VO")
|
||||
@Data
|
||||
@@ -71,6 +73,31 @@ public class ProdServiceVO {
|
||||
@Schema(description = "是否开启体重配置0关1开")
|
||||
private Integer weightSwitch;
|
||||
@Schema(description = "体重配置")
|
||||
public ProdWeightRangePricesDO prodWeightConfig;
|
||||
public ProdWeightRangePricesSaveInfoVO prodWeightConfig;
|
||||
|
||||
public List<ProdAdditionalFeeDatesDO> getProdAdditionalFeeDatesList() {
|
||||
if (prodAdditionalFeeDatesList == null) {
|
||||
return null; // 或者 return Collections.emptyList(); 根据你希望 null 还是 []d
|
||||
}
|
||||
return prodAdditionalFeeDatesList.stream()
|
||||
.filter(black -> black != null && !black.isEmpty())
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
public void setProdAdditionalFeeDatesList(List<ProdAdditionalFeeDatesDO> prodAdditionalFeeDatesList) {
|
||||
this.prodAdditionalFeeDatesList = prodAdditionalFeeDatesList;
|
||||
}
|
||||
|
||||
public List<ProdAdditionalFeePeriodsDO> getProdAdditionalFeePeriodsList() {
|
||||
if (prodAdditionalFeePeriodsList == null) {
|
||||
return null; // 或者 return Collections.emptyList(); 根据你希望 null 还是 []d
|
||||
}
|
||||
return prodAdditionalFeePeriodsList.stream()
|
||||
.filter(black -> black != null && !black.isEmpty())
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
public void setProdAdditionalFeePeriodsList(List<ProdAdditionalFeePeriodsDO> prodAdditionalFeePeriodsList) {
|
||||
this.prodAdditionalFeePeriodsList = prodAdditionalFeePeriodsList;
|
||||
}
|
||||
}
|
||||
@@ -36,6 +36,7 @@ public class ProdAdditionalFeeBlackVO {
|
||||
@Schema(description = "是否启用该规则是否启用该规则0关1开", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("是否启用该规则是否启用该规则0关1开")
|
||||
private Integer isEnabled;
|
||||
|
||||
|
||||
public boolean isEmpty() {
|
||||
return id == null ;
|
||||
}
|
||||
}
|
||||
@@ -9,6 +9,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Schema(description = "管理后台 - 商品紧急响应服务设置 Response VO")
|
||||
@Data
|
||||
@@ -35,4 +36,31 @@ public class ProdEmergencyInfoVO {
|
||||
|
||||
@Schema(description = "紧急响应黑名单日期设置")
|
||||
public List<ProdAdditionalFeeBlackVO> prodEmergencyResponseBlackList;
|
||||
|
||||
public List<ProdEmergencyResponseIntervalsDO> getProdEmergencyResponseIntervalsList() {
|
||||
if (prodEmergencyResponseIntervalsList == null) {
|
||||
return null; // 或者 return Collections.emptyList(); 根据你希望 null 还是 []
|
||||
}
|
||||
return prodEmergencyResponseIntervalsList.stream()
|
||||
.filter(black -> black != null && !black.isEmpty())
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
public void setProdEmergencyResponseIntervalsList(List<ProdEmergencyResponseIntervalsDO> prodEmergencyResponseIntervalsList) {
|
||||
this.prodEmergencyResponseIntervalsList = prodEmergencyResponseIntervalsList;
|
||||
}
|
||||
|
||||
// getter 中做转换
|
||||
public List<ProdAdditionalFeeBlackVO> getProdEmergencyResponseBlackList() {
|
||||
if (prodEmergencyResponseBlackList == null) {
|
||||
return null; // 或者 return Collections.emptyList(); 根据你希望 null 还是 []
|
||||
}
|
||||
return prodEmergencyResponseBlackList.stream()
|
||||
.filter(black -> black != null && !black.isEmpty())
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
public void setProdEmergencyResponseBlackList(List<ProdAdditionalFeeBlackVO> prodEmergencyResponseBlackList) {
|
||||
this.prodEmergencyResponseBlackList = prodEmergencyResponseBlackList;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,84 @@
|
||||
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.vo.prodadditionalfeedates.ProdAdditionalFeeBlackVO;
|
||||
import com.tashow.cloud.productapi.general.StringListTypeHandler;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Schema(description = "管理后台 - 商品紧急响应服务设置 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class ProdReservationInfoReqVO {
|
||||
|
||||
/**
|
||||
* 预约配置的唯一标识符
|
||||
*/
|
||||
@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 = new ArrayList<>();
|
||||
|
||||
}
|
||||
@@ -10,6 +10,8 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Schema(description = "管理后台 - 商品紧急响应服务设置 Response VO")
|
||||
@Data
|
||||
@@ -78,4 +80,19 @@ public class ProdReservationInfoVO {
|
||||
|
||||
@Schema(description = "预约黑名单日期设置")
|
||||
public List<ProdAdditionalFeeBlackVO> prodReservationBlackList;
|
||||
|
||||
public List<ProdAdditionalFeeBlackVO> getProdReservationBlackList() {
|
||||
if (prodReservationBlackList == null || prodReservationBlackList.isEmpty()) {
|
||||
return prodReservationBlackList;
|
||||
}
|
||||
return prodReservationBlackList.stream()
|
||||
.filter(Objects::nonNull)
|
||||
.filter(black -> !black.isEmpty())
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
public void setProdReservationBlackList(List<ProdAdditionalFeeBlackVO> prodReservationBlackList) {
|
||||
this.prodReservationBlackList = prodReservationBlackList;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.tashow.cloud.productapi.api.product.vo.prodweightrangeprices;
|
||||
|
||||
import com.tashow.cloud.productapi.api.product.dto.ProdWeightRangePricesDO;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
@Schema(description = "管理后台 - 体重区间价格新增/修改 Request VO")
|
||||
@Data
|
||||
public class ProdWeightRangePricesSaveInfoVO {
|
||||
|
||||
@Schema(description = "体重是否收费0否1是")
|
||||
private Integer isWeightCharge;
|
||||
|
||||
@Schema(description = "体重配置")
|
||||
public List<ProdWeightRangePricesDO> prodWeightConfigList;
|
||||
|
||||
|
||||
}
|
||||
@@ -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.ProdWeightRangePricesDO;
|
||||
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 ProdWeightRangePricesMapper extends BaseMapperX<ProdWeightRangePricesDO> {
|
||||
|
||||
|
||||
/**
|
||||
* 删除关联
|
||||
*/
|
||||
public int deleteWeightRangePrices(@Param("prodId")Long prodId);
|
||||
}
|
||||
@@ -167,12 +167,12 @@ public class ProdServiceImpl implements ProdService {
|
||||
}
|
||||
}
|
||||
//体重设置
|
||||
if (Objects.equals(prodServiceVO.getWeightSwitch(), BaseEnum.YES_ONE.getKey())) {
|
||||
/* if (Objects.equals(prodServiceVO.getWeightSwitch(), BaseEnum.YES_ONE.getKey())) {
|
||||
prodDO.setWeightSwitch(BaseEnum.YES_ONE.getKey());
|
||||
ProdWeightRangePricesDO prodWeightRangePrices = prodServiceVO.prodWeightConfig;
|
||||
prodWeightRangePrices.setProdId(prodDO.getProdId());
|
||||
prodWeightRangePricesMapper.insert(prodWeightRangePrices);
|
||||
}
|
||||
}*/
|
||||
prodMapper.updateById(prodDO);
|
||||
}
|
||||
|
||||
@@ -356,14 +356,25 @@ public class ProdServiceImpl implements ProdService {
|
||||
}
|
||||
//体重设置
|
||||
if (Objects.equals(prodServiceVO.getWeightSwitch(), BaseEnum.YES_ONE.getKey())) {
|
||||
if (prodServiceVO.getProdWeightConfig().getId() == null) {
|
||||
prod.setWeightSwitch(BaseEnum.YES_ONE.getKey());
|
||||
ProdWeightRangePricesDO prodWeightRangePrices = prodServiceVO.getProdWeightConfig();
|
||||
prodWeightRangePrices.setProdId(prod.getProdId());
|
||||
prodWeightRangePricesMapper.insert(prodWeightRangePrices);
|
||||
ProdExtendDO prodExtendDO =prodExtendMapper.selectOne(ProdExtendDO::getProdId, prod.getProdId());
|
||||
if(prodExtendDO!= null){
|
||||
prodExtendDO.setIsWeightCharge(prodServiceVO.getProdWeightConfig().getIsWeightCharge());
|
||||
prodExtendMapper.updateById(prodExtendDO);
|
||||
}else {
|
||||
prodWeightRangePricesMapper.updateById(prodServiceVO.getProdWeightConfig());
|
||||
prodExtendDO = new ProdExtendDO();
|
||||
prodExtendDO.setProdId(prod.getProdId());
|
||||
prodExtendDO.setIsWeightCharge(prodServiceVO.getProdWeightConfig().getIsWeightCharge());
|
||||
prodExtendMapper.insert(prodExtendDO);
|
||||
}
|
||||
prodWeightRangePricesMapper.deleteWeightRangePrices(prod.getProdId());
|
||||
if (prodServiceVO.getProdWeightConfig().getProdWeightConfigList() != null){
|
||||
for (ProdWeightRangePricesDO prodWeightRangePricesDO : prodServiceVO.getProdWeightConfig().getProdWeightConfigList()) {
|
||||
prodWeightRangePricesDO.setProdId(prod.getProdId());
|
||||
prodWeightRangePricesMapper.insert(prodWeightRangePricesDO);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
prodMapper.updateById(prod);
|
||||
}
|
||||
|
||||
@@ -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>
|
||||
@@ -89,7 +89,10 @@
|
||||
|
||||
|
||||
<!-- 新增:映射体重区间价格配置列表 (prodWeightConfigList) -->
|
||||
<collection property="prodWeightConfig" ofType="com.tashow.cloud.productapi.api.product.dto.ProdWeightRangePricesDO">
|
||||
<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 -->
|
||||
@@ -100,6 +103,7 @@
|
||||
<!-- <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,9 +208,10 @@
|
||||
<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="prodWeightConfig" ofType="com.tashow.cloud.productapi.api.product.dto.ProdWeightRangePricesDO">
|
||||
<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 -->
|
||||
@@ -217,6 +222,9 @@
|
||||
<!-- <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">
|
||||
@@ -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
|
||||
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
Reference in New Issue
Block a user