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