修复bug
This commit is contained in:
@ -31,7 +31,6 @@ public interface OrderConvert {
|
|||||||
@Mapping(source = "rentCarOrderReq.carModelId", target = "carModelId"),
|
@Mapping(source = "rentCarOrderReq.carModelId", target = "carModelId"),
|
||||||
@Mapping(source = "rentCarOrderReq.rentCarRuleId", target = "rentCarRuleId"),
|
@Mapping(source = "rentCarOrderReq.rentCarRuleId", target = "rentCarRuleId"),
|
||||||
@Mapping(source = "rentCarOrderReq.rentBatteyRuleId", target = "rentBatteyRuleId"),
|
@Mapping(source = "rentCarOrderReq.rentBatteyRuleId", target = "rentBatteyRuleId"),
|
||||||
@Mapping(source = "rentCarOrderReq.isAutoDeduct", target = "isAutoDeduct"),
|
|
||||||
@Mapping(source = "rentCarOrderReq.isDepositFree", target = "isDepositFree"),
|
@Mapping(source = "rentCarOrderReq.isDepositFree", target = "isDepositFree"),
|
||||||
@Mapping(source = "rentCarOrderReq.batteryType", target = "batteryType"),
|
@Mapping(source = "rentCarOrderReq.batteryType", target = "batteryType"),
|
||||||
@Mapping(source = "userInfoDTO.userId", target = "customerId"),
|
@Mapping(source = "userInfoDTO.userId", target = "customerId"),
|
||||||
|
|||||||
@ -23,6 +23,4 @@ public class ReRentCarReq {
|
|||||||
@ApiModelProperty(value = "客户id")
|
@ApiModelProperty(value = "客户id")
|
||||||
private Long customerId;
|
private Long customerId;
|
||||||
|
|
||||||
@ApiModelProperty("是否开通代扣")
|
|
||||||
private Boolean isAutoDeduct = false;
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -40,7 +40,6 @@ public class RentCarOrderReq {
|
|||||||
|
|
||||||
|
|
||||||
@ApiModelProperty(value = "租电套餐id")
|
@ApiModelProperty(value = "租电套餐id")
|
||||||
@NotNull(message = "租电套餐id不能为空")
|
|
||||||
private Long rentBatteyRuleId;
|
private Long rentBatteyRuleId;
|
||||||
|
|
||||||
@ApiModelProperty("选择的电池类型")
|
@ApiModelProperty("选择的电池类型")
|
||||||
@ -50,7 +49,4 @@ public class RentCarOrderReq {
|
|||||||
|
|
||||||
@ApiModelProperty("是否开通免押")
|
@ApiModelProperty("是否开通免押")
|
||||||
private Boolean isDepositFree = false;
|
private Boolean isDepositFree = false;
|
||||||
|
|
||||||
@ApiModelProperty("是否开通代扣")
|
|
||||||
private Boolean isAutoDeduct = false;
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -155,19 +155,11 @@ public class OrderServiceImpl implements OrderService {
|
|||||||
|
|
||||||
//生成子表订单
|
//生成子表订单
|
||||||
String paymentType;
|
String paymentType;
|
||||||
if(rentCarOrderReq.getIsAutoDeduct()){
|
|
||||||
if(StringUtils.equalsIgnoreCase(userInfoDTO.getMiniProgramType(), MiniProgramTypeEnum.WECHAT.getType())){
|
|
||||||
paymentType = PaymentTypeEnum.WX_DQ.getCode();
|
|
||||||
}else {
|
|
||||||
paymentType = PaymentTypeEnum.ZFB_DQ.getCode();
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if(StringUtils.equalsIgnoreCase(userInfoDTO.getMiniProgramType(), MiniProgramTypeEnum.WECHAT.getType())){
|
if(StringUtils.equalsIgnoreCase(userInfoDTO.getMiniProgramType(), MiniProgramTypeEnum.WECHAT.getType())){
|
||||||
paymentType = PaymentTypeEnum.WX_PAY.getCode();
|
paymentType = PaymentTypeEnum.WX_PAY.getCode();
|
||||||
}else {
|
}else {
|
||||||
paymentType = PaymentTypeEnum.ZFB_PAY.getCode();
|
paymentType = PaymentTypeEnum.ZFB_PAY.getCode();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
List<OrderSubPO> orderSubPOList = new ArrayList<>();
|
List<OrderSubPO> orderSubPOList = new ArrayList<>();
|
||||||
|
|
||||||
//如果未开通免押则要生成押金订单
|
//如果未开通免押则要生成押金订单
|
||||||
@ -273,19 +265,11 @@ public class OrderServiceImpl implements OrderService {
|
|||||||
}
|
}
|
||||||
//生成子表订单
|
//生成子表订单
|
||||||
String paymentType;
|
String paymentType;
|
||||||
if(rentCarOrderReq.getIsAutoDeduct()){
|
|
||||||
if(StringUtils.equalsIgnoreCase(userInfoDTO.getMiniProgramType(), MiniProgramTypeEnum.WECHAT.getType())){
|
|
||||||
paymentType = PaymentTypeEnum.WX_DQ.getCode();
|
|
||||||
}else {
|
|
||||||
paymentType = PaymentTypeEnum.ZFB_DQ.getCode();
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if(StringUtils.equalsIgnoreCase(userInfoDTO.getMiniProgramType(), MiniProgramTypeEnum.WECHAT.getType())){
|
if(StringUtils.equalsIgnoreCase(userInfoDTO.getMiniProgramType(), MiniProgramTypeEnum.WECHAT.getType())){
|
||||||
paymentType = PaymentTypeEnum.WX_PAY.getCode();
|
paymentType = PaymentTypeEnum.WX_PAY.getCode();
|
||||||
}else {
|
}else {
|
||||||
paymentType = PaymentTypeEnum.ZFB_PAY.getCode();
|
paymentType = PaymentTypeEnum.ZFB_PAY.getCode();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
//获取续租车金额
|
//获取续租车金额
|
||||||
BigDecimal rentCarOrderAmount = getReRentCarAmount(orderMainPO.getEndRentTime(), orderMainPO.getRentalType(), orderMainPO.getRentalPrice(), orderMainPO.getRentalDays());
|
BigDecimal rentCarOrderAmount = getReRentCarAmount(orderMainPO.getEndRentTime(), orderMainPO.getRentalType(), orderMainPO.getRentalPrice(), orderMainPO.getRentalDays());
|
||||||
//获取租电金额
|
//获取租电金额
|
||||||
@ -513,19 +497,11 @@ public class OrderServiceImpl implements OrderService {
|
|||||||
}
|
}
|
||||||
//生成子表订单
|
//生成子表订单
|
||||||
String paymentType;
|
String paymentType;
|
||||||
if(rentCarOrderReq.getIsAutoDeduct()){
|
|
||||||
if(StringUtils.equalsIgnoreCase(userInfoDTO.getMiniProgramType(), MiniProgramTypeEnum.WECHAT.getType())){
|
|
||||||
paymentType = PaymentTypeEnum.WX_DQ.getCode();
|
|
||||||
}else {
|
|
||||||
paymentType = PaymentTypeEnum.ZFB_DQ.getCode();
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if(StringUtils.equalsIgnoreCase(userInfoDTO.getMiniProgramType(), MiniProgramTypeEnum.WECHAT.getType())){
|
if(StringUtils.equalsIgnoreCase(userInfoDTO.getMiniProgramType(), MiniProgramTypeEnum.WECHAT.getType())){
|
||||||
paymentType = PaymentTypeEnum.WX_PAY.getCode();
|
paymentType = PaymentTypeEnum.WX_PAY.getCode();
|
||||||
}else {
|
}else {
|
||||||
paymentType = PaymentTypeEnum.ZFB_PAY.getCode();
|
paymentType = PaymentTypeEnum.ZFB_PAY.getCode();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
Integer overDueDaysOrHours = OrderUtil.getOrderOverdueDays(orderMainPO.getEndRentTime());
|
Integer overDueDaysOrHours = OrderUtil.getOrderOverdueDays(orderMainPO.getEndRentTime());
|
||||||
if(StringUtils.equalsIgnoreCase(RentCarTypeEnum.HOUR_RENTAL.getCode(), orderMainPO.getRentalType())){
|
if(StringUtils.equalsIgnoreCase(RentCarTypeEnum.HOUR_RENTAL.getCode(), orderMainPO.getRentalType())){
|
||||||
overDueDaysOrHours = OrderUtil.getOrderOverdueHours(orderMainPO.getEndRentTime());
|
overDueDaysOrHours = OrderUtil.getOrderOverdueHours(orderMainPO.getEndRentTime());
|
||||||
|
|||||||
@ -82,6 +82,7 @@
|
|||||||
|
|
||||||
<where>
|
<where>
|
||||||
zos.del_flag = '0'
|
zos.del_flag = '0'
|
||||||
|
and zos.suborder_type = 'RENTBATTEY'
|
||||||
and zom.del_flag = '0'
|
and zom.del_flag = '0'
|
||||||
<if test="customerId != null">
|
<if test="customerId != null">
|
||||||
and zom.customer_id = #{customerId}
|
and zom.customer_id = #{customerId}
|
||||||
|
|||||||
Reference in New Issue
Block a user