获取服务信息
This commit is contained in:
@@ -38,9 +38,9 @@ public class ProdEmergencyResponseIntervalsDO extends BaseDO {
|
|||||||
private Long prodId;
|
private Long prodId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 响应模式名称
|
* 响应模式名称modeName
|
||||||
*/
|
*/
|
||||||
private String modeName;
|
private String name;
|
||||||
/**
|
/**
|
||||||
* 响应时间(小时)
|
* 响应时间(小时)
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -64,14 +64,14 @@ public class ProdServiceInfoVO {
|
|||||||
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;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -78,14 +78,14 @@ 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;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -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 = "响应时间(小时)不能为空")
|
||||||
|
|||||||
@@ -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);
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ public interface ProdService {
|
|||||||
/**
|
/**
|
||||||
* 修改商品服务配置
|
* 修改商品服务配置
|
||||||
*
|
*
|
||||||
* @param prodServiceVO 创建信息
|
* @param prodServiceInfoVO 创建信息
|
||||||
* @return 编号
|
* @return 编号
|
||||||
*/
|
*/
|
||||||
void uptateProdService(@Valid ProdServiceInfoVO prodServiceInfoVO);
|
void uptateProdService(@Valid ProdServiceInfoVO prodServiceInfoVO);
|
||||||
|
|||||||
@@ -245,6 +245,8 @@ public class ProdServiceImpl implements ProdService {
|
|||||||
prodReservationConfigDO.setTimeSlot(prodReservationInfoVO.getTimeBook().getTimeSlot());
|
prodReservationConfigDO.setTimeSlot(prodReservationInfoVO.getTimeBook().getTimeSlot());
|
||||||
prodReservationConfigDO.setReservationTimeSlots(prodReservationInfoVO.getTimeBook().getReservationTimeSlots());
|
prodReservationConfigDO.setReservationTimeSlots(prodReservationInfoVO.getTimeBook().getReservationTimeSlots());
|
||||||
prodReservationConfigMapper.insert(prodReservationConfigDO);
|
prodReservationConfigMapper.insert(prodReservationConfigDO);
|
||||||
|
//先删除在新增
|
||||||
|
prodAdditionalFeeDatesMapper.deleteAdditionalFeeDates(prod.getProdId(), 2);
|
||||||
if (prodServiceVO.getProdReservationConfig().getProdReservationBlackList() != null) {
|
if (prodServiceVO.getProdReservationConfig().getProdReservationBlackList() != null) {
|
||||||
for (ProdAdditionalFeeBlackVO prodAdditionalFeeBlackVO : prodServiceVO.getProdReservationConfig().getProdReservationBlackList()) {
|
for (ProdAdditionalFeeBlackVO prodAdditionalFeeBlackVO : prodServiceVO.getProdReservationConfig().getProdReservationBlackList()) {
|
||||||
ProdAdditionalFeeDatesDO prodAdditionalFeeDatesDO = BeanUtils.toBean(prodAdditionalFeeBlackVO, ProdAdditionalFeeDatesDO.class);
|
ProdAdditionalFeeDatesDO prodAdditionalFeeDatesDO = BeanUtils.toBean(prodAdditionalFeeBlackVO, ProdAdditionalFeeDatesDO.class);
|
||||||
@@ -282,6 +284,7 @@ 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);
|
||||||
@@ -290,6 +293,7 @@ public class ProdServiceImpl implements ProdService {
|
|||||||
if (prodServiceVO.getProdEmergencyInfoVO().getProdEmergencyResponseBlackList() != null) {
|
if (prodServiceVO.getProdEmergencyInfoVO().getProdEmergencyResponseBlackList() != null) {
|
||||||
for (ProdAdditionalFeeBlackVO prodAdditionalFeeBlackVO : prodServiceVO.getProdEmergencyInfoVO().getProdEmergencyResponseBlackList()) {
|
for (ProdAdditionalFeeBlackVO prodAdditionalFeeBlackVO : prodServiceVO.getProdEmergencyInfoVO().getProdEmergencyResponseBlackList()) {
|
||||||
ProdAdditionalFeeDatesDO prodAdditionalFeeDatesDO = BeanUtils.toBean(prodAdditionalFeeBlackVO, ProdAdditionalFeeDatesDO.class);
|
ProdAdditionalFeeDatesDO prodAdditionalFeeDatesDO = BeanUtils.toBean(prodAdditionalFeeBlackVO, ProdAdditionalFeeDatesDO.class);
|
||||||
|
prodAdditionalFeeDatesDO.setId(null);
|
||||||
prodAdditionalFeeDatesDO.setProdId(prod.getProdId());
|
prodAdditionalFeeDatesDO.setProdId(prod.getProdId());
|
||||||
prodAdditionalFeeDatesDO.setType(3);
|
prodAdditionalFeeDatesDO.setType(3);
|
||||||
prodAdditionalFeeDatesMapper.insert(prodAdditionalFeeDatesDO);
|
prodAdditionalFeeDatesMapper.insert(prodAdditionalFeeDatesDO);
|
||||||
@@ -302,6 +306,7 @@ 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);
|
||||||
@@ -312,6 +317,7 @@ public class ProdServiceImpl implements ProdService {
|
|||||||
if (prodServiceVO.getProdReservationConfig().getProdReservationBlackList() != null) {
|
if (prodServiceVO.getProdReservationConfig().getProdReservationBlackList() != null) {
|
||||||
for (ProdAdditionalFeeBlackVO prodAdditionalFeeBlackVO : prodServiceVO.getProdReservationConfig().getProdReservationBlackList()) {
|
for (ProdAdditionalFeeBlackVO prodAdditionalFeeBlackVO : prodServiceVO.getProdReservationConfig().getProdReservationBlackList()) {
|
||||||
ProdAdditionalFeeDatesDO prodAdditionalFeeDatesDO = BeanUtils.toBean(prodAdditionalFeeBlackVO, ProdAdditionalFeeDatesDO.class);
|
ProdAdditionalFeeDatesDO prodAdditionalFeeDatesDO = BeanUtils.toBean(prodAdditionalFeeBlackVO, ProdAdditionalFeeDatesDO.class);
|
||||||
|
prodAdditionalFeeDatesDO.setId(null);
|
||||||
prodAdditionalFeeDatesDO.setProdId(prod.getProdId());
|
prodAdditionalFeeDatesDO.setProdId(prod.getProdId());
|
||||||
prodAdditionalFeeDatesDO.setType(3);
|
prodAdditionalFeeDatesDO.setType(3);
|
||||||
prodAdditionalFeeDatesMapper.insert(prodAdditionalFeeDatesDO);
|
prodAdditionalFeeDatesMapper.insert(prodAdditionalFeeDatesDO);
|
||||||
@@ -359,7 +365,7 @@ public class ProdServiceImpl implements ProdService {
|
|||||||
}
|
}
|
||||||
//体重设置
|
//体重设置
|
||||||
if (Objects.equals(prodServiceVO.getWeightSwitch(), BaseEnum.YES_ONE.getKey())) {
|
if (Objects.equals(prodServiceVO.getWeightSwitch(), BaseEnum.YES_ONE.getKey())) {
|
||||||
prod.setWeightSwitch(BaseEnum.YES_ONE.getKey());
|
prod.setWeightSwitch(prodServiceVO.getWeightSwitch());
|
||||||
ProdExtendDO prodExtendDO = prodExtendMapper.selectOne(ProdExtendDO::getProdId, prod.getProdId());
|
ProdExtendDO prodExtendDO = prodExtendMapper.selectOne(ProdExtendDO::getProdId, prod.getProdId());
|
||||||
if (prodExtendDO != null) {
|
if (prodExtendDO != null) {
|
||||||
prodExtendDO.setIsWeightCharge(prodServiceVO.getProdWeightConfig().getIsWeightCharge());
|
prodExtendDO.setIsWeightCharge(prodServiceVO.getProdWeightConfig().getIsWeightCharge());
|
||||||
@@ -377,7 +383,6 @@ public class ProdServiceImpl implements ProdService {
|
|||||||
prodWeightRangePricesMapper.insert(prodWeightRangePricesDO);
|
prodWeightRangePricesMapper.insert(prodWeightRangePricesDO);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
prodMapper.updateById(prod);
|
prodMapper.updateById(prod);
|
||||||
}
|
}
|
||||||
@@ -385,10 +390,29 @@ 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());
|
||||||
ProdServiceVO prodServiceVO = 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 {
|
||||||
|
if (prodServiceVO.getProdEmergencyInfoVO().getId()!= null&&prodServiceVO.getProdEmergencyInfoVO().getProdEmergencyResponseIntervalsList().size()== 0) {
|
||||||
|
ProdEmergencyInfoVO prodEmergencyInfoVO = prodServiceVO.getProdEmergencyInfoVO();
|
||||||
|
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()) {
|
if (Objects.equals(prodDO.getReservationSwitch(), BaseEnum.YES_ONE.getKey())&&prodServiceVO.getProdReservationConfig().getProdReservationBlackList().get(0).isEmpty()) {
|
||||||
ProdReservationInfoVO prodReservationInfoVO = prodServiceVO.getProdReservationConfig();
|
ProdReservationInfoVO prodReservationInfoVO = prodServiceVO.getProdReservationConfig();
|
||||||
prodReservationInfoVO.setProdReservationBlackList(new ArrayList<>());
|
prodReservationInfoVO.setProdReservationBlackList(new ArrayList<>());
|
||||||
@@ -405,29 +429,27 @@ public class ProdServiceImpl implements ProdService {
|
|||||||
}
|
}
|
||||||
return prodServiceVO;
|
return prodServiceVO;
|
||||||
} else {
|
} else {
|
||||||
ProdServiceVO prodServiceVO = prodMapper.selectProdServiceInfo(prodDO.getProdId(),
|
ProdServiceVO prodServiceVO = prodMapper.selectProdServiceInfo(prodDO.getProdId());
|
||||||
prodDO.getReservationSwitch(), prodDO.getEmergencySwitch(), prodDO.getOrderLimitSwitch(),
|
if (Objects.equals(prodDO.getReservationSwitch(), BaseEnum.YES_ONE.getKey())&&prodServiceVO.getProdReservationConfig()!=null&&prodServiceVO.getProdReservationConfig().getProdReservationBlackList().get(0).isEmpty()) {
|
||||||
prodDO.getAdditionalSwitch(), prodDO.getAdditionalFeeSwitch(), prodDO.getWeightSwitch());
|
|
||||||
if (Objects.equals(prodDO.getReservationSwitch(), BaseEnum.YES_ONE.getKey())&prodServiceVO.getProdReservationConfig().getProdReservationBlackList().get(0).isEmpty()) {
|
|
||||||
ProdReservationInfoVO prodReservationInfoVO = prodServiceVO.getProdReservationConfig();
|
ProdReservationInfoVO prodReservationInfoVO = prodServiceVO.getProdReservationConfig();
|
||||||
prodReservationInfoVO.setProdReservationBlackList(new ArrayList<>());
|
prodReservationInfoVO.setProdReservationBlackList(new ArrayList<>());
|
||||||
}
|
}
|
||||||
if (Objects.equals(prodDO.getEmergencySwitch(), BaseEnum.YES_ONE.getKey())&&prodServiceVO.getProdEmergencyInfoVO().getProdEmergencyResponseIntervalsList().get(0).isEmpty()) {
|
if (Objects.equals(prodDO.getEmergencySwitch(), BaseEnum.YES_ONE.getKey())&&prodServiceVO.getProdEmergencyInfoVO()!=null&&prodServiceVO.getProdEmergencyInfoVO().getProdEmergencyResponseIntervalsList().get(0).isEmpty()) {
|
||||||
ProdEmergencyInfoVO prodEmergencyInfoVO = prodServiceVO.getProdEmergencyInfoVO();
|
ProdEmergencyInfoVO prodEmergencyInfoVO = prodServiceVO.getProdEmergencyInfoVO();
|
||||||
prodEmergencyInfoVO.setProdEmergencyResponseIntervalsList(new ArrayList<>());
|
prodEmergencyInfoVO.setProdEmergencyResponseIntervalsList(new ArrayList<>());
|
||||||
}
|
}
|
||||||
if (Objects.equals(prodDO.getEmergencySwitch(), BaseEnum.YES_ONE.getKey())&&prodServiceVO.getProdEmergencyInfoVO().getProdEmergencyResponseBlackList().get(0).isEmpty()) {
|
if (Objects.equals(prodDO.getEmergencySwitch(), BaseEnum.YES_ONE.getKey())&&prodServiceVO.getProdEmergencyInfoVO()!=null&&prodServiceVO.getProdEmergencyInfoVO().getProdEmergencyResponseBlackList().get(0).isEmpty()) {
|
||||||
ProdEmergencyInfoVO prodEmergencyInfoVO = prodServiceVO.getProdEmergencyInfoVO();
|
ProdEmergencyInfoVO prodEmergencyInfoVO = prodServiceVO.getProdEmergencyInfoVO();
|
||||||
prodEmergencyInfoVO.setProdEmergencyResponseBlackList(new ArrayList<>());
|
prodEmergencyInfoVO.setProdEmergencyResponseBlackList(new ArrayList<>());
|
||||||
}
|
}
|
||||||
if (Objects.equals(prodDO.getAdditionalSwitch(), BaseEnum.YES_ONE.getKey())&&prodServiceVO.getProdAdditionalFeeDatesList().get(0).isEmpty()) {
|
if (Objects.equals(prodDO.getAdditionalSwitch(), BaseEnum.YES_ONE.getKey())&&prodServiceVO.getProdAdditionalFeeDatesList()!=null&&prodServiceVO.getProdAdditionalFeeDatesList().get(0).isEmpty()) {
|
||||||
prodServiceVO.setProdAdditionalFeeDatesList(new ArrayList<>());
|
prodServiceVO.setProdAdditionalFeeDatesList(new ArrayList<>());
|
||||||
}
|
}
|
||||||
if (Objects.equals(prodDO.getAdditionalFeeSwitch(), BaseEnum.YES_ONE.getKey())&&prodServiceVO.getProdAdditionalFeePeriodsList().get(0).isEmpty()) {
|
if (Objects.equals(prodDO.getAdditionalFeeSwitch(), BaseEnum.YES_ONE.getKey())&&prodServiceVO.getProdAdditionalFeePeriodsList()!=null&&prodServiceVO.getProdAdditionalFeePeriodsList().get(0).isEmpty()) {
|
||||||
prodServiceVO.setProdAdditionalFeePeriodsList(new ArrayList<>());
|
prodServiceVO.setProdAdditionalFeePeriodsList(new ArrayList<>());
|
||||||
}
|
}
|
||||||
return prodServiceVO;
|
return prodServiceVO;
|
||||||
}
|
}*/
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -417,24 +417,20 @@ public class SkuServiceImpl implements SkuService {
|
|||||||
ProdPropValueDO prodPropValueDO = prodPropValueMapper.selectById(id);
|
ProdPropValueDO prodPropValueDO = prodPropValueMapper.selectById(id);
|
||||||
ProdPropDO prodPropDO =prodPropMapper.selectById(prodPropValueDO.getPropId());
|
ProdPropDO prodPropDO =prodPropMapper.selectById(prodPropValueDO.getPropId());
|
||||||
List<SkuDO> skuDOList = skuMapper.getSkuListByName(prodPropDO.getProdId(),prodPropValueDO.getPropValue());
|
List<SkuDO> skuDOList = skuMapper.getSkuListByName(prodPropDO.getProdId(),prodPropValueDO.getPropValue());
|
||||||
prodPropValueDO.setPropValue(propValue);
|
|
||||||
prodPropValueMapper.updateById(prodPropValueDO);
|
|
||||||
List<Long> skuids = new ArrayList<>();
|
|
||||||
for (SkuDO skuDO : skuDOList) {
|
for (SkuDO skuDO : skuDOList) {
|
||||||
if (skuDO.getProperties() != null) {
|
if (skuDO.getProperties() != null) {
|
||||||
String[] split = skuDO.getProperties().split(",");
|
String[] split = skuDO.getProperties().split(",");
|
||||||
for (String s : split) {
|
for (String s : split) {
|
||||||
if (s.equals(prodPropValueDO.getPropValue())) {
|
if (s.equals(prodPropValueDO.getPropValue())) {
|
||||||
skuDO.setProperties(prodPropValueDO.getPropValue());
|
skuDO.setProperties(propValue);
|
||||||
skuDO.setSkuName(prodPropValueDO.getPropValue());
|
skuDO.setSkuName(propValue);
|
||||||
skuMapper.updateById(skuDO);
|
skuMapper.updateById(skuDO);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (CollUtil.isNotEmpty(skuids)) {
|
prodPropValueDO.setPropValue(propValue);
|
||||||
skuMapper.batchSkuDeleted(skuids);
|
prodPropValueMapper.updateById(prodPropValueDO);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -38,7 +38,7 @@
|
|||||||
<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"/>
|
||||||
@@ -168,7 +168,7 @@
|
|||||||
<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"/>
|
||||||
@@ -257,148 +257,135 @@
|
|||||||
<!-- 动态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.prod_id,
|
p.emergency_switch,
|
||||||
p.emergency_switch,
|
p.additional_switch,
|
||||||
p.additional_switch,
|
p.additional_fee_switch,
|
||||||
p.additional_fee_switch,
|
p.reservation_switch,
|
||||||
p.reservation_switch,
|
p.order_limit_switch,
|
||||||
p.order_limit_switch,
|
p.weight_switch,
|
||||||
p.weight_switch,
|
p.region_switch,
|
||||||
p.region_switch,
|
p.create_time,
|
||||||
p.create_time,
|
p.update_time,
|
||||||
p.update_time,
|
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.response_time_slots as erc_response_time_slots,
|
|
||||||
|
|
||||||
epafd.id AS eblack_record_id,
|
erc.id AS erc_record_id,
|
||||||
epafd.date_type as eblack_date_type,
|
erc.response_time_slots as erc_response_time_slots,
|
||||||
epafd.custom_time_slots as eblack_custom_time_slots,
|
|
||||||
epafd.type as eblack_type,
|
|
||||||
epafd.is_enabled as eblack_is_enabled,
|
|
||||||
|
|
||||||
eri.id AS eri_record_id,
|
epafd.id AS eblack_record_id,
|
||||||
eri.config_id AS eri_config_id,
|
epafd.date_type as eblack_date_type,
|
||||||
eri.mode_name,
|
epafd.custom_time_slots as eblack_custom_time_slots,
|
||||||
eri.response_hours,
|
epafd.type as eblack_type,
|
||||||
eri.charge_mode,
|
epafd.is_enabled as eblack_is_enabled,
|
||||||
eri.floating_percentage,
|
|
||||||
eri.price,
|
|
||||||
eri.create_time AS eri_create_time,
|
|
||||||
eri.update_time AS eri_update_time,
|
|
||||||
eri.creator AS eri_creator,
|
|
||||||
eri.updater AS eri_updater,
|
|
||||||
eri.deleted AS eri_deleted,
|
|
||||||
</if>
|
|
||||||
<!-- 只有当 additionalFeeSwitch 开启时,才查询特殊日期规则相关字段 -->
|
|
||||||
<if test="additionalFeeSwitch != null and additionalFeeSwitch == 1">
|
|
||||||
afp.id AS afp_record_id,
|
|
||||||
afp.prod_id AS afp_prod_id,
|
|
||||||
afp.name AS afp_name,
|
|
||||||
afp.special_time_slots AS afp_special_time_slots,
|
|
||||||
afp.charge_mode AS afp_charge_mode,
|
|
||||||
afp.price AS afp_price,
|
|
||||||
afp.floating_percentage AS afp_floating_percentage,
|
|
||||||
</if>
|
|
||||||
<!-- 只有当 additionalSwitch 开启时,才查询特殊时段规则相关字段 -->
|
|
||||||
<if test="additionalSwitch != null and additionalSwitch == 1">
|
|
||||||
afd.id AS afd_record_id,
|
|
||||||
afd.prod_id AS afd_prod_id,
|
|
||||||
afd.name AS afd_name,
|
|
||||||
afd.date_type AS afd_date_type,
|
|
||||||
afd.custom_time_slots AS afd_custom_time_slots,
|
|
||||||
afd.specific_dates AS afd_specific_dates,
|
|
||||||
afd.charge_mode AS afd_charge_mode,
|
|
||||||
afd.price AS afd_price,
|
|
||||||
afd.is_enabled AS afd_is_enabled,
|
|
||||||
afd.create_time AS afd_create_time,
|
|
||||||
afd.update_time AS afd_update_time,
|
|
||||||
afd.creator AS afd_creator,
|
|
||||||
afd.updater AS afd_updater,
|
|
||||||
afd.deleted AS afd_deleted,
|
|
||||||
</if>
|
|
||||||
<!-- 只有当 reservationSwitch 开启时,才查询预约配置相关字段 -->
|
|
||||||
<if test="reservationSwitch != null and reservationSwitch == 1">
|
|
||||||
rc.id AS rc_record_id,
|
|
||||||
rc.prod_id AS rc_prod_id,
|
|
||||||
rc.reservation_time_slots AS rc_reservation_time_slots,
|
|
||||||
rc.advance_hours AS rc_advance_hours,
|
|
||||||
rc.reservation_date_range AS rc_reservation_date_range,
|
|
||||||
rc.allow_change AS rc_allow_change,
|
|
||||||
rc.change_time_rule AS rc_change_time_rule,
|
|
||||||
rc.time_slot AS rc_time_slot,
|
|
||||||
rc.max_change_times AS rc_max_change_times,
|
|
||||||
|
|
||||||
rpafd.id AS black_id,
|
eri.id AS eri_record_id,
|
||||||
rpafd.date_type as black_date_type,
|
eri.config_id AS eri_config_id,
|
||||||
rpafd.custom_time_slots as black_custom_time_slots,
|
eri.name as eri_name,
|
||||||
rpafd.type as black_type,
|
eri.response_hours,
|
||||||
rpafd.is_enabled as black_is_enabled,
|
eri.charge_mode,
|
||||||
|
eri.floating_percentage,
|
||||||
|
eri.price,
|
||||||
|
eri.create_time AS eri_create_time,
|
||||||
|
eri.update_time AS eri_update_time,
|
||||||
|
eri.creator AS eri_creator,
|
||||||
|
eri.updater AS eri_updater,
|
||||||
|
eri.deleted AS eri_deleted,
|
||||||
|
|
||||||
</if>
|
afp.id AS afp_record_id,
|
||||||
<!-- 只有当 orderLimitSwitch 开启时,才查询接单上限配置相关字段 -->
|
afp.prod_id AS afp_prod_id,
|
||||||
<if test="orderLimitSwitch != null and orderLimitSwitch == 1">
|
afp.name AS afp_name,
|
||||||
ol.id AS ol_record_id,
|
afp.special_time_slots AS afp_special_time_slots,
|
||||||
ol.prod_id AS ol_prod_id,
|
afp.charge_mode AS afp_charge_mode,
|
||||||
ol.limit_unit AS ol_limit_unit,
|
afp.price AS afp_price,
|
||||||
ol.max_orders AS ol_max_orders,
|
afp.floating_percentage AS afp_floating_percentage,
|
||||||
</if>
|
|
||||||
<!-- 只有当 weightSwitch 开启时,才查询体重区间价格相关字段 -->
|
afd.id AS afd_record_id,
|
||||||
<if test="weightSwitch != null and weightSwitch == 1">
|
afd.prod_id AS afd_prod_id,
|
||||||
tpe.is_weight_charge as tpe_is_weight_charge,
|
afd.name AS afd_name,
|
||||||
wrp.id AS wrp_record_id,
|
afd.date_type AS afd_date_type,
|
||||||
wrp.prod_id AS wrp_prod_id,
|
afd.custom_time_slots AS afd_custom_time_slots,
|
||||||
wrp.weight_range AS wrp_weight_range,
|
afd.specific_dates AS afd_specific_dates,
|
||||||
wrp.price AS wrp_price,
|
afd.charge_mode AS afd_charge_mode,
|
||||||
wrp.is_enabled AS wrp_is_enabled,
|
afd.price AS afd_price,
|
||||||
</if>
|
afd.is_enabled AS afd_is_enabled,
|
||||||
<!-- 只有当 regionSwitch 开启时,才查询服务区域相关字段 -->
|
afd.create_time AS afd_create_time,
|
||||||
<if test="regionSwitch != null and regionSwitch == 1">
|
afd.update_time AS afd_update_time,
|
||||||
sa.id AS sa_rule_id,
|
afd.creator AS afd_creator,
|
||||||
sa.prod_id AS sa_prod_id,
|
afd.updater AS afd_updater,
|
||||||
sa.rule_type AS sa_rule_type,
|
afd.deleted AS afd_deleted,
|
||||||
sa.fee AS sa_fee,
|
|
||||||
saa.area_name AS sa_area_name,
|
rc.id AS rc_record_id,
|
||||||
</if>
|
rc.prod_id AS rc_prod_id,
|
||||||
p.prod_name
|
rc.reservation_time_slots AS rc_reservation_time_slots,
|
||||||
FROM
|
rc.advance_hours AS rc_advance_hours,
|
||||||
tz_prod p
|
rc.reservation_date_range AS rc_reservation_date_range,
|
||||||
<!-- 只有当 emergencySwitch 开启时才进行 LEFT JOIN -->
|
rc.allow_change AS rc_allow_change,
|
||||||
<if test="emergencySwitch != null and emergencySwitch == 1">
|
rc.change_time_rule AS rc_change_time_rule,
|
||||||
LEFT JOIN tz_prod_emergency_response erc ON p.prod_id = erc.prod_id AND erc.deleted = 0
|
rc.time_slot AS rc_time_slot,
|
||||||
LEFT JOIN tz_prod_additional_fee_dates epafd ON p.prod_id = epafd.prod_id AND epafd.deleted = 0 AND epafd.type = 3
|
rc.max_change_times AS rc_max_change_times,
|
||||||
LEFT JOIN tz_prod_emergency_response_intervals eri ON erc.id = eri.config_id AND eri.deleted = 0
|
|
||||||
</if>
|
rpafd.id AS black_id,
|
||||||
<if test="additionalFeeSwitch != null and additionalFeeSwitch == 1">
|
rpafd.date_type as black_date_type,
|
||||||
LEFT JOIN tz_prod_additional_fee_periods afp ON p.prod_id = afp.prod_id AND afp.deleted = 0
|
rpafd.custom_time_slots as black_custom_time_slots,
|
||||||
</if>
|
rpafd.type as black_type,
|
||||||
<if test="additionalSwitch != null and additionalSwitch == 1">
|
rpafd.is_enabled as black_is_enabled,
|
||||||
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">
|
ol.id AS ol_record_id,
|
||||||
LEFT JOIN tz_prod_reservation_config rc ON p.prod_id = rc.prod_id AND rc.deleted = 0
|
ol.prod_id AS ol_prod_id,
|
||||||
LEFT JOIN tz_prod_additional_fee_dates rpafd ON p.prod_id = rpafd.prod_id AND rpafd.deleted = 0 AND rpafd.type = 2
|
ol.limit_unit AS ol_limit_unit,
|
||||||
</if>
|
ol.max_orders AS ol_max_orders,
|
||||||
<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
|
|
||||||
</if>
|
tpe.is_weight_charge as tpe_is_weight_charge,
|
||||||
<if test="weightSwitch != null and weightSwitch == 1">
|
wrp.id AS wrp_record_id,
|
||||||
LEFT JOIN tz_prod_extend tpe ON p.prod_id = tpe.prod_id
|
wrp.prod_id AS wrp_prod_id,
|
||||||
LEFT JOIN tz_prod_weight_range_prices wrp ON p.prod_id = wrp.prod_id AND wrp.deleted = 0
|
wrp.weight_range AS wrp_weight_range,
|
||||||
</if>
|
wrp.price AS wrp_price,
|
||||||
<if test="regionSwitch != null and regionSwitch == 1">
|
wrp.is_enabled AS wrp_is_enabled,
|
||||||
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_areas saa ON sar.area_id = saa.id AND saa.deleted = 0
|
sa.id AS sa_rule_id,
|
||||||
</if>
|
sa.prod_id AS sa_prod_id,
|
||||||
where p.deleted = 0
|
sa.rule_type AS sa_rule_type,
|
||||||
AND p.prod_id = #{prodId}
|
sa.fee AS sa_fee,
|
||||||
ORDER BY p.prod_id
|
saa.area_name AS sa_area_name,
|
||||||
|
|
||||||
|
p.prod_name
|
||||||
|
FROM tz_prod p
|
||||||
|
|
||||||
|
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_additional_fee_periods afp ON p.prod_id = afp.prod_id AND afp.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
|
||||||
|
|
||||||
|
|
||||||
|
LEFT JOIN tz_prod_reservation_config rc ON p.prod_id = rc.prod_id AND rc.deleted = 0
|
||||||
|
LEFT JOIN tz_prod_additional_fee_dates rpafd
|
||||||
|
ON 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_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_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_areas saa ON sar.area_id = saa.id AND saa.deleted = 0
|
||||||
|
|
||||||
|
where p.deleted = 0
|
||||||
|
AND p.prod_id = #{prodId}
|
||||||
|
ORDER BY p.prod_id ,rpafd.date_type ,epafd.date_type,afd.date_type ASC
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
@@ -416,8 +403,7 @@
|
|||||||
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.response_time_slots as erc_response_time_slots,
|
erc.response_time_slots as erc_response_time_slots,
|
||||||
|
|
||||||
@@ -429,7 +415,7 @@
|
|||||||
|
|
||||||
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,
|
||||||
@@ -439,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,
|
||||||
@@ -449,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,
|
||||||
@@ -466,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,
|
||||||
@@ -484,49 +467,48 @@
|
|||||||
rpafd.custom_time_slots as black_custom_time_slots,
|
rpafd.custom_time_slots as black_custom_time_slots,
|
||||||
rpafd.type as black_type,
|
rpafd.type as black_type,
|
||||||
rpafd.is_enabled as black_is_enabled,
|
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,
|
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_name
|
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_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 afd.type = 1
|
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
|
||||||
LEFT JOIN tz_prod_additional_fee_dates rpafd ON p.prod_id = rpafd.prod_id AND rpafd.deleted = 0 AND rpafd.type = 2
|
LEFT JOIN tz_prod_additional_fee_dates rpafd ON p.prod_id = rpafd.prod_id AND rpafd.deleted = 0 AND rpafd.type = 2
|
||||||
</if>
|
|
||||||
<if test="orderLimitSwitch != null and orderLimitSwitch == 1">
|
|
||||||
LEFT JOIN tz_product_order_limit ol ON p.prod_id = ol.prod_id AND ol.deleted = 0
|
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_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
|
||||||
|
|||||||
Reference in New Issue
Block a user