Compare commits
9 Commits
ce643990d8
...
73748a6fc0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
73748a6fc0 | ||
|
|
a6b1cb2ac9 | ||
|
|
ecb8f31850 | ||
|
|
4711bb8cbc | ||
|
|
40f0ecd162 | ||
|
|
27e51b6278 | ||
|
|
eeab4e5ea3 | ||
|
|
a5f992c090 | ||
|
|
a99402c6b0 |
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -29,6 +29,11 @@
|
|||||||
<optional>true</optional>
|
<optional>true</optional>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>jakarta.validation</groupId>
|
||||||
|
<artifactId>jakarta.validation-api</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<!-- RPC 远程调用相关 -->
|
<!-- RPC 远程调用相关 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.cloud</groupId>
|
<groupId>org.springframework.cloud</groupId>
|
||||||
|
|||||||
@@ -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:''基准价上浮
|
||||||
*/
|
*/
|
||||||
@@ -65,5 +71,7 @@ public class ProdAdditionalFeeDatesDO extends BaseDO {
|
|||||||
* 是否启用该规则是否启用该规则0关1开
|
* 是否启用该规则是否启用该规则0关1开
|
||||||
*/
|
*/
|
||||||
private Integer isEnabled;
|
private Integer isEnabled;
|
||||||
|
public boolean isEmpty() {
|
||||||
|
return id == null ;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -56,5 +56,7 @@ public class ProdAdditionalFeePeriodsDO extends BaseDO {
|
|||||||
* 浮动百分比
|
* 浮动百分比
|
||||||
*/
|
*/
|
||||||
private BigDecimal floatingPercentage;
|
private BigDecimal floatingPercentage;
|
||||||
|
public boolean isEmpty() {
|
||||||
|
return id == null ;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -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;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -38,9 +38,9 @@ public class ProdEmergencyResponseIntervalsDO extends BaseDO {
|
|||||||
private Long prodId;
|
private Long prodId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 响应模式名称
|
* 响应模式名称modeName
|
||||||
*/
|
*/
|
||||||
private String modeName;
|
private String name;
|
||||||
/**
|
/**
|
||||||
* 响应时间(小时)
|
* 响应时间(小时)
|
||||||
*/
|
*/
|
||||||
@@ -58,4 +58,8 @@ public class ProdEmergencyResponseIntervalsDO extends BaseDO {
|
|||||||
*/
|
*/
|
||||||
private BigDecimal price;
|
private BigDecimal price;
|
||||||
|
|
||||||
|
|
||||||
|
public boolean isEmpty() {
|
||||||
|
return id == null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -41,4 +41,9 @@ public class ProdExtendDO {
|
|||||||
*/
|
*/
|
||||||
private Integer isDisable;
|
private Integer isDisable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 体重是否收费0否1是
|
||||||
|
*/
|
||||||
|
private Integer isWeightCharge;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -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;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 预约时间区间设置
|
* 预约时间区间设置
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
package com.tashow.cloud.productapi.api.product.vo;
|
package com.tashow.cloud.productapi.api.product.vo;
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import jakarta.validation.constraints.NotEmpty;
|
|
||||||
import jakarta.validation.constraints.NotNull;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|||||||
@@ -63,7 +63,8 @@ public class ProdListVO {
|
|||||||
/**
|
/**
|
||||||
* 服务时段
|
* 服务时段
|
||||||
*/
|
*/
|
||||||
private BigDecimal reservationTimeSlots;
|
@TableField(typeHandler = StringListTypeHandler.class)
|
||||||
|
private List<String> reservationTimeSlots;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 还剩多少天
|
* 还剩多少天
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
package com.tashow.cloud.productapi.api.product.vo.prod;
|
package com.tashow.cloud.productapi.api.product.vo.prod;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
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;
|
||||||
|
|
||||||
@@ -49,7 +51,8 @@ public class ProdRestoreListVO {
|
|||||||
/**
|
/**
|
||||||
* 服务时段
|
* 服务时段
|
||||||
*/
|
*/
|
||||||
private BigDecimal reservationTimeSlots;
|
@TableField(typeHandler = StringListTypeHandler.class)
|
||||||
|
private List<String> reservationTimeSlots;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 还剩多少天
|
* 还剩多少天
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ package com.tashow.cloud.productapi.api.product.vo.prod;
|
|||||||
import com.tashow.cloud.productapi.api.product.dto.SkuDO;
|
import com.tashow.cloud.productapi.api.product.dto.SkuDO;
|
||||||
import com.tashow.cloud.productapi.api.product.vo.prodprop.ProdPropSaveReqVO;
|
import com.tashow.cloud.productapi.api.product.vo.prodprop.ProdPropSaveReqVO;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import jakarta.validation.constraints.NotEmpty;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|||||||
@@ -0,0 +1,84 @@
|
|||||||
|
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.ProdEmergencyInfoReqVO;
|
||||||
|
import com.tashow.cloud.productapi.api.product.vo.prodemergencyresponse.ProdEmergencyInfoVO;
|
||||||
|
import com.tashow.cloud.productapi.api.product.vo.prodreservationconfig.ProdReservationInfoReqVO;
|
||||||
|
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.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
|
||||||
|
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 ProdReservationInfoReqVO prodReservationConfig;
|
||||||
|
|
||||||
|
@Schema(description = "是否紧急响应服务0关1开")
|
||||||
|
private Integer emergencySwitch;
|
||||||
|
@Schema(description = "急响应服务配置")
|
||||||
|
public ProdEmergencyInfoReqVO 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 ProdWeightRangePricesSaveInfoVO prodWeightConfig;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,14 +1,20 @@
|
|||||||
package com.tashow.cloud.productapi.api.product.vo.prod;
|
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.prodadditionalfeedates.ProdAdditionalFeeBlackVO;
|
||||||
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 com.tashow.cloud.productapi.api.product.vo.prodweightrangeprices.ProdWeightRangePricesSaveInfoVO;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Objects;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
@Schema(description = "商品服务配置 VO")
|
@Schema(description = "商品服务配置 VO")
|
||||||
@Data
|
@Data
|
||||||
@@ -43,7 +49,23 @@ 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;
|
||||||
|
|
||||||
|
/* public List<ProdAdditionalFeeBlackVO> getProdReservationBlackList() {
|
||||||
|
if (prodReservationBlackList == null || prodReservationBlackList.isEmpty()) {
|
||||||
|
return prodReservationBlackList;
|
||||||
|
}
|
||||||
|
return prodReservationBlackList.stream()
|
||||||
|
.filter(Objects::nonNull)
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setProdReservationBlackList(List<ProdAdditionalFeeBlackVO> prodReservationBlackList) {
|
||||||
|
this.prodReservationBlackList = prodReservationBlackList;
|
||||||
|
}*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Schema(description = "是否紧急响应服务0关1开")
|
@Schema(description = "是否紧急响应服务0关1开")
|
||||||
private Integer emergencySwitch;
|
private Integer emergencySwitch;
|
||||||
@@ -56,20 +78,42 @@ public class ProdServiceVO {
|
|||||||
public ProductOrderLimitDO productOrderLimitVO;
|
public ProductOrderLimitDO productOrderLimitVO;
|
||||||
|
|
||||||
|
|
||||||
@Schema(description = "是否特殊时段0关1开")
|
@Schema(description = "是否特殊日期(节假日周末什么的)0关1开")
|
||||||
private Integer additionalSwitch;
|
private Integer additionalSwitch;
|
||||||
@Schema(description = "特殊时段规则配置")
|
@Schema(description = "特殊日期规则配置")
|
||||||
public List<ProdAdditionalFeeDatesDO> prodAdditionalFeeDatesList;
|
public List<ProdAdditionalFeeDatesDO> prodAdditionalFeeDatesList;
|
||||||
|
|
||||||
@Schema(description = "是否特殊日期(节假日周末什么的)0关1开")
|
@Schema(description = "是否特殊时段0关1开 ")
|
||||||
private Integer additionalFeeSwitch;
|
private Integer additionalFeeSwitch;
|
||||||
@Schema(description = "特殊日期规则配置")
|
@Schema(description = "特殊时段规则配置 ")
|
||||||
public List<ProdAdditionalFeePeriodsDO> prodAdditionalFeePeriodsList;
|
public List<ProdAdditionalFeePeriodsDO> prodAdditionalFeePeriodsList;
|
||||||
|
|
||||||
|
|
||||||
@Schema(description = "是否开启体重配置0关1开")
|
@Schema(description = "是否开启体重配置0关1开")
|
||||||
private Integer weightSwitch;
|
private Integer weightSwitch;
|
||||||
@Schema(description = "体重配置")
|
@Schema(description = "体重配置")
|
||||||
public ProdWeightRangePricesDO prodWeightConfig;
|
public ProdWeightRangePricesSaveInfoVO prodWeightConfig;
|
||||||
|
|
||||||
|
|
||||||
|
public ProdReservationInfoVO getProdReservationConfig() {
|
||||||
|
|
||||||
|
if (this.prodReservationConfig == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
// 判断是否“逻辑上为空”
|
||||||
|
if (isProdReservationInfoEmpty(this.prodReservationConfig)) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return this.prodReservationConfig;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setProdReservationConfig(ProdReservationInfoVO prodReservationConfig) {
|
||||||
|
this.prodReservationConfig = prodReservationConfig;
|
||||||
|
}
|
||||||
|
|
||||||
|
private boolean isProdReservationInfoEmpty(ProdReservationInfoVO config) {
|
||||||
|
if (config == null) return true;
|
||||||
|
// 判断所有字段是否都为 null 或空
|
||||||
|
return config.getId() == null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
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;
|
||||||
|
public boolean isEmpty() {
|
||||||
|
return id == null ;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,40 @@
|
|||||||
|
package com.tashow.cloud.productapi.api.product.vo.prodemergencyresponse;
|
||||||
|
|
||||||
|
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.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;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
@Schema(description = "管理后台 - 商品紧急响应服务设置 Response VO")
|
||||||
|
@Data
|
||||||
|
@ExcelIgnoreUnannotated
|
||||||
|
public class ProdEmergencyInfoReqVO {
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 紧急响应服务配置的唯一标识符
|
||||||
|
*/
|
||||||
|
private Long id;
|
||||||
|
/**
|
||||||
|
* 关联的商品ID
|
||||||
|
*/
|
||||||
|
private Long prodId;
|
||||||
|
/**
|
||||||
|
* 可响应时间段
|
||||||
|
*/
|
||||||
|
@TableField(typeHandler = StringListTypeHandler.class)
|
||||||
|
private List<String> responseTimeSlots;
|
||||||
|
|
||||||
|
@Schema(description = "紧急响应时间区间设置")
|
||||||
|
public List<ProdEmergencyResponseIntervalsDO> prodEmergencyResponseIntervalsList;
|
||||||
|
|
||||||
|
@Schema(description = "紧急响应黑名单日期设置")
|
||||||
|
public List<ProdAdditionalFeeBlackVO> prodEmergencyResponseBlackList;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,11 +1,15 @@
|
|||||||
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;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
@Schema(description = "管理后台 - 商品紧急响应服务设置 Response VO")
|
@Schema(description = "管理后台 - 商品紧急响应服务设置 Response VO")
|
||||||
@Data
|
@Data
|
||||||
@@ -24,27 +28,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;
|
||||||
}
|
}
|
||||||
@@ -19,7 +19,7 @@ public class ProdEmergencyResponseIntervalsPageReqVO extends PageParam {
|
|||||||
private Long configId;
|
private Long configId;
|
||||||
|
|
||||||
@Schema(description = "响应模式名称", example = "王五")
|
@Schema(description = "响应模式名称", example = "王五")
|
||||||
private String modeName;
|
private String name;
|
||||||
|
|
||||||
@Schema(description = "响应时间(小时)")
|
@Schema(description = "响应时间(小时)")
|
||||||
private BigDecimal responseHours;
|
private BigDecimal responseHours;
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ public class ProdEmergencyResponseIntervalsRespVO {
|
|||||||
|
|
||||||
@Schema(description = "响应模式名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "王五")
|
@Schema(description = "响应模式名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "王五")
|
||||||
@ExcelProperty("响应模式名称")
|
@ExcelProperty("响应模式名称")
|
||||||
private String modeName;
|
private String name;
|
||||||
|
|
||||||
@Schema(description = "响应时间(小时)", requiredMode = Schema.RequiredMode.REQUIRED)
|
@Schema(description = "响应时间(小时)", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
@ExcelProperty("响应时间(小时)")
|
@ExcelProperty("响应时间(小时)")
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ public class ProdEmergencyResponseIntervalsSaveReqVO {
|
|||||||
|
|
||||||
@Schema(description = "响应模式名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "王五")
|
@Schema(description = "响应模式名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "王五")
|
||||||
@NotEmpty(message = "响应模式名称不能为空")
|
@NotEmpty(message = "响应模式名称不能为空")
|
||||||
private String modeName;
|
private String name;
|
||||||
|
|
||||||
@Schema(description = "响应时间(小时)", requiredMode = Schema.RequiredMode.REQUIRED)
|
@Schema(description = "响应时间(小时)", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
@NotNull(message = "响应时间(小时)不能为空")
|
@NotNull(message = "响应时间(小时)不能为空")
|
||||||
|
|||||||
@@ -0,0 +1,25 @@
|
|||||||
|
package com.tashow.cloud.productapi.api.product.vo.prodpropvalue;
|
||||||
|
|
||||||
|
import com.tashow.cloud.common.pojo.PageParam;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.ToString;
|
||||||
|
|
||||||
|
@Schema(description = "")
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@ToString(callSuper = true)
|
||||||
|
public class ProPageReqVO extends PageParam {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 属性规格名称
|
||||||
|
*/
|
||||||
|
private String propValue;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商品id
|
||||||
|
*/
|
||||||
|
private Long prodId;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
package com.tashow.cloud.productapi.api.product.vo.prodpropvalue;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class ProPropRecycleBinVO {
|
||||||
|
@Schema(description = "规格值id")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 属性规格名称
|
||||||
|
*/
|
||||||
|
private String propValue;
|
||||||
|
/**
|
||||||
|
* 关联规格属性id
|
||||||
|
*/
|
||||||
|
private Long propId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 还剩多少天
|
||||||
|
*/
|
||||||
|
private Long remainingDays;
|
||||||
|
/**
|
||||||
|
* 删除时间
|
||||||
|
*/
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Date deleteTime;
|
||||||
|
}
|
||||||
@@ -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<>();
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,103 @@
|
|||||||
|
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.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Objects;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
@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;
|
||||||
|
|
||||||
|
|
||||||
|
/* public List<ProdAdditionalFeeBlackVO> getProdReservationBlackList() {
|
||||||
|
if (prodReservationBlackList == null || prodReservationBlackList.isEmpty()) {
|
||||||
|
return prodReservationBlackList;
|
||||||
|
}
|
||||||
|
return prodReservationBlackList.stream()
|
||||||
|
.filter(black -> black != null && !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;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,9 +1,12 @@
|
|||||||
package com.tashow.cloud.productapi.api.product.vo.sku;
|
package com.tashow.cloud.productapi.api.product.vo.sku;
|
||||||
|
|
||||||
|
import com.alibaba.excel.annotation.ExcelProperty;
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
@@ -12,9 +15,13 @@ public class SkuRecycleBinVO {
|
|||||||
private Long skuId;
|
private Long skuId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 是否显示失效规格值 0否1是
|
* 属性规格名称
|
||||||
*/
|
*/
|
||||||
private String properties;
|
private String properties;
|
||||||
|
/**
|
||||||
|
* 是否显示失效规格值 0否1是
|
||||||
|
*/
|
||||||
|
private String skuName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 还剩多少天
|
* 还剩多少天
|
||||||
@@ -25,4 +32,140 @@ public class SkuRecycleBinVO {
|
|||||||
*/
|
*/
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
private Date deleteTime;
|
private Date deleteTime;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@Schema(description = "商品ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "18784")
|
||||||
|
@ExcelProperty("商品ID")
|
||||||
|
private Long prodId;
|
||||||
|
|
||||||
|
@Schema(description = "别名")
|
||||||
|
@ExcelProperty("别名")
|
||||||
|
private String alias;
|
||||||
|
|
||||||
|
@Schema(description = "当前价格", example = "32405")
|
||||||
|
@ExcelProperty("价格")
|
||||||
|
private BigDecimal price;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 基准价
|
||||||
|
*/
|
||||||
|
private BigDecimal basePrice;
|
||||||
|
|
||||||
|
@Schema(description = "最低价格", example = "5040")
|
||||||
|
@ExcelProperty("最低价格")
|
||||||
|
private BigDecimal minPrice;
|
||||||
|
|
||||||
|
@Schema(description = "最高价格", example = "11547")
|
||||||
|
@ExcelProperty("最高价格")
|
||||||
|
private BigDecimal maxPrice;
|
||||||
|
|
||||||
|
@Schema(description = "成本价", example = "28062")
|
||||||
|
@ExcelProperty("成本价")
|
||||||
|
private BigDecimal originalPrice;
|
||||||
|
|
||||||
|
@Schema(description = "市场价", example = "11547")
|
||||||
|
@ExcelProperty("市场价")
|
||||||
|
private BigDecimal marketPrice;
|
||||||
|
|
||||||
|
@Schema(description = "单位")
|
||||||
|
@ExcelProperty("单位")
|
||||||
|
private String unit;
|
||||||
|
|
||||||
|
@Schema(description = "0:主服务1:待定", example = "1")
|
||||||
|
@ExcelProperty("0:主服务1:待定")
|
||||||
|
private Integer type;
|
||||||
|
|
||||||
|
@Schema(description = "概述")
|
||||||
|
@ExcelProperty("概述")
|
||||||
|
private String overview;
|
||||||
|
|
||||||
|
@Schema(description = "库存")
|
||||||
|
@ExcelProperty("库存")
|
||||||
|
private Integer stocks;
|
||||||
|
|
||||||
|
|
||||||
|
@Schema(description = "总库存是0 无线库存是1")
|
||||||
|
@ExcelProperty("总库存是0 无线库存是1")
|
||||||
|
private Integer stocksFlg;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 锁定库存数
|
||||||
|
*/
|
||||||
|
@Schema(description = "锁定库存数")
|
||||||
|
@ExcelProperty("锁定库存数")
|
||||||
|
private Integer stocksLockNum;
|
||||||
|
|
||||||
|
@Schema(description = "预警库存")
|
||||||
|
@ExcelProperty("预警库存")
|
||||||
|
private Integer warnStocks;
|
||||||
|
|
||||||
|
@Schema(description = "库存扣款时机0:付款扣1:下单扣", example = "1")
|
||||||
|
@ExcelProperty("库存扣款时机0:付款扣1:下单扣")
|
||||||
|
private Boolean stocksType;
|
||||||
|
|
||||||
|
@Schema(description = "sku编码")
|
||||||
|
@ExcelProperty("sku编码")
|
||||||
|
private String skuCode;
|
||||||
|
|
||||||
|
@Schema(description = "商品条形码", example = "14390")
|
||||||
|
@ExcelProperty("商品条形码")
|
||||||
|
private String modelId;
|
||||||
|
|
||||||
|
@Schema(description = "sku图片")
|
||||||
|
@ExcelProperty("sku图片")
|
||||||
|
private String pic;
|
||||||
|
|
||||||
|
|
||||||
|
@Schema(description = "商品名称", example = "芋艿")
|
||||||
|
@ExcelProperty("商品名称")
|
||||||
|
private String prodName;
|
||||||
|
|
||||||
|
@Schema(description = "版本号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
@ExcelProperty("版本号")
|
||||||
|
private Integer version;
|
||||||
|
|
||||||
|
@Schema(description = "商品重量")
|
||||||
|
@ExcelProperty("商品重量")
|
||||||
|
private Double weight;
|
||||||
|
|
||||||
|
@Schema(description = "商品体积")
|
||||||
|
@ExcelProperty("商品体积")
|
||||||
|
private Double volume;
|
||||||
|
|
||||||
|
@Schema(description = "0 禁用 1 启用", example = "1")
|
||||||
|
@ExcelProperty("0 禁用 1 启用")
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
@Schema(description = "0 正常 1 已被删除")
|
||||||
|
@ExcelProperty("0 正常 1 已被删除")
|
||||||
|
private Integer isDelete;
|
||||||
|
|
||||||
|
@Schema(description = "最小购买数量")
|
||||||
|
@ExcelProperty("最小购买数量")
|
||||||
|
private Integer moq;
|
||||||
|
|
||||||
|
@Schema(description = "创建时间")
|
||||||
|
@ExcelProperty("创建时间")
|
||||||
|
private LocalDateTime createTime;
|
||||||
|
/**
|
||||||
|
* 是否上下架0下架1上架
|
||||||
|
*/
|
||||||
|
private Integer isShelf;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否默认规则0否1是
|
||||||
|
*/
|
||||||
|
private Integer isSpecs;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 服务内容
|
||||||
|
*/
|
||||||
|
private String serviceContent;
|
||||||
|
/**
|
||||||
|
* 规格id 多个用逗号分隔(1,2,3)
|
||||||
|
*/
|
||||||
|
private String propIds;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,7 +15,6 @@ public class SkuSaveReqVO {
|
|||||||
private Long skuId;
|
private Long skuId;
|
||||||
|
|
||||||
@Schema(description = "商品ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "18784")
|
@Schema(description = "商品ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "18784")
|
||||||
@NotNull(message = "商品ID不能为空")
|
|
||||||
private Long prodId;
|
private Long prodId;
|
||||||
|
|
||||||
@Schema(description = "销售属性组合字符串 格式是p1:v1;p2:v2")
|
@Schema(description = "销售属性组合字符串 格式是p1:v1;p2:v2")
|
||||||
@@ -86,7 +85,6 @@ public class SkuSaveReqVO {
|
|||||||
private String prodName;
|
private String prodName;
|
||||||
|
|
||||||
@Schema(description = "版本号", requiredMode = Schema.RequiredMode.REQUIRED)
|
@Schema(description = "版本号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
@NotNull(message = "版本号不能为空")
|
|
||||||
private Integer version;
|
private Integer version;
|
||||||
|
|
||||||
@Schema(description = "商品重量")
|
@Schema(description = "商品重量")
|
||||||
@@ -103,6 +101,11 @@ public class SkuSaveReqVO {
|
|||||||
|
|
||||||
@Schema(description = "最小购买数量")
|
@Schema(description = "最小购买数量")
|
||||||
private Integer moq;
|
private Integer moq;
|
||||||
|
/**
|
||||||
|
* 是否默认规则0否1是
|
||||||
|
*/
|
||||||
|
private Integer isSpecs;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 扩展服务表单id
|
* 扩展服务表单id
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -14,8 +14,7 @@ import java.io.Serializable;
|
|||||||
@Data
|
@Data
|
||||||
public class PageParam implements Serializable {
|
public class PageParam implements Serializable {
|
||||||
|
|
||||||
private static final Integer PAGE_NO = 1;
|
|
||||||
private static final Integer PAGE_SIZE = 10;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 每页条数 - 不分页
|
* 每页条数 - 不分页
|
||||||
@@ -29,7 +28,7 @@ public class PageParam implements Serializable {
|
|||||||
*/
|
*/
|
||||||
@NotNull(message = "页码不能为空")
|
@NotNull(message = "页码不能为空")
|
||||||
@Min(value = 1, message = "页码最小值为 1")
|
@Min(value = 1, message = "页码最小值为 1")
|
||||||
private Integer pageNo = PAGE_NO;
|
private Integer pageNo = 1;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 每页条数,最大值为 100"
|
* 每页条数,最大值为 100"
|
||||||
@@ -37,6 +36,6 @@ public class PageParam implements Serializable {
|
|||||||
@NotNull(message = "每页条数不能为空")
|
@NotNull(message = "每页条数不能为空")
|
||||||
@Min(value = 1, message = "每页条数最小值为 1")
|
@Min(value = 1, message = "每页条数最小值为 1")
|
||||||
@Max(value = 100, message = "每页条数最大值为 100")
|
@Max(value = 100, message = "每页条数最大值为 100")
|
||||||
private Integer pageSize = PAGE_SIZE;
|
private Integer pageSize = 10;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ public class GatewayServerApplication {
|
|||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
// 启动 Spring Boot 应用
|
// 启动 Spring Boot 应用
|
||||||
SpringApplication.run(GatewayServerApplication.class, args);
|
SpringApplication.run(GatewayServerApplication.class, args);
|
||||||
|
System.out.println("网关启动成功");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,10 +7,10 @@ spring:
|
|||||||
username: nacos # Nacos 账号
|
username: nacos # Nacos 账号
|
||||||
password: nacos # Nacos 密码
|
password: nacos # Nacos 密码
|
||||||
discovery: # 【配置中心】配置项
|
discovery: # 【配置中心】配置项
|
||||||
namespace: 76667956-2ac2-4e05-906b-4bca4ebcc5f0 # 命名空间。这里使用 dev 开发环境
|
namespace: 16bd40df-7cc7-4c2c-82c2-6186ade7bb08 # 命名空间。这里使用 dev 开发环境
|
||||||
group: DEFAULT_GROUP # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
|
group: DEFAULT_GROUP # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
|
||||||
config: # 【注册中心】配置项
|
config: # 【注册中心】配置项
|
||||||
namespace: 76667956-2ac2-4e05-906b-4bca4ebcc5f0 # 命名空间。这里使用 dev 开发环境
|
namespace: 16bd40df-7cc7-4c2c-82c2-6186ade7bb08 # 命名空间。这里使用 dev 开发环境
|
||||||
group: DEFAULT_GROUP # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
|
group: DEFAULT_GROUP # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
|
||||||
|
|
||||||
# 日志文件配置
|
# 日志文件配置
|
||||||
|
|||||||
@@ -96,9 +96,26 @@
|
|||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-starter-actuator</artifactId>
|
<artifactId>spring-boot-starter-actuator</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>com.tashow.cloud</groupId>
|
|
||||||
<artifactId>tashow-data-redis</artifactId>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<finalName>${project.artifactId}</finalName>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||||
|
<version>${spring.boot.version}</version>
|
||||||
|
<configuration>
|
||||||
|
<mainClass>com.tashow.cloud.product.ProductServerApplication</mainClass>
|
||||||
|
</configuration>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<goals>
|
||||||
|
<goal>repackage</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
</project>
|
</project>
|
||||||
|
|||||||
@@ -14,5 +14,6 @@ public class ProductServerApplication {
|
|||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
SpringApplication.run(ProductServerApplication.class, args);
|
SpringApplication.run(ProductServerApplication.class, args);
|
||||||
|
System.out.println("产品启动成功");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -54,8 +54,8 @@ public class ProdController {
|
|||||||
@PostMapping("/uptateProdService")
|
@PostMapping("/uptateProdService")
|
||||||
@Operation(summary = "修改商品服务配置")
|
@Operation(summary = "修改商品服务配置")
|
||||||
@PermitAll
|
@PermitAll
|
||||||
public CommonResult<Boolean> uptateProdService(@Valid @RequestBody ProdServiceVO prodServiceVO) {
|
public CommonResult<Boolean> uptateProdService(@Valid @RequestBody ProdServiceInfoVO prodServiceInfoVO) {
|
||||||
prodService.uptateProdService(prodServiceVO);
|
prodService.uptateProdService(prodServiceInfoVO);
|
||||||
return success(true);
|
return success(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -114,7 +114,7 @@ public class ProdController {
|
|||||||
ProdDO prod = new ProdDO();
|
ProdDO prod = new ProdDO();
|
||||||
prod.setProdId(id);
|
prod.setProdId(id);
|
||||||
prod.setStatus(status);
|
prod.setStatus(status);
|
||||||
prodMapper.updateBatch(prod);
|
prodMapper.updateById(prod);
|
||||||
}
|
}
|
||||||
return success(true);
|
return success(true);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,12 +3,16 @@ package com.tashow.cloud.product.controller.admin;
|
|||||||
import com.tashow.cloud.common.pojo.CommonResult;
|
import com.tashow.cloud.common.pojo.CommonResult;
|
||||||
import com.tashow.cloud.common.pojo.PageResult;
|
import com.tashow.cloud.common.pojo.PageResult;
|
||||||
import com.tashow.cloud.common.util.object.BeanUtils;
|
import com.tashow.cloud.common.util.object.BeanUtils;
|
||||||
|
import com.tashow.cloud.product.mapper.ProdPropMapper;
|
||||||
|
import com.tashow.cloud.product.mapper.ProdPropValueMapper;
|
||||||
import com.tashow.cloud.productapi.api.product.dto.*;
|
import com.tashow.cloud.productapi.api.product.dto.*;
|
||||||
import com.tashow.cloud.product.mapper.SkuMapper;
|
import com.tashow.cloud.product.mapper.SkuMapper;
|
||||||
import com.tashow.cloud.product.service.ProdExtendService;
|
import com.tashow.cloud.product.service.ProdExtendService;
|
||||||
import com.tashow.cloud.product.service.ProdPropService;
|
import com.tashow.cloud.product.service.ProdPropService;
|
||||||
import com.tashow.cloud.product.service.ProdPropValueService;
|
import com.tashow.cloud.product.service.ProdPropValueService;
|
||||||
import com.tashow.cloud.product.service.SkuService;
|
import com.tashow.cloud.product.service.SkuService;
|
||||||
|
import com.tashow.cloud.productapi.api.product.vo.prodpropvalue.ProPageReqVO;
|
||||||
|
import com.tashow.cloud.productapi.api.product.vo.prodpropvalue.ProPropRecycleBinVO;
|
||||||
import com.tashow.cloud.productapi.api.product.vo.sku.*;
|
import com.tashow.cloud.productapi.api.product.vo.sku.*;
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
import io.swagger.v3.oas.annotations.Parameter;
|
import io.swagger.v3.oas.annotations.Parameter;
|
||||||
@@ -41,6 +45,12 @@ public class SkuController {
|
|||||||
@Resource
|
@Resource
|
||||||
private ProdExtendService prodExtendService;
|
private ProdExtendService prodExtendService;
|
||||||
|
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private ProdPropValueMapper prodPropValueMapper;
|
||||||
|
@Resource
|
||||||
|
private ProdPropMapper prodPropMapper;
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private SkuMapper skuMapper;
|
private SkuMapper skuMapper;
|
||||||
|
|
||||||
@@ -54,20 +64,40 @@ public class SkuController {
|
|||||||
@PutMapping("/update")
|
@PutMapping("/update")
|
||||||
@Operation(summary = "更新单品SKU")
|
@Operation(summary = "更新单品SKU")
|
||||||
@PermitAll
|
@PermitAll
|
||||||
public CommonResult<Boolean> updateSku(@Valid @RequestBody SkuSaveReqVO updateReqVO) {
|
public CommonResult<Boolean> updateSku(@RequestBody SkuSaveReqVO updateReqVO) {
|
||||||
skuService.updateSku(updateReqVO);
|
skuService.updateSku(updateReqVO);
|
||||||
return success(true);
|
return success(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@PutMapping("/updateProp")
|
@PutMapping("/updateProp")
|
||||||
@Operation(summary = "更新sku规格")
|
@Operation(summary = "新增统一保存sku规格")
|
||||||
@PermitAll
|
@PermitAll
|
||||||
public CommonResult<Boolean> updateProp(@Valid @RequestBody SkuPropVO skuPropVO) {
|
public CommonResult<Boolean> updateProp(@Valid @RequestBody SkuPropVO skuPropVO) {
|
||||||
skuService.updateProp(skuPropVO);
|
skuService.updateProp(skuPropVO);
|
||||||
return success(true);
|
return success(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PutMapping("/updatePropValue")
|
||||||
|
@Operation(summary = "修改属性下面规格值")
|
||||||
|
@PermitAll
|
||||||
|
public CommonResult<Boolean> updatePropValue(@RequestParam("id") Long id,@RequestParam("propValue") String propValue) {
|
||||||
|
skuService.updatePropVal(id,propValue);
|
||||||
|
return success(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PutMapping("/updateProdProp")
|
||||||
|
@Operation(summary = "修改属性规格值")
|
||||||
|
@PermitAll
|
||||||
|
public CommonResult<Boolean> updateProdProp(@RequestParam("id") Long id,@RequestParam("propName") String propName) {
|
||||||
|
ProdPropDO prodPropDO = new ProdPropDO();
|
||||||
|
prodPropDO.setId( id);
|
||||||
|
prodPropDO.setPropName(propName);
|
||||||
|
prodPropMapper.updateById(prodPropDO);
|
||||||
|
return success(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@GetMapping("/getSKuPropList")
|
@GetMapping("/getSKuPropList")
|
||||||
@Operation(summary = "获取sku规格")
|
@Operation(summary = "获取sku规格")
|
||||||
@PermitAll
|
@PermitAll
|
||||||
@@ -76,6 +106,25 @@ public class SkuController {
|
|||||||
return success(skuService.getSKuPropList(prodId));
|
return success(skuService.getSKuPropList(prodId));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@PermitAll
|
||||||
|
@GetMapping("/getPropRecycleBinList")
|
||||||
|
@Operation(summary = "获取规格回收站")
|
||||||
|
public CommonResult<PageResult<ProPropRecycleBinVO>> getSKuPropRecycleBinList(ProPageReqVO proPageReqVO) {
|
||||||
|
PageResult<ProPropRecycleBinVO> pageResult = skuService.getSKuPropRecycleBinList(proPageReqVO);
|
||||||
|
return success(pageResult);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/restorePropList")
|
||||||
|
@Operation(summary = "恢复规格")
|
||||||
|
@Parameter(name = "ids", description = "规格id集合", required = true)
|
||||||
|
@PermitAll
|
||||||
|
public CommonResult<Boolean> restorePropList(@RequestParam("ids") List<Long> ids) {
|
||||||
|
skuService.restorePropList(ids);
|
||||||
|
return success(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@PutMapping("/deleteProp")
|
@PutMapping("/deleteProp")
|
||||||
@Operation(summary = "删除规格值")
|
@Operation(summary = "删除规格值")
|
||||||
@PermitAll
|
@PermitAll
|
||||||
@@ -86,10 +135,12 @@ public class SkuController {
|
|||||||
|
|
||||||
|
|
||||||
@PutMapping("/disableProp")
|
@PutMapping("/disableProp")
|
||||||
@Operation(summary = "禁用规格值")
|
@Operation(summary = "禁用或者启用规格值")
|
||||||
|
@Parameter(name = "id", description = "规格id")
|
||||||
|
@Parameter(name = "state", description = "状态0禁用1启用")
|
||||||
@PermitAll
|
@PermitAll
|
||||||
public CommonResult<Boolean> disableProp(@RequestParam("id") Long id) {
|
public CommonResult<Boolean> disableProp(@RequestParam("id") Long id,@RequestParam("state") Integer state) {
|
||||||
skuService.disableProp(id);
|
skuService.disableProp(id,state);
|
||||||
return success(true);
|
return success(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -108,19 +159,12 @@ public class SkuController {
|
|||||||
@Parameter(name = "ids", description = "编号", required = true)
|
@Parameter(name = "ids", description = "编号", required = true)
|
||||||
@PermitAll
|
@PermitAll
|
||||||
public CommonResult<Boolean> deleteSkuList(@RequestParam("ids") List<Long> ids) {
|
public CommonResult<Boolean> deleteSkuList(@RequestParam("ids") List<Long> ids) {
|
||||||
/*for(Long id:ids){
|
|
||||||
SkuDO sku = new SkuDO();
|
|
||||||
sku.setSkuId(id);
|
|
||||||
sku.setDeleteTime(new Date());
|
|
||||||
// 删除
|
|
||||||
skuMapper.deleteById(sku);
|
|
||||||
}*/
|
|
||||||
skuService.deleteSkus(ids);
|
skuService.deleteSkus(ids);
|
||||||
return success(true);
|
return success(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@PostMapping("/updateSkuShelf")
|
@PutMapping("/updateSkuShelf")
|
||||||
@Operation(summary = "修改单品上下架")
|
@Operation(summary = "修改单品上下架")
|
||||||
@Parameter(name = "id", description = "编号", required = true)
|
@Parameter(name = "id", description = "编号", required = true)
|
||||||
@Parameter(name = "isShelf", description = "是否上下架(0下架 1上架)", required = true)
|
@Parameter(name = "isShelf", description = "是否上下架(0下架 1上架)", required = true)
|
||||||
@@ -130,7 +174,7 @@ public class SkuController {
|
|||||||
return success(true);
|
return success(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/updateSkuShelfList")
|
@PutMapping("/updateSkuShelfList")
|
||||||
@Operation(summary = "批量上下架")
|
@Operation(summary = "批量上下架")
|
||||||
@Parameter(name = "ids", description = "编号", required = true)
|
@Parameter(name = "ids", description = "编号", required = true)
|
||||||
@Parameter(name = "isShelf", description = "是否上下架(0下架 1上架)", required = true)
|
@Parameter(name = "isShelf", description = "是否上下架(0下架 1上架)", required = true)
|
||||||
@@ -140,7 +184,7 @@ public class SkuController {
|
|||||||
SkuDO sku = new SkuDO();
|
SkuDO sku = new SkuDO();
|
||||||
sku.setSkuId(id);
|
sku.setSkuId(id);
|
||||||
sku.setIsShelf(isShelf);
|
sku.setIsShelf(isShelf);
|
||||||
skuMapper.updateBatch(sku);
|
skuMapper.updateById(sku);
|
||||||
}
|
}
|
||||||
skuService.updatSkuIsShelfs(ids,isShelf);
|
skuService.updatSkuIsShelfs(ids,isShelf);
|
||||||
return success(true);
|
return success(true);
|
||||||
|
|||||||
@@ -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);
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -30,24 +30,9 @@ public interface ProdMapper extends BaseMapperX<ProdDO> {
|
|||||||
, @Param("status") Integer status
|
, @Param("status") Integer status
|
||||||
, @Param("categoryId") Long categoryId);
|
, @Param("categoryId") Long categoryId);
|
||||||
|
|
||||||
ProdServiceVO selectProdService(@Param("prodId") Long prodId
|
ProdServiceVO selectProdService(@Param("prodId") Long prodId);
|
||||||
, @Param("regionSwitch") Integer regionSwitch
|
|
||||||
, @Param("reservationSwitch") Integer reservationSwitch
|
|
||||||
, @Param("emergencySwitch") Integer emergencySwitch
|
|
||||||
, @Param("orderLimitSwitch") Integer orderLimitSwitch
|
|
||||||
, @Param("additionalSwitch") Integer additionalSwitch
|
|
||||||
, @Param("additionalFeeSwitch") Integer additionalFeeSwitch
|
|
||||||
, @Param("weightSwitch") Integer weightSwitch
|
|
||||||
);
|
|
||||||
|
|
||||||
ProdServiceVO selectProdServiceInfo(@Param("prodId") Long prodId
|
ProdServiceVO selectProdServiceInfo(@Param("prodId") Long prodId);
|
||||||
, @Param("reservationSwitch") Integer reservationSwitch
|
|
||||||
, @Param("emergencySwitch") Integer emergencySwitch
|
|
||||||
, @Param("orderLimitSwitch") Integer orderLimitSwitch
|
|
||||||
, @Param("additionalSwitch") Integer additionalSwitch
|
|
||||||
, @Param("additionalFeeSwitch") Integer additionalFeeSwitch
|
|
||||||
, @Param("weightSwitch") Integer weightSwitch
|
|
||||||
);
|
|
||||||
|
|
||||||
IPage<ProdRestoreListVO> getProdRecycleBinPageList(Page<?> page, @Param("deleteTime") String[] deleteTime
|
IPage<ProdRestoreListVO> getProdRecycleBinPageList(Page<?> page, @Param("deleteTime") String[] deleteTime
|
||||||
, @Param("prodName") String prodName);
|
, @Param("prodName") String prodName);
|
||||||
|
|||||||
@@ -2,10 +2,15 @@ package com.tashow.cloud.product.mapper;
|
|||||||
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.tashow.cloud.common.pojo.PageResult;
|
import com.tashow.cloud.common.pojo.PageResult;
|
||||||
import com.tashow.cloud.mybatis.mybatis.core.query.LambdaQueryWrapperX;
|
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.ProdPropValueDO;
|
import com.tashow.cloud.productapi.api.product.dto.ProdPropValueDO;
|
||||||
|
import com.tashow.cloud.productapi.api.product.dto.SkuDO;
|
||||||
|
import com.tashow.cloud.productapi.api.product.vo.prodpropvalue.ProPropRecycleBinVO;
|
||||||
|
import com.tashow.cloud.productapi.api.product.vo.sku.SkuRecycleBinVO;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
@@ -34,4 +39,14 @@ public interface ProdPropValueMapper extends BaseMapperX<ProdPropValueDO> {
|
|||||||
|
|
||||||
List<ProdPropValueDO> selectRestoreProp(@Param("prodId") Long prodId);
|
List<ProdPropValueDO> selectRestoreProp(@Param("prodId") Long prodId);
|
||||||
|
|
||||||
|
IPage<ProPropRecycleBinVO> getSKuPropRecycleBinList(Page<?> page, @Param("prodId") Long prodId,@Param("propValue")String propValue);
|
||||||
|
|
||||||
|
List<ProdPropValueDO> getskuListByPropValueIds(@Param("ids")List<Long> ids);
|
||||||
|
|
||||||
|
void restorePropValue(@Param("ids") List<Long> ids);
|
||||||
|
|
||||||
|
int getMaxPropValue(@Param("propId")Long propId);
|
||||||
|
|
||||||
|
// 根据商品 ID 更新销售属性值的 state(仅 rule=1 的)
|
||||||
|
void updateStateByProdId(@Param("prodId") Long prodId, @Param("state") Integer state);
|
||||||
}
|
}
|
||||||
@@ -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);
|
||||||
}
|
}
|
||||||
@@ -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.ProdWeightRangePricesDO;
|
import com.tashow.cloud.productapi.api.product.dto.ProdWeightRangePricesDO;
|
||||||
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 ProdWeightRangePricesMapper extends BaseMapperX<ProdWeightRangePricesDO> {
|
public interface ProdWeightRangePricesMapper extends BaseMapperX<ProdWeightRangePricesDO> {
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除关联
|
||||||
|
*/
|
||||||
|
public int deleteWeightRangePrices(@Param("prodId")Long prodId);
|
||||||
}
|
}
|
||||||
@@ -23,7 +23,8 @@ public interface SkuMapper extends BaseMapperX<SkuDO> {
|
|||||||
IPage<SkuDO> getSkuPageList(Page<?> page, @Param("prodId") Long prodId,@Param("skuId") Long skuId, @Param("properties")String properties);
|
IPage<SkuDO> getSkuPageList(Page<?> page, @Param("prodId") Long prodId,@Param("skuId") Long skuId, @Param("properties")String properties);
|
||||||
|
|
||||||
|
|
||||||
List<SkuDO> getSkuListByName( @Param("propertiesName")String propertiesName);
|
List<SkuDO> getSkuListByName( @Param("prodId")Long prodId , @Param("propertiesName")String propertiesName);
|
||||||
|
|
||||||
List<String> selectPropertiesByProdIdAndNotDeleted( @Param("prodId")Long prodId);
|
List<String> selectPropertiesByProdIdAndNotDeleted( @Param("prodId")Long prodId);
|
||||||
|
|
||||||
List<String> selectPropertiesByProdIdShelf( @Param("prodId")Long prodId);
|
List<String> selectPropertiesByProdIdShelf( @Param("prodId")Long prodId);
|
||||||
@@ -31,4 +32,16 @@ public interface SkuMapper extends BaseMapperX<SkuDO> {
|
|||||||
int deleteBySkuId( @Param("skuId")Long skuId);
|
int deleteBySkuId( @Param("skuId")Long skuId);
|
||||||
|
|
||||||
void batchSkuDeleted(@Param("ids") List<Long> ids);
|
void batchSkuDeleted(@Param("ids") List<Long> ids);
|
||||||
|
|
||||||
|
void updateSkuDeleted(@Param("skuId") Long skuId);
|
||||||
|
|
||||||
|
|
||||||
|
List<SkuDO> getskuListBySkuIds( @Param("ids")List<Long> ids);
|
||||||
|
|
||||||
|
List<SkuDO> getskuListByDeleted( @Param("prodId")Long prodId,@Param("ids")List<Long> ids);
|
||||||
|
|
||||||
|
void batchSkuRecover(@Param("ids") List<Long> ids);
|
||||||
|
|
||||||
|
// 查询商品下所有 SKU 的 is_shelf 状态(未删除)
|
||||||
|
List<Integer> selectShelfStatusByProdId(@Param("prodId") Long prodId);
|
||||||
}
|
}
|
||||||
@@ -36,10 +36,10 @@ public interface ProdService {
|
|||||||
/**
|
/**
|
||||||
* 修改商品服务配置
|
* 修改商品服务配置
|
||||||
*
|
*
|
||||||
* @param prodServiceVO 创建信息
|
* @param prodServiceInfoVO 创建信息
|
||||||
* @return 编号
|
* @return 编号
|
||||||
*/
|
*/
|
||||||
void uptateProdService(@Valid ProdServiceVO prodServiceVO);
|
void uptateProdService(@Valid ProdServiceInfoVO prodServiceInfoVO);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,8 @@ package com.tashow.cloud.product.service;
|
|||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
import com.tashow.cloud.productapi.api.product.dto.*;
|
import com.tashow.cloud.productapi.api.product.dto.*;
|
||||||
|
import com.tashow.cloud.productapi.api.product.vo.prodpropvalue.ProPageReqVO;
|
||||||
|
import com.tashow.cloud.productapi.api.product.vo.prodpropvalue.ProPropRecycleBinVO;
|
||||||
import com.tashow.cloud.productapi.api.product.vo.sku.*;
|
import com.tashow.cloud.productapi.api.product.vo.sku.*;
|
||||||
import jakarta.validation.*;
|
import jakarta.validation.*;
|
||||||
import com.tashow.cloud.common.pojo.PageResult;
|
import com.tashow.cloud.common.pojo.PageResult;
|
||||||
@@ -56,6 +58,9 @@ public interface SkuService {
|
|||||||
*/
|
*/
|
||||||
void updateProp(SkuPropVO skuPropVO);
|
void updateProp(SkuPropVO skuPropVO);
|
||||||
|
|
||||||
|
|
||||||
|
void updatePropVal(Long id, String propValue);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除规格值
|
* 删除规格值
|
||||||
*
|
*
|
||||||
@@ -68,12 +73,13 @@ public interface SkuService {
|
|||||||
*
|
*
|
||||||
* @param id 删除规格值
|
* @param id 删除规格值
|
||||||
*/
|
*/
|
||||||
void disableProp(Long id);
|
void disableProp(Long id,Integer state);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
SkuPropInfoVO getSKuPropList(Long prodId);
|
SkuPropInfoVO getSKuPropList(Long prodId);
|
||||||
|
|
||||||
|
PageResult<ProPropRecycleBinVO> getSKuPropRecycleBinList(ProPageReqVO proPageReqVO);
|
||||||
/**
|
/**
|
||||||
* 删除单品SKU
|
* 删除单品SKU
|
||||||
*
|
*
|
||||||
@@ -94,6 +100,12 @@ public interface SkuService {
|
|||||||
* @param ids
|
* @param ids
|
||||||
*/
|
*/
|
||||||
void restoreSkuList(List<Long> ids);
|
void restoreSkuList(List<Long> ids);
|
||||||
|
/**
|
||||||
|
* 恢复规格
|
||||||
|
*
|
||||||
|
* @param ids
|
||||||
|
*/
|
||||||
|
void restorePropList(List<Long> ids);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -12,6 +12,10 @@ 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.prodemergencyresponse.ProdEmergencyInfoVO;
|
||||||
|
import com.tashow.cloud.productapi.api.product.vo.prodreservationconfig.ProdReservationInfoReqVO;
|
||||||
|
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 +127,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());
|
||||||
@@ -165,18 +169,18 @@ 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());
|
prodDO.setWeightSwitch(BaseEnum.YES_ONE.getKey());
|
||||||
ProdWeightRangePricesDO prodWeightRangePrices = prodServiceVO.prodWeightConfig;
|
ProdWeightRangePricesDO prodWeightRangePrices = prodServiceVO.prodWeightConfig;
|
||||||
prodWeightRangePrices.setProdId(prodDO.getProdId());
|
prodWeightRangePrices.setProdId(prodDO.getProdId());
|
||||||
prodWeightRangePricesMapper.insert(prodWeightRangePrices);
|
prodWeightRangePricesMapper.insert(prodWeightRangePrices);
|
||||||
}
|
}*/
|
||||||
prodMapper.updateById(prodDO);
|
prodMapper.updateById(prodDO);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional
|
@Transactional
|
||||||
public void uptateProdService(ProdServiceVO prodServiceVO) {
|
public void uptateProdService(ProdServiceInfoVO prodServiceVO) {
|
||||||
|
|
||||||
ProdDO prod = BeanUtils.toBean(prodServiceVO, ProdDO.class);
|
ProdDO prod = BeanUtils.toBean(prodServiceVO, ProdDO.class);
|
||||||
//服务区域设置
|
//服务区域设置
|
||||||
@@ -233,17 +237,39 @@ public class ProdServiceImpl implements ProdService {
|
|||||||
if (Objects.equals(prodServiceVO.getReservationSwitch(), BaseEnum.YES_ONE.getKey())) {
|
if (Objects.equals(prodServiceVO.getReservationSwitch(), BaseEnum.YES_ONE.getKey())) {
|
||||||
ProdReservationConfigDO reservationConfig = prodReservationConfigMapper.selectOne(new LambdaQueryWrapper<ProdReservationConfigDO>()
|
ProdReservationConfigDO reservationConfig = prodReservationConfigMapper.selectOne(new LambdaQueryWrapper<ProdReservationConfigDO>()
|
||||||
.eq(ProdReservationConfigDO::getProdId, prodServiceVO.getProdId()));
|
.eq(ProdReservationConfigDO::getProdId, prodServiceVO.getProdId()));
|
||||||
|
ProdReservationInfoReqVO prodReservationInfoVO = prodServiceVO.getProdReservationConfig();
|
||||||
if (reservationConfig == null) {
|
if (reservationConfig == null) {
|
||||||
prod.setReservationSwitch(BaseEnum.YES_ONE.getKey());
|
prod.setReservationSwitch(BaseEnum.YES_ONE.getKey());
|
||||||
ProdReservationConfigDO prodReservationConfigDO = prodServiceVO.getProdReservationConfig();
|
ProdReservationConfigDO prodReservationConfigDO = BeanUtils.toBean(prodReservationInfoVO, ProdReservationConfigDO.class);
|
||||||
prodReservationConfigDO.setProdId(prod.getProdId());
|
prodReservationConfigDO.setProdId(prod.getProdId());
|
||||||
prodReservationConfigDO.setTimeBook(prodServiceVO.getProdReservationConfig().getTimeBook());
|
prodReservationConfigDO.setTimeSlot(prodReservationInfoVO.getTimeBook().getTimeSlot());
|
||||||
prodReservationConfigDO.setReservationTimeSlots(prodServiceVO.getProdReservationConfig().getReservationTimeSlots());
|
prodReservationConfigDO.setReservationTimeSlots(prodReservationInfoVO.getTimeBook().getReservationTimeSlots());
|
||||||
prodReservationConfigMapper.insert(prodReservationConfigDO);
|
prodReservationConfigMapper.insert(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);
|
||||||
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
prodServiceVO.getProdReservationConfig().setTimeBook(prodServiceVO.getProdReservationConfig().getTimeBook());
|
ProdReservationConfigDO prodReservationConfigDO = BeanUtils.toBean(prodServiceVO.getProdReservationConfig(), ProdReservationConfigDO.class);
|
||||||
prodServiceVO.getProdReservationConfig().setReservationTimeSlots(prodServiceVO.getProdReservationConfig().getReservationTimeSlots());
|
prodReservationConfigDO.setTimeSlot(prodReservationInfoVO.getTimeBook().getTimeSlot());
|
||||||
prodReservationConfigMapper.updateById(prodServiceVO.getProdReservationConfig());
|
prodReservationConfigDO.setReservationTimeSlots(prodReservationInfoVO.getTimeBook().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);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//紧急响应设置
|
//紧急响应设置
|
||||||
@@ -258,12 +284,21 @@ public class ProdServiceImpl implements ProdService {
|
|||||||
prodEmergencyResponseMapper.insert(prodEmergencyResponse);
|
prodEmergencyResponseMapper.insert(prodEmergencyResponse);
|
||||||
if (prodServiceVO.getProdEmergencyInfoVO().getProdEmergencyResponseIntervalsList() != null) {
|
if (prodServiceVO.getProdEmergencyInfoVO().getProdEmergencyResponseIntervalsList() != null) {
|
||||||
for (ProdEmergencyResponseIntervalsDO prodEmergencyResponseIntervals : prodServiceVO.getProdEmergencyInfoVO().getProdEmergencyResponseIntervalsList()) {
|
for (ProdEmergencyResponseIntervalsDO prodEmergencyResponseIntervals : prodServiceVO.getProdEmergencyInfoVO().getProdEmergencyResponseIntervalsList()) {
|
||||||
|
prodEmergencyResponseIntervals.setId(null);
|
||||||
prodEmergencyResponseIntervals.setConfigId(prodEmergencyResponse.getId());
|
prodEmergencyResponseIntervals.setConfigId(prodEmergencyResponse.getId());
|
||||||
prodEmergencyResponseIntervals.setProdId(prod.getProdId());
|
prodEmergencyResponseIntervals.setProdId(prod.getProdId());
|
||||||
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.setId(null);
|
||||||
|
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) {
|
||||||
@@ -271,11 +306,23 @@ public class ProdServiceImpl implements ProdService {
|
|||||||
prodEmergencyResponseIntervalsMapper.deleteIntervals(prodEmergencyResponse.getId());
|
prodEmergencyResponseIntervalsMapper.deleteIntervals(prodEmergencyResponse.getId());
|
||||||
if (prodServiceVO.getProdEmergencyInfoVO().getProdEmergencyResponseIntervalsList() != null) {
|
if (prodServiceVO.getProdEmergencyInfoVO().getProdEmergencyResponseIntervalsList() != null) {
|
||||||
for (ProdEmergencyResponseIntervalsDO prodEmergencyResponseIntervals : prodServiceVO.getProdEmergencyInfoVO().getProdEmergencyResponseIntervalsList()) {
|
for (ProdEmergencyResponseIntervalsDO prodEmergencyResponseIntervals : prodServiceVO.getProdEmergencyInfoVO().getProdEmergencyResponseIntervalsList()) {
|
||||||
|
prodEmergencyResponseIntervals.setId(null);
|
||||||
prodEmergencyResponseIntervals.setConfigId(prodEmergencyResponse.getId());
|
prodEmergencyResponseIntervals.setConfigId(prodEmergencyResponse.getId());
|
||||||
prodEmergencyResponseIntervals.setProdId(prod.getProdId());
|
prodEmergencyResponseIntervals.setProdId(prod.getProdId());
|
||||||
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.setId(null);
|
||||||
|
prodAdditionalFeeDatesDO.setProdId(prod.getProdId());
|
||||||
|
prodAdditionalFeeDatesDO.setType(3);
|
||||||
|
prodAdditionalFeeDatesMapper.insert(prodAdditionalFeeDatesDO);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -298,6 +345,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);
|
||||||
@@ -317,13 +365,23 @@ public class ProdServiceImpl implements ProdService {
|
|||||||
}
|
}
|
||||||
//体重设置
|
//体重设置
|
||||||
if (Objects.equals(prodServiceVO.getWeightSwitch(), BaseEnum.YES_ONE.getKey())) {
|
if (Objects.equals(prodServiceVO.getWeightSwitch(), BaseEnum.YES_ONE.getKey())) {
|
||||||
if (prodServiceVO.getProdWeightConfig().getId() == null) {
|
prod.setWeightSwitch(prodServiceVO.getWeightSwitch());
|
||||||
prod.setWeightSwitch(BaseEnum.YES_ONE.getKey());
|
ProdExtendDO prodExtendDO = prodExtendMapper.selectOne(ProdExtendDO::getProdId, prod.getProdId());
|
||||||
ProdWeightRangePricesDO prodWeightRangePrices = prodServiceVO.getProdWeightConfig();
|
if (prodExtendDO != null) {
|
||||||
prodWeightRangePrices.setProdId(prod.getProdId());
|
prodExtendDO.setIsWeightCharge(prodServiceVO.getProdWeightConfig().getIsWeightCharge());
|
||||||
prodWeightRangePricesMapper.insert(prodWeightRangePrices);
|
prodExtendMapper.updateById(prodExtendDO);
|
||||||
} else {
|
} 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);
|
prodMapper.updateById(prod);
|
||||||
@@ -332,15 +390,66 @@ public class ProdServiceImpl implements ProdService {
|
|||||||
@Override
|
@Override
|
||||||
public ProdServiceVO getProdService(Long prodId) {
|
public ProdServiceVO getProdService(Long prodId) {
|
||||||
ProdDO prodDO = prodMapper.selectById(prodId);
|
ProdDO prodDO = prodMapper.selectById(prodId);
|
||||||
if (prodDO != null && prodDO.getRegionSwitch() == BaseEnum.YES_ONE.getKey()) {
|
ProdServiceVO prodServiceVO = prodMapper.selectProdService(prodDO.getProdId());
|
||||||
return prodMapper.selectProdService(prodDO.getProdId(), prodDO.getRegionSwitch(),
|
|
||||||
prodDO.getReservationSwitch(), prodDO.getEmergencySwitch(), prodDO.getOrderLimitSwitch(),
|
if (prodServiceVO.getProdEmergencyInfoVO().getId()== null) {
|
||||||
prodDO.getAdditionalSwitch(), prodDO.getAdditionalFeeSwitch(), prodDO.getWeightSwitch());
|
prodServiceVO.setProdEmergencyInfoVO(null);
|
||||||
}else {
|
}else {
|
||||||
return prodMapper.selectProdServiceInfo(prodDO.getProdId(),
|
if (prodServiceVO.getProdEmergencyInfoVO().getId()!= null&&prodServiceVO.getProdEmergencyInfoVO().getProdEmergencyResponseIntervalsList().size()== 0) {
|
||||||
prodDO.getReservationSwitch(), prodDO.getEmergencySwitch(), prodDO.getOrderLimitSwitch(),
|
ProdEmergencyInfoVO prodEmergencyInfoVO = prodServiceVO.getProdEmergencyInfoVO();
|
||||||
prodDO.getAdditionalSwitch(), prodDO.getAdditionalFeeSwitch(), prodDO.getWeightSwitch());
|
prodEmergencyInfoVO.setProdEmergencyResponseIntervalsList(new ArrayList<>());
|
||||||
}
|
}
|
||||||
|
if (prodServiceVO.getProdEmergencyInfoVO().getId()!= null&&prodServiceVO.getProdEmergencyInfoVO().getProdEmergencyResponseBlackList().get(0).isEmpty()) {
|
||||||
|
ProdEmergencyInfoVO prodEmergencyInfoVO = prodServiceVO.getProdEmergencyInfoVO();
|
||||||
|
prodEmergencyInfoVO.setProdEmergencyResponseBlackList(new ArrayList<>());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (prodServiceVO.getProdAdditionalFeeDatesList().get(0).getId()==null) {
|
||||||
|
prodServiceVO.setProdAdditionalFeeDatesList(new ArrayList<>());
|
||||||
|
}
|
||||||
|
if (prodServiceVO.getProdAdditionalFeePeriodsList().get(0).getId()==null) {
|
||||||
|
prodServiceVO.setProdAdditionalFeePeriodsList(new ArrayList<>());
|
||||||
|
}
|
||||||
|
return prodServiceVO;
|
||||||
|
/* if (prodDO != null && prodDO.getRegionSwitch() == BaseEnum.YES_ONE.getKey()) {
|
||||||
|
ProdServiceVO prodServiceVO = prodMapper.selectProdService(prodDO.getProdId());
|
||||||
|
if (Objects.equals(prodDO.getReservationSwitch(), BaseEnum.YES_ONE.getKey())&&prodServiceVO.getProdReservationConfig().getProdReservationBlackList().get(0).isEmpty()) {
|
||||||
|
ProdReservationInfoVO prodReservationInfoVO = prodServiceVO.getProdReservationConfig();
|
||||||
|
prodReservationInfoVO.setProdReservationBlackList(new ArrayList<>());
|
||||||
|
}
|
||||||
|
if (Objects.equals(prodDO.getEmergencySwitch(), BaseEnum.YES_ONE.getKey())&&prodServiceVO.getProdEmergencyInfoVO().getProdEmergencyResponseIntervalsList().get(0).isEmpty()) {
|
||||||
|
ProdEmergencyInfoVO prodEmergencyInfoVO = prodServiceVO.getProdEmergencyInfoVO();
|
||||||
|
prodEmergencyInfoVO.setProdEmergencyResponseIntervalsList(new ArrayList<>());
|
||||||
|
}
|
||||||
|
if (Objects.equals(prodDO.getAdditionalSwitch(), BaseEnum.YES_ONE.getKey())&&prodServiceVO.getProdAdditionalFeeDatesList().get(0).isEmpty()) {
|
||||||
|
prodServiceVO.setProdAdditionalFeeDatesList(new ArrayList<>());
|
||||||
|
}
|
||||||
|
if (Objects.equals(prodDO.getAdditionalFeeSwitch(), BaseEnum.YES_ONE.getKey())&&prodServiceVO.getProdAdditionalFeePeriodsList().get(0).isEmpty()) {
|
||||||
|
prodServiceVO.setProdAdditionalFeePeriodsList(new ArrayList<>());
|
||||||
|
}
|
||||||
|
return prodServiceVO;
|
||||||
|
} else {
|
||||||
|
ProdServiceVO prodServiceVO = prodMapper.selectProdServiceInfo(prodDO.getProdId());
|
||||||
|
if (Objects.equals(prodDO.getReservationSwitch(), BaseEnum.YES_ONE.getKey())&&prodServiceVO.getProdReservationConfig()!=null&&prodServiceVO.getProdReservationConfig().getProdReservationBlackList().get(0).isEmpty()) {
|
||||||
|
ProdReservationInfoVO prodReservationInfoVO = prodServiceVO.getProdReservationConfig();
|
||||||
|
prodReservationInfoVO.setProdReservationBlackList(new ArrayList<>());
|
||||||
|
}
|
||||||
|
if (Objects.equals(prodDO.getEmergencySwitch(), BaseEnum.YES_ONE.getKey())&&prodServiceVO.getProdEmergencyInfoVO()!=null&&prodServiceVO.getProdEmergencyInfoVO().getProdEmergencyResponseIntervalsList().get(0).isEmpty()) {
|
||||||
|
ProdEmergencyInfoVO prodEmergencyInfoVO = prodServiceVO.getProdEmergencyInfoVO();
|
||||||
|
prodEmergencyInfoVO.setProdEmergencyResponseIntervalsList(new ArrayList<>());
|
||||||
|
}
|
||||||
|
if (Objects.equals(prodDO.getEmergencySwitch(), BaseEnum.YES_ONE.getKey())&&prodServiceVO.getProdEmergencyInfoVO()!=null&&prodServiceVO.getProdEmergencyInfoVO().getProdEmergencyResponseBlackList().get(0).isEmpty()) {
|
||||||
|
ProdEmergencyInfoVO prodEmergencyInfoVO = prodServiceVO.getProdEmergencyInfoVO();
|
||||||
|
prodEmergencyInfoVO.setProdEmergencyResponseBlackList(new ArrayList<>());
|
||||||
|
}
|
||||||
|
if (Objects.equals(prodDO.getAdditionalSwitch(), BaseEnum.YES_ONE.getKey())&&prodServiceVO.getProdAdditionalFeeDatesList()!=null&&prodServiceVO.getProdAdditionalFeeDatesList().get(0).isEmpty()) {
|
||||||
|
prodServiceVO.setProdAdditionalFeeDatesList(new ArrayList<>());
|
||||||
|
}
|
||||||
|
if (Objects.equals(prodDO.getAdditionalFeeSwitch(), BaseEnum.YES_ONE.getKey())&&prodServiceVO.getProdAdditionalFeePeriodsList()!=null&&prodServiceVO.getProdAdditionalFeePeriodsList().get(0).isEmpty()) {
|
||||||
|
prodServiceVO.setProdAdditionalFeePeriodsList(new ArrayList<>());
|
||||||
|
}
|
||||||
|
return prodServiceVO;
|
||||||
|
}*/
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,6 +12,8 @@ import com.tashow.cloud.product.service.ProdExtendService;
|
|||||||
import com.tashow.cloud.product.service.ProdPropService;
|
import com.tashow.cloud.product.service.ProdPropService;
|
||||||
import com.tashow.cloud.product.service.ProdPropValueService;
|
import com.tashow.cloud.product.service.ProdPropValueService;
|
||||||
import com.tashow.cloud.product.service.SkuService;
|
import com.tashow.cloud.product.service.SkuService;
|
||||||
|
import com.tashow.cloud.productapi.api.product.vo.prodpropvalue.ProPageReqVO;
|
||||||
|
import com.tashow.cloud.productapi.api.product.vo.prodpropvalue.ProPropRecycleBinVO;
|
||||||
import com.tashow.cloud.productapi.api.product.vo.sku.*;
|
import com.tashow.cloud.productapi.api.product.vo.sku.*;
|
||||||
import com.tashow.cloud.productapi.enums.BaseEnum;
|
import com.tashow.cloud.productapi.enums.BaseEnum;
|
||||||
import com.tashow.cloud.productapi.enums.ErrorCodeConstants;
|
import com.tashow.cloud.productapi.enums.ErrorCodeConstants;
|
||||||
@@ -63,7 +65,8 @@ public class SkuServiceImpl implements SkuService {
|
|||||||
private ProdExtendService prodExtendService;
|
private ProdExtendService prodExtendService;
|
||||||
@Resource
|
@Resource
|
||||||
private ProdPropValueMapper prodPropValueMapper;
|
private ProdPropValueMapper prodPropValueMapper;
|
||||||
|
@Resource
|
||||||
|
private ProdPropMapper prodPropMapper;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Long createSku(SkuSaveReqVO createReqVO) {
|
public Long createSku(SkuSaveReqVO createReqVO) {
|
||||||
@@ -393,32 +396,50 @@ public class SkuServiceImpl implements SkuService {
|
|||||||
if (CollectionUtil.isNotEmpty(skuPropVO.getSkuList())) {
|
if (CollectionUtil.isNotEmpty(skuPropVO.getSkuList())) {
|
||||||
List<SkuDO> skuList = skuPropVO.getSkuList();
|
List<SkuDO> skuList = skuPropVO.getSkuList();
|
||||||
List<SkuDO> skuListNew = new ArrayList<>();
|
List<SkuDO> skuListNew = new ArrayList<>();
|
||||||
List<SkuDO> skuListUpdate = new ArrayList<>();
|
|
||||||
for (SkuDO sku : skuList) {
|
for (SkuDO sku : skuList) {
|
||||||
if (Objects.equals(BaseEnum.YES_ONE.getKey(), sku.getIsExist())) {
|
if (Objects.equals(BaseEnum.YES_ONE.getKey(), sku.getIsExist())) {
|
||||||
sku.setProdId(skuPropVO.getProdId());
|
sku.setProdId(skuPropVO.getProdId());
|
||||||
skuListNew.add(sku);
|
skuListNew.add(sku);
|
||||||
} else {
|
|
||||||
skuListUpdate.add(sku);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (CollUtil.isNotEmpty(skuListNew)) {
|
if (CollUtil.isNotEmpty(skuListNew)) {
|
||||||
skuMapper.insertBatch(skuListNew);
|
skuMapper.insertBatch(skuListNew);
|
||||||
}
|
}
|
||||||
if (CollUtil.isNotEmpty(skuListUpdate)) {
|
|
||||||
skuMapper.updateBatch(skuListUpdate);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
prodExtendMapper.updateByProdId(skuPropVO.getProdId(), skuPropVO.getIsDisable(), skuPropVO.getIsExpire());
|
prodExtendMapper.updateByProdId(skuPropVO.getProdId(), skuPropVO.getIsDisable(), skuPropVO.getIsExpire());
|
||||||
//保存规格
|
//保存规格
|
||||||
prodPropService.updateProdPropAndValues(skuPropVO);
|
prodPropService.updateProdPropAndValues(skuPropVO);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void updatePropVal(Long id, String propValue) {
|
||||||
|
ProdPropValueDO prodPropValueDO = prodPropValueMapper.selectById(id);
|
||||||
|
ProdPropDO prodPropDO =prodPropMapper.selectById(prodPropValueDO.getPropId());
|
||||||
|
List<SkuDO> skuDOList = skuMapper.getSkuListByName(prodPropDO.getProdId(),prodPropValueDO.getPropValue());
|
||||||
|
for (SkuDO skuDO : skuDOList) {
|
||||||
|
if (skuDO.getProperties() != null) {
|
||||||
|
String[] split = skuDO.getProperties().split(",");
|
||||||
|
for (String s : split) {
|
||||||
|
if (s.equals(prodPropValueDO.getPropValue())) {
|
||||||
|
skuDO.setProperties(propValue);
|
||||||
|
skuDO.setSkuName(propValue);
|
||||||
|
skuMapper.updateById(skuDO);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
prodPropValueDO.setPropValue(propValue);
|
||||||
|
prodPropValueMapper.updateById(prodPropValueDO);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void deleteProp(Long id) {
|
public void deleteProp(Long id) {
|
||||||
ProdPropValueDO prodPropValueDO = prodPropValueService.getById(id);
|
ProdPropValueDO prodPropValueDO = prodPropValueService.getById(id);
|
||||||
|
ProdPropDO prodPropDO =prodPropMapper.selectById(prodPropValueDO.getPropId());
|
||||||
prodPropValueService.deleteProdPropValue(id);
|
prodPropValueService.deleteProdPropValue(id);
|
||||||
List<SkuDO> skuDOList = skuMapper.getSkuListByName(prodPropValueDO.getPropValue());
|
List<SkuDO> skuDOList = skuMapper.getSkuListByName(prodPropDO.getProdId(),prodPropValueDO.getPropValue());
|
||||||
List<Long> skuids = new ArrayList<>();
|
List<Long> skuids = new ArrayList<>();
|
||||||
for (SkuDO skuDO : skuDOList) {
|
for (SkuDO skuDO : skuDOList) {
|
||||||
if (skuDO.getProperties() != null) {
|
if (skuDO.getProperties() != null) {
|
||||||
@@ -436,11 +457,13 @@ public class SkuServiceImpl implements SkuService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void disableProp(Long id) {
|
public void disableProp(Long id, Integer state) {
|
||||||
ProdPropValueDO prodPropValueDO = prodPropValueService.getById(id);
|
ProdPropValueDO prodPropValueDO = prodPropValueService.getById(id);
|
||||||
prodPropValueDO.setState(BaseEnum.YES_ONE.getKey());
|
prodPropValueDO.setState(state);
|
||||||
prodPropValueService.updateById(prodPropValueDO);
|
prodPropValueService.updateById(prodPropValueDO);
|
||||||
List<SkuDO> skuDOList = skuMapper.getSkuListByName(prodPropValueDO.getPropValue());
|
ProdPropDO prodPropDO =prodPropMapper.selectById(prodPropValueDO.getPropId());
|
||||||
|
if (Objects.equals(BaseEnum.NO_ZERO.getKey(), state)) {
|
||||||
|
List<SkuDO> skuDOList = skuMapper.getSkuListByName(prodPropDO.getProdId(),prodPropValueDO.getPropValue());
|
||||||
List<SkuDO> skuDOList1 = new ArrayList<>();
|
List<SkuDO> skuDOList1 = new ArrayList<>();
|
||||||
for (SkuDO skuDO : skuDOList) {
|
for (SkuDO skuDO : skuDOList) {
|
||||||
if (skuDO.getProperties() != null) {
|
if (skuDO.getProperties() != null) {
|
||||||
@@ -457,6 +480,7 @@ public class SkuServiceImpl implements SkuService {
|
|||||||
skuMapper.updateBatch(skuDOList1);
|
skuMapper.updateBatch(skuDOList1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -470,6 +494,7 @@ public class SkuServiceImpl implements SkuService {
|
|||||||
List<ProdPropValueDO> values = prodPropValueService.list(
|
List<ProdPropValueDO> values = prodPropValueService.list(
|
||||||
new LambdaQueryWrapper<ProdPropValueDO>()
|
new LambdaQueryWrapper<ProdPropValueDO>()
|
||||||
.eq(ProdPropValueDO::getPropId, prop.getId())
|
.eq(ProdPropValueDO::getPropId, prop.getId())
|
||||||
|
.eq(ProdPropValueDO::getDeleted, BaseEnum.NO_ZERO.getKey())
|
||||||
.orderByAsc(ProdPropValueDO::getSort)
|
.orderByAsc(ProdPropValueDO::getSort)
|
||||||
);
|
);
|
||||||
prop.setProdPropValues(values);
|
prop.setProdPropValues(values);
|
||||||
@@ -483,6 +508,17 @@ public class SkuServiceImpl implements SkuService {
|
|||||||
return skuPropInfoVO;
|
return skuPropInfoVO;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PageResult<ProPropRecycleBinVO> getSKuPropRecycleBinList(ProPageReqVO proPageReqVO) {
|
||||||
|
IPage<ProPropRecycleBinVO> prodPageList = prodPropValueMapper.getSKuPropRecycleBinList(MyBatisUtils.buildPage(proPageReqVO), proPageReqVO.getProdId(), proPageReqVO.getPropValue());
|
||||||
|
for (ProPropRecycleBinVO prodPage : prodPageList.getRecords()) {
|
||||||
|
if (prodPage.getDeleteTime() != null) {
|
||||||
|
prodPage.setRemainingDays(DateUtils.getRemainingDays(prodPage.getDeleteTime()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return new PageResult<>(prodPageList.getRecords(), prodPageList.getTotal());
|
||||||
|
}
|
||||||
|
|
||||||
/* @Override
|
/* @Override
|
||||||
public SkuPropInfoVO getSKuPropList(Long prodId, Integer isExpire, Integer state) {
|
public SkuPropInfoVO getSKuPropList(Long prodId, Integer isExpire, Integer state) {
|
||||||
if (prodId == null) {
|
if (prodId == null) {
|
||||||
@@ -710,14 +746,27 @@ public class SkuServiceImpl implements SkuService {
|
|||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public void restoreSkuList(List<Long> ids) {
|
public void restoreSkuList(List<Long> ids) {
|
||||||
List<SkuDO> skuList = skuMapper.selectByIds(ids);
|
List<SkuDO> skuList = skuMapper.getskuListBySkuIds(ids);
|
||||||
if (skuList.isEmpty()) {
|
if (skuList.isEmpty()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 获取商品下所有被删除的SKU(除了当前要恢复的 ids)
|
||||||
|
List<SkuDO> skuAllDeletedList = skuMapper.getskuListByDeleted(skuList.get(0).getProdId(), ids);
|
||||||
|
|
||||||
|
Set<String> allDeletedValues = new HashSet<>();
|
||||||
|
for (SkuDO sku : skuAllDeletedList) {
|
||||||
|
if (sku.getProperties() != null && !sku.getProperties().trim().isEmpty()) {
|
||||||
|
String[] values = sku.getProperties().split(",");
|
||||||
|
for (String v : values) {
|
||||||
|
allDeletedValues.add(v.trim());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Set<String> currentlyUsedValues = new HashSet<>();
|
Set<String> currentlyUsedValues = new HashSet<>();
|
||||||
for (SkuDO sku : skuList) {
|
for (SkuDO sku : skuList) {
|
||||||
sku.setDeleted(BaseEnum.NO_ZERO.getKey());
|
skuMapper.updateSkuDeleted(sku.getSkuId());
|
||||||
skuMapper.updateById(sku);
|
|
||||||
if (sku.getProperties() != null && !sku.getProperties().trim().isEmpty()) {
|
if (sku.getProperties() != null && !sku.getProperties().trim().isEmpty()) {
|
||||||
String[] values = sku.getProperties().split(",");
|
String[] values = sku.getProperties().split(",");
|
||||||
for (String v : values) {
|
for (String v : values) {
|
||||||
@@ -725,19 +774,40 @@ public class SkuServiceImpl implements SkuService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//恢复被删除的属性值
|
|
||||||
if(!currentlyUsedValues.isEmpty()){
|
// === 核心修改点:提取 currentlyUsedValues 中不在 allDeletedValues 的值(即新增启用的规格值)===
|
||||||
|
Set<String> valuesToRestore = new HashSet<>(currentlyUsedValues);
|
||||||
|
valuesToRestore.removeAll(allDeletedValues); // 只保留“之前被删掉过”的规格值
|
||||||
|
|
||||||
|
// 如果没有需要恢复的规格值,直接返回
|
||||||
|
if (valuesToRestore.isEmpty()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询商品下所有属性值
|
||||||
Long prodId = skuList.get(0).getProdId();
|
Long prodId = skuList.get(0).getProdId();
|
||||||
List<ProdPropValueDO> allPropValues = prodPropValueMapper.selectRestoreProp(prodId);
|
List<ProdPropValueDO> allPropValues = prodPropValueMapper.selectRestoreProp(prodId);
|
||||||
|
|
||||||
if (!allPropValues.isEmpty()) {
|
if (!allPropValues.isEmpty()) {
|
||||||
for (ProdPropValueDO pv : allPropValues) {
|
for (ProdPropValueDO pv : allPropValues) {
|
||||||
if (currentlyUsedValues.contains(pv.getPropValue())) {
|
// 仅当该属性值是“当前使用”且“之前被删除”的(即在 valuesToRestore 中),才恢复
|
||||||
pv.setIsExpire(BaseEnum.NO_ZERO.getKey());
|
if (valuesToRestore.contains(pv.getPropValue())) {
|
||||||
|
pv.setIsExpire(BaseEnum.NO_ZERO.getKey()); // 标记为未过期
|
||||||
prodPropValueMapper.updateById(pv);
|
prodPropValueMapper.updateById(pv);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void restorePropList(List<Long> ids) {
|
||||||
|
prodPropValueMapper.restorePropValue(ids);
|
||||||
|
List<ProdPropValueDO> prodPropValueDOList = prodPropValueMapper.getskuListByPropValueIds(ids);
|
||||||
|
for (ProdPropValueDO prodPropValueDO : prodPropValueDOList) {
|
||||||
|
int maxPropValue =prodPropValueMapper.getMaxPropValue(prodPropValueDO.getPropId());
|
||||||
|
prodPropValueDO.setSort(maxPropValue+1);
|
||||||
|
prodPropValueService.updateById(prodPropValueDO);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -749,10 +819,8 @@ public class SkuServiceImpl implements SkuService {
|
|||||||
SkuDO prodSku = skuMapper.selectById(id);
|
SkuDO prodSku = skuMapper.selectById(id);
|
||||||
// Step 1: 获取该商品下所有未禁用的 SKU 的 properties
|
// Step 1: 获取该商品下所有未禁用的 SKU 的 properties
|
||||||
List<String> activeProperties = skuMapper.selectPropertiesByProdIdShelf(prodSku.getProdId());
|
List<String> activeProperties = skuMapper.selectPropertiesByProdIdShelf(prodSku.getProdId());
|
||||||
SkuDO sku = new SkuDO();
|
prodSku.setIsShelf(isShelf);
|
||||||
sku.setSkuId(id);
|
skuMapper.updateById(prodSku);
|
||||||
sku.setIsShelf(isShelf);
|
|
||||||
skuMapper.updateById(sku);
|
|
||||||
// Step 2: 提取所有正在被使用的属性值(去重)
|
// Step 2: 提取所有正在被使用的属性值(去重)
|
||||||
Set<String> currentlyUsedValues = new HashSet<>();
|
Set<String> currentlyUsedValues = new HashSet<>();
|
||||||
for (String props : activeProperties) {
|
for (String props : activeProperties) {
|
||||||
@@ -797,42 +865,35 @@ public class SkuServiceImpl implements SkuService {
|
|||||||
if (!allSameProd) {
|
if (!allSameProd) {
|
||||||
throw new IllegalArgumentException("批量删除的 SKU 必须属于同一个商品");
|
throw new IllegalArgumentException("批量删除的 SKU 必须属于同一个商品");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Step 3: 获取该商品下【当前仍然未禁用】的 SKU 的 properties
|
|
||||||
List<String> activeProperties = skuMapper.selectPropertiesByProdIdShelf(prodId);
|
|
||||||
|
|
||||||
for (Long id : ids) {
|
for (Long id : ids) {
|
||||||
SkuDO sku = new SkuDO();
|
SkuDO sku = new SkuDO();
|
||||||
sku.setSkuId(id);
|
sku.setSkuId(id);
|
||||||
sku.setIsShelf(isShelf);
|
sku.setIsShelf(isShelf);
|
||||||
skuMapper.updateBatch(sku);
|
skuMapper.updateById(sku);
|
||||||
}
|
|
||||||
// Step 4: 提取所有仍在使用的属性值(去重 + trim)
|
|
||||||
Set<String> currentlyUsedValues = new HashSet<>();
|
|
||||||
for (String props : activeProperties) {
|
|
||||||
if (props != null && !props.trim().isEmpty()) {
|
|
||||||
String[] values = props.split(",");
|
|
||||||
for (String v : values) {
|
|
||||||
currentlyUsedValues.add(v.trim());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
// ================================
|
||||||
|
//新增逻辑:判断商品整体上下架状态,并更新 tz_prod_prop_value.state
|
||||||
|
// ================================
|
||||||
|
// 查询该商品下所有未删除的 SKU 的 is_shelf 状态
|
||||||
|
List<Integer> allSkuShelfStatus = skuMapper.selectShelfStatusByProdId(prodId);
|
||||||
|
|
||||||
|
if (allSkuShelfStatus.isEmpty()) {
|
||||||
|
return; // 没有 SKU,无需处理
|
||||||
}
|
}
|
||||||
|
|
||||||
// Step 5: 查询该商品下所有 rule=1 的销售属性值(未删除的)
|
boolean allShelf = allSkuShelfStatus.stream().allMatch(status -> status == 1); // 全部上架
|
||||||
List<ProdPropValueDO> allPropValues = prodPropValueMapper.selectSalesValuesByState(prodId);
|
boolean allOffShelf = allSkuShelfStatus.stream().allMatch(status -> status == 0); // 全部下架
|
||||||
|
|
||||||
// Step 6: 收集需要删除的属性值 ID
|
Integer targetState = null;
|
||||||
List<Long> valueIdsToDelete = new ArrayList<>();
|
if (allShelf) {
|
||||||
for (ProdPropValueDO pv : allPropValues) {
|
targetState = 1; // 启用
|
||||||
String value = pv.getPropValue().trim();
|
} else if (allOffShelf) {
|
||||||
if (!currentlyUsedValues.contains(value)) {
|
targetState = 0; // 禁用
|
||||||
valueIdsToDelete.add(pv.getId());
|
|
||||||
}
|
}
|
||||||
}
|
// 混合状态:不修改 state
|
||||||
// Step 7: 批量删除无用的属性值
|
// 如果需要更新状态,则批量更新 tz_prod_prop_value 的 state 字段
|
||||||
if (!valueIdsToDelete.isEmpty()) {
|
if (targetState != null) {
|
||||||
prodPropValueMapper.batchMarkDeleted(valueIdsToDelete);
|
prodPropValueMapper.updateStateByProdId(prodId, targetState);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -7,10 +7,10 @@ spring:
|
|||||||
username: nacos # Nacos 账号
|
username: nacos # Nacos 账号
|
||||||
password: nacos # Nacos 密码
|
password: nacos # Nacos 密码
|
||||||
discovery: # 【配置中心】配置项
|
discovery: # 【配置中心】配置项
|
||||||
namespace: 76667956-2ac2-4e05-906b-4bca4ebcc5f0 # 命名空间。这里使用 dev 开发环境
|
namespace: 16bd40df-7cc7-4c2c-82c2-6186ade7bb08 # 命名空间。这里使用 dev 开发环境
|
||||||
group: DEFAULT_GROUP # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
|
group: DEFAULT_GROUP # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
|
||||||
metadata:
|
metadata:
|
||||||
version: 1.0.0 # 服务实例的版本号,可用于灰度发布
|
version: 1.0.0 # 服务实例的版本号,可用于灰度发布
|
||||||
config: # 【注册中心】配置项
|
config: # 【注册中心】配置项
|
||||||
namespace: 76667956-2ac2-4e05-906b-4bca4ebcc5f0 # 命名空间。这里使用 dev 开发环境
|
namespace: 16bd40df-7cc7-4c2c-82c2-6186ade7bb08 # 命名空间。这里使用 dev 开发环境
|
||||||
group: DEFAULT_GROUP # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
|
group: DEFAULT_GROUP # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
|
||||||
|
|||||||
@@ -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 = #{prodId} AND type = #{type}
|
||||||
|
</delete>
|
||||||
</mapper>
|
</mapper>
|
||||||
@@ -25,16 +25,20 @@
|
|||||||
<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="eblack_record_id"/>
|
||||||
<result property="blackWeekend" column="black_weekend"/>
|
<result property="dateType" column="eblack_date_type"/>
|
||||||
|
<result property="customTimeSlots" column="eblack_custom_time_slots"/>
|
||||||
|
<result property="type" column="eblack_type"/>
|
||||||
|
<result property="isEnabled" column="eblack_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"/>
|
||||||
<result property="configId" column="eri_config_id"/>
|
<result property="configId" column="eri_config_id"/>
|
||||||
<result property="modeName" column="mode_name"/>
|
<result property="name" column="eri_name"/>
|
||||||
<result property="responseHours" column="response_hours"/>
|
<result property="responseHours" column="response_hours"/>
|
||||||
<result property="chargeMode" column="charge_mode"/>
|
<result property="chargeMode" column="charge_mode"/>
|
||||||
<result property="floatingPercentage" column="floating_percentage"/>
|
<result property="floatingPercentage" column="floating_percentage"/>
|
||||||
@@ -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,15 @@
|
|||||||
<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"
|
||||||
<result property="blackAppointDates" column="rc_black_appoint_dates"/>
|
ofType="com.tashow.cloud.productapi.api.product.vo.prodadditionalfeedates.ProdAdditionalFeeBlackVO"> <!-- 所有 blacklist 字段加 black_ 前缀 -->
|
||||||
<result property="isBlackAppoint" column="rc_is_black_appoint"/>
|
<id property="id" column="black_id"/>
|
||||||
<result property="blackHappy" column="rc_black_happy"/>
|
<result property="dateType" column="black_date_type"/>
|
||||||
<result property="blackWeekend" column="rc_black_weekend"/>
|
<result property="customTimeSlots" column="black_custom_time_slots"/>
|
||||||
|
<result property="type" column="black_type"/>
|
||||||
|
<result property="isEnabled" column="black_is_enabled"/>
|
||||||
|
</collection>
|
||||||
</association>
|
</association>
|
||||||
|
|
||||||
<!-- 映射接单上限配置 (productOrderLimitVO) -->
|
<!-- 映射接单上限配置 (productOrderLimitVO) -->
|
||||||
@@ -83,7 +90,10 @@
|
|||||||
|
|
||||||
|
|
||||||
<!-- 新增:映射体重区间价格配置列表 (prodWeightConfigList) -->
|
<!-- 新增:映射体重区间价格配置列表 (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"/>
|
<id property="id" column="wrp_record_id"/>
|
||||||
<result property="prodId" column="wrp_prod_id"/>
|
<result property="prodId" column="wrp_prod_id"/>
|
||||||
<result property="weightRange" column="wrp_weight_range"/> <!-- 注意:数据库列是 weight_range -->
|
<result property="weightRange" column="wrp_weight_range"/> <!-- 注意:数据库列是 weight_range -->
|
||||||
@@ -94,6 +104,8 @@
|
|||||||
<!-- <result property="creator" column="wrp_creator"/> -->
|
<!-- <result property="creator" column="wrp_creator"/> -->
|
||||||
<!-- <result property="updater" column="wrp_updater"/> -->
|
<!-- <result property="updater" column="wrp_updater"/> -->
|
||||||
</collection>
|
</collection>
|
||||||
|
</association>
|
||||||
|
|
||||||
|
|
||||||
<!-- 新增:映射特殊日期规则配置列表 (prodAdditionalFeePeriodsList) -->
|
<!-- 新增:映射特殊日期规则配置列表 (prodAdditionalFeePeriodsList) -->
|
||||||
<collection property="prodAdditionalFeePeriodsList" ofType="com.tashow.cloud.productapi.api.product.dto.ProdAdditionalFeePeriodsDO">
|
<collection property="prodAdditionalFeePeriodsList" ofType="com.tashow.cloud.productapi.api.product.dto.ProdAdditionalFeePeriodsDO">
|
||||||
@@ -113,21 +125,15 @@
|
|||||||
<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"/>
|
||||||
</collection>
|
</collection>
|
||||||
|
|
||||||
<!-- 映射服务区域地址名称 (areaNameList) -->
|
<!-- 映射服务区域地址名称 (areaNameList) -->
|
||||||
<!--<collection property="prodServiceAreasInfo.areaNameList" ofType="string">
|
<!--<collection property="prodServiceAreasInfo.areaNameList" ofType="string">
|
||||||
<result column="sa_area_name"/>
|
<result column="sa_area_name"/>
|
||||||
</collection>-->
|
</collection>-->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
|
|
||||||
@@ -149,16 +155,20 @@
|
|||||||
<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="eblack_record_id"/>
|
||||||
<result property="blackWeekend" column="black_weekend"/>
|
<result property="dateType" column="eblack_date_type"/>
|
||||||
|
<result property="customTimeSlots" column="eblack_custom_time_slots"/>
|
||||||
|
<result property="type" column="eblack_type"/>
|
||||||
|
<result property="isEnabled" column="eblack_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"/>
|
||||||
<result property="configId" column="eri_config_id"/>
|
<result property="configId" column="eri_config_id"/>
|
||||||
<result property="modeName" column="mode_name"/>
|
<result property="name" column="eri_name"/>
|
||||||
<result property="responseHours" column="response_hours"/>
|
<result property="responseHours" column="response_hours"/>
|
||||||
<result property="chargeMode" column="charge_mode"/>
|
<result property="chargeMode" column="charge_mode"/>
|
||||||
<result property="floatingPercentage" column="floating_percentage"/>
|
<result property="floatingPercentage" column="floating_percentage"/>
|
||||||
@@ -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"/>
|
<collection property="prodReservationBlackList"
|
||||||
<result property="isBlacklisted" column="rc_is_blacklisted"/>
|
ofType="com.tashow.cloud.productapi.api.product.vo.prodadditionalfeedates.ProdAdditionalFeeBlackVO"> <!-- 所有 blacklist 字段加 black_ 前缀 -->
|
||||||
<result property="blackAppointDates" column="rc_black_appoint_dates"/>
|
<id property="id" column="black_id"/>
|
||||||
<result property="isBlackAppoint" column="rc_is_black_appoint"/>
|
<result property="dateType" column="black_date_type"/>
|
||||||
<result property="blackHappy" column="rc_black_happy"/>
|
<result property="customTimeSlots" column="black_custom_time_slots"/>
|
||||||
<result property="blackWeekend" column="rc_black_weekend"/>
|
<result property="type" column="black_type"/>
|
||||||
|
<result property="isEnabled" column="black_is_enabled"/>
|
||||||
|
</collection>
|
||||||
</association>
|
</association>
|
||||||
|
|
||||||
<!-- 映射接单上限配置 (productOrderLimitVO) -->
|
<!-- 映射接单上限配置 (productOrderLimitVO) -->
|
||||||
@@ -192,9 +204,10 @@
|
|||||||
<result property="maxOrders" column="ol_max_orders"/>
|
<result property="maxOrders" column="ol_max_orders"/>
|
||||||
</association>
|
</association>
|
||||||
|
|
||||||
|
<association property="prodWeightConfig" javaType="com.tashow.cloud.productapi.api.product.vo.prodweightrangeprices.ProdWeightRangePricesSaveInfoVO">
|
||||||
|
<result property="isWeightCharge" column="tpe_is_weight_charge"/>
|
||||||
<!-- 新增:映射体重区间价格配置列表 (prodWeightConfigList) -->
|
<!-- 新增:映射体重区间价格配置列表 (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"/>
|
<id property="id" column="wrp_record_id"/>
|
||||||
<result property="prodId" column="wrp_prod_id"/>
|
<result property="prodId" column="wrp_prod_id"/>
|
||||||
<result property="weightRange" column="wrp_weight_range"/> <!-- 注意:数据库列是 weight_range -->
|
<result property="weightRange" column="wrp_weight_range"/> <!-- 注意:数据库列是 weight_range -->
|
||||||
@@ -205,6 +218,9 @@
|
|||||||
<!-- <result property="creator" column="wrp_creator"/> -->
|
<!-- <result property="creator" column="wrp_creator"/> -->
|
||||||
<!-- <result property="updater" column="wrp_updater"/> -->
|
<!-- <result property="updater" column="wrp_updater"/> -->
|
||||||
</collection>
|
</collection>
|
||||||
|
</association>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- 新增:映射特殊日期规则配置列表 (prodAdditionalFeePeriodsList) -->
|
<!-- 新增:映射特殊日期规则配置列表 (prodAdditionalFeePeriodsList) -->
|
||||||
<collection property="prodAdditionalFeePeriodsList" ofType="com.tashow.cloud.productapi.api.product.dto.ProdAdditionalFeePeriodsDO">
|
<collection property="prodAdditionalFeePeriodsList" ofType="com.tashow.cloud.productapi.api.product.dto.ProdAdditionalFeePeriodsDO">
|
||||||
@@ -224,7 +240,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"/>
|
||||||
@@ -241,7 +257,7 @@
|
|||||||
<!-- 动态SQL查询商品列表及其服务配置 (返回 List<ProdServiceVO>) -->
|
<!-- 动态SQL查询商品列表及其服务配置 (返回 List<ProdServiceVO>) -->
|
||||||
<!-- 用于列表页,可根据开关动态决定是否关联紧急响应信息以优化性能 -->
|
<!-- 用于列表页,可根据开关动态决定是否关联紧急响应信息以优化性能 -->
|
||||||
<select id="selectProdService" parameterType="map" resultMap="ProdServiceResultMap">
|
<select id="selectProdService" parameterType="map" resultMap="ProdServiceResultMap">
|
||||||
SELECT
|
SELECT p.prod_id,
|
||||||
p.emergency_switch,
|
p.emergency_switch,
|
||||||
p.additional_switch,
|
p.additional_switch,
|
||||||
p.additional_fee_switch,
|
p.additional_fee_switch,
|
||||||
@@ -254,23 +270,19 @@
|
|||||||
p.creator,
|
p.creator,
|
||||||
p.updater,
|
p.updater,
|
||||||
p.category_name,
|
p.category_name,
|
||||||
<!-- 只有当 emergencySwitch 开启时,才查询紧急响应相关字段 -->
|
|
||||||
<if test="emergencySwitch != null and emergencySwitch == 1">
|
|
||||||
erc.id AS erc_record_id,
|
erc.id AS erc_record_id,
|
||||||
erc.prod_id AS erc_prod_id,
|
erc.response_time_slots as erc_response_time_slots,
|
||||||
erc.response_time_slots,
|
|
||||||
erc.blacklisted_dates,
|
epafd.id AS eblack_record_id,
|
||||||
erc.black_appoint_dates,
|
epafd.date_type as eblack_date_type,
|
||||||
erc.black_happy,
|
epafd.custom_time_slots as eblack_custom_time_slots,
|
||||||
erc.black_weekend,
|
epafd.type as eblack_type,
|
||||||
erc.create_time AS erc_create_time,
|
epafd.is_enabled as eblack_is_enabled,
|
||||||
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.name as eri_name,
|
||||||
eri.response_hours,
|
eri.response_hours,
|
||||||
eri.charge_mode,
|
eri.charge_mode,
|
||||||
eri.floating_percentage,
|
eri.floating_percentage,
|
||||||
@@ -280,9 +292,7 @@
|
|||||||
eri.creator AS eri_creator,
|
eri.creator AS eri_creator,
|
||||||
eri.updater AS eri_updater,
|
eri.updater AS eri_updater,
|
||||||
eri.deleted AS eri_deleted,
|
eri.deleted AS eri_deleted,
|
||||||
</if>
|
|
||||||
<!-- 只有当 additionalFeeSwitch 开启时,才查询特殊日期规则相关字段 -->
|
|
||||||
<if test="additionalFeeSwitch != null and additionalFeeSwitch == 1">
|
|
||||||
afp.id AS afp_record_id,
|
afp.id AS afp_record_id,
|
||||||
afp.prod_id AS afp_prod_id,
|
afp.prod_id AS afp_prod_id,
|
||||||
afp.name AS afp_name,
|
afp.name AS afp_name,
|
||||||
@@ -290,9 +300,7 @@
|
|||||||
afp.charge_mode AS afp_charge_mode,
|
afp.charge_mode AS afp_charge_mode,
|
||||||
afp.price AS afp_price,
|
afp.price AS afp_price,
|
||||||
afp.floating_percentage AS afp_floating_percentage,
|
afp.floating_percentage AS afp_floating_percentage,
|
||||||
</if>
|
|
||||||
<!-- 只有当 additionalSwitch 开启时,才查询特殊时段规则相关字段 -->
|
|
||||||
<if test="additionalSwitch != null and additionalSwitch == 1">
|
|
||||||
afd.id AS afd_record_id,
|
afd.id AS afd_record_id,
|
||||||
afd.prod_id AS afd_prod_id,
|
afd.prod_id AS afd_prod_id,
|
||||||
afd.name AS afd_name,
|
afd.name AS afd_name,
|
||||||
@@ -307,9 +315,7 @@
|
|||||||
afd.creator AS afd_creator,
|
afd.creator AS afd_creator,
|
||||||
afd.updater AS afd_updater,
|
afd.updater AS afd_updater,
|
||||||
afd.deleted AS afd_deleted,
|
afd.deleted AS afd_deleted,
|
||||||
</if>
|
|
||||||
<!-- 只有当 reservationSwitch 开启时,才查询预约配置相关字段 -->
|
|
||||||
<if test="reservationSwitch != null and reservationSwitch == 1">
|
|
||||||
rc.id AS rc_record_id,
|
rc.id AS rc_record_id,
|
||||||
rc.prod_id AS rc_prod_id,
|
rc.prod_id AS rc_prod_id,
|
||||||
rc.reservation_time_slots AS rc_reservation_time_slots,
|
rc.reservation_time_slots AS rc_reservation_time_slots,
|
||||||
@@ -319,67 +325,67 @@
|
|||||||
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,
|
|
||||||
rc.is_blacklisted AS rc_is_blacklisted,
|
rpafd.id AS black_id,
|
||||||
rc.black_appoint_dates AS rc_black_appoint_dates,
|
rpafd.date_type as black_date_type,
|
||||||
rc.is_black_appoint AS rc_is_black_appoint,
|
rpafd.custom_time_slots as black_custom_time_slots,
|
||||||
rc.black_happy AS rc_black_happy,
|
rpafd.type as black_type,
|
||||||
rc.black_weekend AS rc_black_weekend,
|
rpafd.is_enabled as black_is_enabled,
|
||||||
</if>
|
|
||||||
<!-- 只有当 orderLimitSwitch 开启时,才查询接单上限配置相关字段 -->
|
|
||||||
<if test="orderLimitSwitch != null and orderLimitSwitch == 1">
|
|
||||||
ol.id AS ol_record_id,
|
ol.id AS ol_record_id,
|
||||||
ol.prod_id AS ol_prod_id,
|
ol.prod_id AS ol_prod_id,
|
||||||
ol.limit_unit AS ol_limit_unit,
|
ol.limit_unit AS ol_limit_unit,
|
||||||
ol.max_orders AS ol_max_orders,
|
ol.max_orders AS ol_max_orders,
|
||||||
</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.id AS wrp_record_id,
|
||||||
wrp.prod_id AS wrp_prod_id,
|
wrp.prod_id AS wrp_prod_id,
|
||||||
wrp.weight_range AS wrp_weight_range,
|
wrp.weight_range AS wrp_weight_range,
|
||||||
wrp.price AS wrp_price,
|
wrp.price AS wrp_price,
|
||||||
wrp.is_enabled AS wrp_is_enabled,
|
wrp.is_enabled AS wrp_is_enabled,
|
||||||
</if>
|
|
||||||
<!-- 只有当 regionSwitch 开启时,才查询服务区域相关字段 -->
|
|
||||||
<if test="regionSwitch != null and regionSwitch == 1">
|
|
||||||
sa.id AS sa_rule_id,
|
sa.id AS sa_rule_id,
|
||||||
sa.prod_id AS sa_prod_id,
|
sa.prod_id AS sa_prod_id,
|
||||||
sa.rule_type AS sa_rule_type,
|
sa.rule_type AS sa_rule_type,
|
||||||
sa.fee AS sa_fee,
|
sa.fee AS sa_fee,
|
||||||
saa.area_name AS sa_area_name,
|
saa.area_name AS sa_area_name,
|
||||||
</if>
|
|
||||||
p.prod_id
|
p.prod_name
|
||||||
FROM
|
FROM tz_prod p
|
||||||
tz_prod p
|
|
||||||
<!-- 只有当 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_emergency_response erc ON p.prod_id = erc.prod_id AND erc.deleted = 0
|
||||||
|
LEFT JOIN tz_prod_additional_fee_dates epafd
|
||||||
|
ON p.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 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 test="additionalSwitch != null and additionalSwitch == 1">
|
LEFT JOIN tz_prod_additional_fee_dates afd
|
||||||
LEFT JOIN tz_prod_additional_fee_dates afd ON p.prod_id = afd.prod_id AND afd.deleted = 0
|
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_reservation_config rc ON p.prod_id = rc.prod_id AND rc.deleted = 0
|
||||||
</if>
|
LEFT JOIN tz_prod_additional_fee_dates rpafd
|
||||||
<if test="orderLimitSwitch != null and orderLimitSwitch == 1">
|
ON p.prod_id = rpafd.prod_id AND rpafd.deleted = 0 AND rpafd.type = 2
|
||||||
|
|
||||||
|
|
||||||
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
|
||||||
</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
|
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">
|
|
||||||
LEFT JOIN tz_prod_service_over_area_rules sa ON p.prod_id = sa.prod_id AND sa.deleted = 0
|
LEFT JOIN tz_prod_service_over_area_rules sa ON p.prod_id = sa.prod_id AND sa.deleted = 0
|
||||||
LEFT JOIN tz_prod_service_area_relevance sar ON p.prod_id = sar.prod_id
|
LEFT JOIN tz_prod_service_area_relevance sar ON p.prod_id = sar.prod_id
|
||||||
LEFT JOIN tz_prod_service_areas saa ON sar.area_id = saa.id AND saa.deleted = 0
|
LEFT JOIN tz_prod_service_areas saa ON sar.area_id = saa.id AND saa.deleted = 0
|
||||||
</if>
|
|
||||||
where p.deleted = 0
|
where p.deleted = 0
|
||||||
AND p.prod_id = #{prodId}
|
AND p.prod_id = #{prodId}
|
||||||
ORDER BY p.prod_id
|
ORDER BY p.prod_id ,rpafd.date_type ,epafd.date_type,afd.date_type ASC
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
@@ -389,6 +395,7 @@
|
|||||||
<!-- 用于列表页,可根据开关动态决定是否关联紧急响应信息以优化性能 -->
|
<!-- 用于列表页,可根据开关动态决定是否关联紧急响应信息以优化性能 -->
|
||||||
<select id="selectProdServiceInfo" parameterType="map" resultMap="ProdServiceResultInfoMap">
|
<select id="selectProdServiceInfo" parameterType="map" resultMap="ProdServiceResultInfoMap">
|
||||||
SELECT
|
SELECT
|
||||||
|
p.prod_id,
|
||||||
p.emergency_switch,
|
p.emergency_switch,
|
||||||
p.additional_switch,
|
p.additional_switch,
|
||||||
p.additional_fee_switch,
|
p.additional_fee_switch,
|
||||||
@@ -396,23 +403,19 @@
|
|||||||
p.order_limit_switch,
|
p.order_limit_switch,
|
||||||
p.weight_switch,
|
p.weight_switch,
|
||||||
p.region_switch,
|
p.region_switch,
|
||||||
<!-- 只有当 emergencySwitch 开启时,才查询紧急响应相关字段 -->
|
|
||||||
<if test="emergencySwitch != null and emergencySwitch == 1">
|
|
||||||
erc.id AS erc_record_id,
|
erc.id AS erc_record_id,
|
||||||
erc.prod_id AS erc_prod_id,
|
erc.response_time_slots as erc_response_time_slots,
|
||||||
erc.response_time_slots,
|
|
||||||
erc.blacklisted_dates,
|
epafd.id AS eblack_record_id,
|
||||||
erc.black_appoint_dates,
|
epafd.date_type as eblack_date_type,
|
||||||
erc.black_happy,
|
epafd.custom_time_slots as eblack_custom_time_slots,
|
||||||
erc.black_weekend,
|
epafd.type as eblack_type,
|
||||||
erc.create_time AS erc_create_time,
|
epafd.is_enabled as eblack_is_enabled,
|
||||||
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.name as eri_name,
|
||||||
eri.response_hours,
|
eri.response_hours,
|
||||||
eri.charge_mode,
|
eri.charge_mode,
|
||||||
eri.floating_percentage,
|
eri.floating_percentage,
|
||||||
@@ -422,9 +425,8 @@
|
|||||||
eri.creator AS eri_creator,
|
eri.creator AS eri_creator,
|
||||||
eri.updater AS eri_updater,
|
eri.updater AS eri_updater,
|
||||||
eri.deleted AS eri_deleted,
|
eri.deleted AS eri_deleted,
|
||||||
</if>
|
|
||||||
<!-- 只有当 additionalFeeSwitch 开启时,才查询特殊日期规则相关字段 -->
|
|
||||||
<if test="additionalFeeSwitch != null and additionalFeeSwitch == 1">
|
|
||||||
afp.id AS afp_record_id,
|
afp.id AS afp_record_id,
|
||||||
afp.prod_id AS afp_prod_id,
|
afp.prod_id AS afp_prod_id,
|
||||||
afp.name AS afp_name,
|
afp.name AS afp_name,
|
||||||
@@ -432,9 +434,8 @@
|
|||||||
afp.charge_mode AS afp_charge_mode,
|
afp.charge_mode AS afp_charge_mode,
|
||||||
afp.price AS afp_price,
|
afp.price AS afp_price,
|
||||||
afp.floating_percentage AS afp_floating_percentage,
|
afp.floating_percentage AS afp_floating_percentage,
|
||||||
</if>
|
|
||||||
<!-- 只有当 additionalSwitch 开启时,才查询特殊时段规则相关字段 -->
|
|
||||||
<if test="additionalSwitch != null and additionalSwitch == 1">
|
|
||||||
afd.id AS afd_record_id,
|
afd.id AS afd_record_id,
|
||||||
afd.prod_id AS afd_prod_id,
|
afd.prod_id AS afd_prod_id,
|
||||||
afd.name AS afd_name,
|
afd.name AS afd_name,
|
||||||
@@ -449,9 +450,8 @@
|
|||||||
afd.creator AS afd_creator,
|
afd.creator AS afd_creator,
|
||||||
afd.updater AS afd_updater,
|
afd.updater AS afd_updater,
|
||||||
afd.deleted AS afd_deleted,
|
afd.deleted AS afd_deleted,
|
||||||
</if>
|
|
||||||
<!-- 只有当 reservationSwitch 开启时,才查询预约配置相关字段 -->
|
|
||||||
<if test="reservationSwitch != null and reservationSwitch == 1">
|
|
||||||
rc.id AS rc_record_id,
|
rc.id AS rc_record_id,
|
||||||
rc.prod_id AS rc_prod_id,
|
rc.prod_id AS rc_prod_id,
|
||||||
rc.reservation_time_slots AS rc_reservation_time_slots,
|
rc.reservation_time_slots AS rc_reservation_time_slots,
|
||||||
@@ -461,51 +461,54 @@
|
|||||||
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,
|
|
||||||
rc.is_blacklisted AS rc_is_blacklisted,
|
rpafd.id AS black_id,
|
||||||
rc.black_appoint_dates AS rc_black_appoint_dates,
|
rpafd.date_type as black_date_type,
|
||||||
rc.is_black_appoint AS rc_is_black_appoint,
|
rpafd.custom_time_slots as black_custom_time_slots,
|
||||||
rc.black_happy AS rc_black_happy,
|
rpafd.type as black_type,
|
||||||
rc.black_weekend AS rc_black_weekend,
|
rpafd.is_enabled as black_is_enabled,
|
||||||
</if>
|
|
||||||
<!-- 只有当 orderLimitSwitch 开启时,才查询接单上限配置相关字段 -->
|
|
||||||
<if test="orderLimitSwitch != null and orderLimitSwitch == 1">
|
|
||||||
ol.id AS ol_record_id,
|
ol.id AS ol_record_id,
|
||||||
ol.prod_id AS ol_prod_id,
|
ol.prod_id AS ol_prod_id,
|
||||||
ol.limit_unit AS ol_limit_unit,
|
ol.limit_unit AS ol_limit_unit,
|
||||||
ol.max_orders AS ol_max_orders,
|
ol.max_orders AS ol_max_orders,
|
||||||
</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.id AS wrp_record_id,
|
||||||
wrp.prod_id AS wrp_prod_id,
|
wrp.prod_id AS wrp_prod_id,
|
||||||
wrp.weight_range AS wrp_weight_range,
|
wrp.weight_range AS wrp_weight_range,
|
||||||
wrp.price AS wrp_price,
|
wrp.price AS wrp_price,
|
||||||
wrp.is_enabled AS wrp_is_enabled,
|
wrp.is_enabled AS wrp_is_enabled,
|
||||||
</if>
|
|
||||||
p.prod_id
|
p.prod_name
|
||||||
FROM
|
FROM
|
||||||
tz_prod p
|
tz_prod p
|
||||||
<!-- 只有当 emergencySwitch 开启时才进行 LEFT JOIN -->
|
<!-- 只有当 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_emergency_response erc ON p.prod_id = erc.prod_id AND erc.deleted = 0
|
||||||
|
LEFT JOIN tz_prod_additional_fee_dates epafd ON p.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 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 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_reservation_config rc ON p.prod_id = rc.prod_id AND rc.deleted = 0
|
||||||
</if>
|
LEFT JOIN tz_prod_additional_fee_dates rpafd ON p.prod_id = rpafd.prod_id AND rpafd.deleted = 0 AND rpafd.type = 2
|
||||||
<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
|
||||||
</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
|
LEFT JOIN tz_prod_weight_range_prices wrp ON p.prod_id = wrp.prod_id AND wrp.deleted = 0
|
||||||
</if>
|
|
||||||
where p.deleted = 0
|
where p.deleted = 0
|
||||||
AND p.prod_id = #{prodId}
|
AND p.prod_id = #{prodId}
|
||||||
ORDER BY p.prod_id
|
ORDER BY p.prod_id
|
||||||
@@ -572,7 +575,7 @@
|
|||||||
) min_eri ON tp.prod_id = min_eri.prod_id
|
) min_eri ON tp.prod_id = min_eri.prod_id
|
||||||
where tp.deleted = 1
|
where tp.deleted = 1
|
||||||
<if test="prodName != null and prodName != ''">
|
<if test="prodName != null and prodName != ''">
|
||||||
and tp.prod_ame like concat('%', #{prodName}, '%')
|
and tp.prod_name like concat('%', #{prodName}, '%')
|
||||||
</if>
|
</if>
|
||||||
<if test="deleteTime != null and deleteTime.length == 2">
|
<if test="deleteTime != null and deleteTime.length == 2">
|
||||||
AND tp.delete_time BETWEEN #{deleteTime[0]} AND #{deleteTime[1]}
|
AND tp.delete_time BETWEEN #{deleteTime[0]} AND #{deleteTime[1]}
|
||||||
@@ -625,4 +628,7 @@
|
|||||||
</foreach>
|
</foreach>
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
@@ -11,4 +11,7 @@
|
|||||||
<select id="getProdPropByPropNameAndShopId" resultType="com.tashow.cloud.productapi.api.product.dto.ProdPropDO">
|
<select id="getProdPropByPropNameAndShopId" resultType="com.tashow.cloud.productapi.api.product.dto.ProdPropDO">
|
||||||
select * from tz_prod_prop where prop_name = #{propName} and prod_id = #{prodId} and rule = #{rule}
|
select * from tz_prod_prop where prop_name = #{propName} and prod_id = #{prodId} and rule = #{rule}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
@@ -47,6 +47,20 @@
|
|||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
<select id="getMaxPropValue" resultType="int">
|
||||||
|
SELECT max(sort) FROM `tz_prod_prop_value` WHERE prop_id = #{propId} AND deleted = 0
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<update id="updateStateByProdId">
|
||||||
|
UPDATE tz_prod_prop_value
|
||||||
|
SET state = #{state}
|
||||||
|
WHERE prop_id IN (
|
||||||
|
SELECT id FROM tz_prod_prop
|
||||||
|
WHERE prod_id = #{prodId}
|
||||||
|
AND deleted = 0
|
||||||
|
)
|
||||||
|
AND deleted = 0
|
||||||
|
</update>
|
||||||
|
|
||||||
|
|
||||||
<update id="batchMarkDeleted">
|
<update id="batchMarkDeleted">
|
||||||
@@ -62,7 +76,7 @@
|
|||||||
<update id="deleteProdPropValueById">
|
<update id="deleteProdPropValueById">
|
||||||
UPDATE tz_prod_prop_value
|
UPDATE tz_prod_prop_value
|
||||||
SET
|
SET
|
||||||
is_expire = 1, delete_time = NOW()
|
deleted = 1, delete_time = NOW()
|
||||||
WHERE id = #{id}
|
WHERE id = #{id}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
@@ -78,6 +92,39 @@
|
|||||||
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="getSKuPropRecycleBinList" resultType="com.tashow.cloud.productapi.api.product.vo.prodpropvalue.ProPropRecycleBinVO" >
|
||||||
|
SELECT
|
||||||
|
ppv.id,
|
||||||
|
ppv.prop_value,
|
||||||
|
ppv.prop_id,
|
||||||
|
ppv.delete_time
|
||||||
|
FROM tz_prod_prop pp
|
||||||
|
JOIN tz_prod_prop_value ppv ON pp.id = ppv.prop_id
|
||||||
|
WHERE pp.prod_id = #{prodId}
|
||||||
|
AND (ppv.is_expire = 1 or ppv.deleted = 1)
|
||||||
|
<if test="propValue != null and propValue != ''">
|
||||||
|
and prop_value like concat('%', #{propValue}, '%')
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
<select id="getskuListByPropValueIds" resultType="com.tashow.cloud.productapi.api.product.dto.ProdPropValueDO">
|
||||||
|
SELECT *
|
||||||
|
FROM tz_prod_prop_value
|
||||||
|
WHERE id IN
|
||||||
|
<foreach collection="ids" item="id" open="(" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
<update id="restorePropValue">
|
||||||
|
UPDATE tz_prod_prop_value
|
||||||
|
SET is_expire = 1, deleted = 0
|
||||||
|
WHERE id IN
|
||||||
|
<foreach item="id" collection="ids" open="(" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
</update>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
@@ -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 = #{prodId}
|
||||||
|
</delete>
|
||||||
</mapper>
|
</mapper>
|
||||||
@@ -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="deleteWeightRangePrices">
|
||||||
|
delete from tz_prod_weight_range_prices where prod_id = #{prodId}
|
||||||
|
</delete>
|
||||||
</mapper>
|
</mapper>
|
||||||
@@ -10,7 +10,7 @@
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
<select id="getSkuRecycleBinPageList" resultType="com.tashow.cloud.productapi.api.product.vo.sku.SkuRecycleBinVO" >
|
<select id="getSkuRecycleBinPageList" resultType="com.tashow.cloud.productapi.api.product.vo.sku.SkuRecycleBinVO" >
|
||||||
select sku_id, properties, delete_time from tz_sku where prod_id = #{prodId} and deleted = 1
|
select * from tz_sku where prod_id = #{prodId} and deleted = 1
|
||||||
<if test="properties != null and properties != ''">
|
<if test="properties != null and properties != ''">
|
||||||
and properties like concat('%', #{properties}, '%')
|
and properties like concat('%', #{properties}, '%')
|
||||||
</if>
|
</if>
|
||||||
@@ -32,7 +32,7 @@
|
|||||||
|
|
||||||
|
|
||||||
<select id="getSkuListByName" resultType="com.tashow.cloud.productapi.api.product.dto.SkuDO" >
|
<select id="getSkuListByName" resultType="com.tashow.cloud.productapi.api.product.dto.SkuDO" >
|
||||||
select sku_id, properties, delete_time,deleted from tz_sku where deleted = 0
|
select sku_id, properties, delete_time,deleted from tz_sku where deleted = 0 and prod_id = #{prodId}
|
||||||
<if test="propertiesName != null and propertiesName != ''">
|
<if test="propertiesName != null and propertiesName != ''">
|
||||||
and properties like concat('%', #{propertiesName}, '%')
|
and properties like concat('%', #{propertiesName}, '%')
|
||||||
</if>
|
</if>
|
||||||
@@ -73,4 +73,49 @@
|
|||||||
#{id}
|
#{id}
|
||||||
</foreach>
|
</foreach>
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
|
|
||||||
|
<select id="getskuListBySkuIds" resultType="com.tashow.cloud.productapi.api.product.dto.SkuDO">
|
||||||
|
SELECT *
|
||||||
|
FROM tz_sku
|
||||||
|
WHERE sku_id IN
|
||||||
|
<foreach collection="ids" item="id" open="(" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="getskuListByDeleted" resultType="com.tashow.cloud.productapi.api.product.dto.SkuDO">
|
||||||
|
SELECT *
|
||||||
|
FROM tz_sku
|
||||||
|
WHERE prod_id = #{prodId} AND deleted = 1 and sku_id not IN
|
||||||
|
<foreach collection="ids" item="id" open="(" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<update id="updateSkuDeleted">
|
||||||
|
UPDATE tz_sku
|
||||||
|
SET deleted = 0
|
||||||
|
WHERE sku_id = #{skuId}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
|
||||||
|
<update id="batchSkuRecover">
|
||||||
|
UPDATE tz_sku
|
||||||
|
SET deleted = 0
|
||||||
|
WHERE sku_id IN
|
||||||
|
<foreach item="id" collection="ids" open="(" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<select id="selectShelfStatusByProdId" resultType="int">
|
||||||
|
SELECT is_shelf
|
||||||
|
FROM tz_sku
|
||||||
|
WHERE prod_id = #{prodId}
|
||||||
|
AND deleted = 0
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
@@ -16,6 +16,7 @@ public class SystemServerApplication {
|
|||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
SpringApplication.run(SystemServerApplication.class, args);
|
SpringApplication.run(SystemServerApplication.class, args);
|
||||||
|
System.out.println("系统启动成功");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,11 +5,11 @@ spring:
|
|||||||
username: nacos # Nacos 账号
|
username: nacos # Nacos 账号
|
||||||
password: nacos # Nacos 密码
|
password: nacos # Nacos 密码
|
||||||
discovery: # 【配置中心】配置项
|
discovery: # 【配置中心】配置项
|
||||||
namespace: 76667956-2ac2-4e05-906b-4bca4ebcc5f0 # 命名空间。这里使用 dev 开发环境
|
namespace: 16bd40df-7cc7-4c2c-82c2-6186ade7bb08 # 命名空间。这里使用 dev 开发环境
|
||||||
group: DEFAULT_GROUP # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
|
group: DEFAULT_GROUP # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
|
||||||
metadata:
|
metadata:
|
||||||
version: 1.0.0 # 服务实例的版本号,可用于灰度发布
|
version: 1.0.0 # 服务实例的版本号,可用于灰度发布
|
||||||
config: # 【注册中心】配置项
|
config: # 【注册中心】配置项
|
||||||
namespace: 76667956-2ac2-4e05-906b-4bca4ebcc5f0 # 命名空间。这里使用 dev 开发环境
|
namespace: 16bd40df-7cc7-4c2c-82c2-6186ade7bb08 # 命名空间。这里使用 dev 开发环境
|
||||||
group: DEFAULT_GROUP # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
|
group: DEFAULT_GROUP # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user