订单明细优惠费用
This commit is contained in:
parent
1511e1f8f8
commit
ba6b471523
@ -99,6 +99,11 @@ public class FeignEbikeRefundOrderDetailVo {
|
|||||||
*/
|
*/
|
||||||
private BigDecimal helmetManagementFee;
|
private BigDecimal helmetManagementFee;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 优惠费用
|
||||||
|
*/
|
||||||
|
private BigDecimal discountAmount;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 退款申请类型
|
* 退款申请类型
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -44,7 +44,7 @@ public class EbikeOrderDetail implements Serializable {
|
|||||||
private Long operatorId;
|
private Long operatorId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 费用类型:1-时长费用 2-起步费用 3-运营区调度费用 4-停车区外调度费用 5-禁停区调度费用 6-头盔使用费用
|
* 费用类型:1-时长费用 2-起步费用 3-运营区调度费用 4-停车区外调度费用 5-禁停区调度费用 6-头盔使用费用 7-优惠费用
|
||||||
*/
|
*/
|
||||||
private Integer detailType;
|
private Integer detailType;
|
||||||
|
|
||||||
|
|||||||
@ -24,7 +24,7 @@ public class EbikePaymentCostDetailVo implements Serializable {
|
|||||||
private Long detailId;
|
private Long detailId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 费用类型 1-时长费用 2-起步费用 3-运营区调度费用 4-停车区外调度费用 5-禁停区调度费用 6-头盔使用费用
|
* 费用类型 1-时长费用 2-起步费用 3-运营区调度费用 4-停车区外调度费用 5-禁停区调度费用 6-头盔使用费用 7-优惠费用
|
||||||
*/
|
*/
|
||||||
private Integer detailType;
|
private Integer detailType;
|
||||||
|
|
||||||
|
|||||||
@ -673,7 +673,7 @@ public class EbikeOrderServiceImpl extends ServiceImpl<EbikeOrderMapper, EbikeOr
|
|||||||
private EbikeOrderDetailVo getEbikeOrderDetailVo(EbikeOrderDetailVo ebikeOrderDetailVo, List<EbikePaymentCostDetailVo> details) {
|
private EbikeOrderDetailVo getEbikeOrderDetailVo(EbikeOrderDetailVo ebikeOrderDetailVo, List<EbikePaymentCostDetailVo> details) {
|
||||||
if (!CollectionUtils.isEmpty(details)) {
|
if (!CollectionUtils.isEmpty(details)) {
|
||||||
for (EbikePaymentCostDetailVo payDetailVo : details) {
|
for (EbikePaymentCostDetailVo payDetailVo : details) {
|
||||||
//1-时长费用 2-起步费用 3-运营区调度费用 4-停车区外调度费用 5-禁停区调度费用 6-头盔使用费用
|
//1-时长费用 2-起步费用 3-运营区调度费用 4-停车区外调度费用 5-禁停区调度费用 6-头盔使用费用 7-优惠费用
|
||||||
switch (payDetailVo.getDetailType()) {
|
switch (payDetailVo.getDetailType()) {
|
||||||
case 1 -> {
|
case 1 -> {
|
||||||
BigDecimal current = payDetailVo.getDetailAmount();
|
BigDecimal current = payDetailVo.getDetailAmount();
|
||||||
|
|||||||
@ -179,7 +179,7 @@ public class EbikeRefundServiceImpl extends ServiceImpl<EbikeRefundMapper, Ebike
|
|||||||
List<EbikePaymentCostDetailVo> details = orderDetailService.getOrderDetailsByOrderId(detailVo.getOrderId());
|
List<EbikePaymentCostDetailVo> details = orderDetailService.getOrderDetailsByOrderId(detailVo.getOrderId());
|
||||||
if (Objects.nonNull(details)) {
|
if (Objects.nonNull(details)) {
|
||||||
for (EbikePaymentCostDetailVo payDetailVo : details) {
|
for (EbikePaymentCostDetailVo payDetailVo : details) {
|
||||||
//1-时长费用 2-起步费用 3-运营区调度费用 4-停车区外调度费用 5-禁停区调度费用 6-头盔使用费用
|
//1-时长费用 2-起步费用 3-运营区调度费用 4-停车区外调度费用 5-禁停区调度费用 6-头盔使用费用 7-优惠费用
|
||||||
switch (payDetailVo.getDetailType()) {
|
switch (payDetailVo.getDetailType()) {
|
||||||
case 1 -> {
|
case 1 -> {
|
||||||
BigDecimal current = payDetailVo.getDetailAmount();
|
BigDecimal current = payDetailVo.getDetailAmount();
|
||||||
@ -205,6 +205,11 @@ public class EbikeRefundServiceImpl extends ServiceImpl<EbikeRefundMapper, Ebike
|
|||||||
BigDecimal current = payDetailVo.getDetailAmount();
|
BigDecimal current = payDetailVo.getDetailAmount();
|
||||||
detailVo.setHelmetManagementFee((current != null ? current : BigDecimal.ZERO));
|
detailVo.setHelmetManagementFee((current != null ? current : BigDecimal.ZERO));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case 7 -> {
|
||||||
|
BigDecimal current = payDetailVo.getDetailAmount();
|
||||||
|
detailVo.setDiscountAmount((current != null ? current : BigDecimal.ZERO));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -443,7 +448,7 @@ public class EbikeRefundServiceImpl extends ServiceImpl<EbikeRefundMapper, Ebike
|
|||||||
List<EbikePaymentCostDetailVo> details = orderDetailService.getOrderDetailsByOrderId(orderId);
|
List<EbikePaymentCostDetailVo> details = orderDetailService.getOrderDetailsByOrderId(orderId);
|
||||||
if (details != null && !details.isEmpty()) {
|
if (details != null && !details.isEmpty()) {
|
||||||
for (EbikePaymentCostDetailVo detailVo : details) {
|
for (EbikePaymentCostDetailVo detailVo : details) {
|
||||||
//1-时长费用 2-起步费用 3-运营区调度费用 4-停车区外调度费用 5-禁停区调度费用 6-头盔使用费用
|
//1-时长费用 2-起步费用 3-运营区调度费用 4-停车区外调度费用 5-禁停区调度费用 6-头盔使用费用 7-优惠费用
|
||||||
switch (detailVo.getDetailType()) {
|
switch (detailVo.getDetailType()) {
|
||||||
case 1 -> detailInfo.setDurationFee(
|
case 1 -> detailInfo.setDurationFee(
|
||||||
Optional.ofNullable(detailVo.getDetailAmount()).orElse(BigDecimal.ZERO));
|
Optional.ofNullable(detailVo.getDetailAmount()).orElse(BigDecimal.ZERO));
|
||||||
@ -457,6 +462,8 @@ public class EbikeRefundServiceImpl extends ServiceImpl<EbikeRefundMapper, Ebike
|
|||||||
Optional.ofNullable(detailVo.getDetailAmount()).orElse(BigDecimal.ZERO));
|
Optional.ofNullable(detailVo.getDetailAmount()).orElse(BigDecimal.ZERO));
|
||||||
case 6 -> detailInfo.setHelmetManagementFee(
|
case 6 -> detailInfo.setHelmetManagementFee(
|
||||||
Optional.ofNullable(detailVo.getDetailAmount()).orElse(BigDecimal.ZERO));
|
Optional.ofNullable(detailVo.getDetailAmount()).orElse(BigDecimal.ZERO));
|
||||||
|
case 7 -> detailInfo.setDiscountAmount(
|
||||||
|
Optional.ofNullable(detailVo.getDetailAmount()).orElse(BigDecimal.ZERO));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user