Commit e137ca09 authored by 周健威's avatar 周健威

修复订单相关bug

parent c08179f5
package com.xxfc.platform.order.pojo.price; package com.xxfc.platform.order.pojo.price;
import cn.hutool.json.JSONUtil;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
...@@ -8,11 +9,17 @@ import java.math.BigDecimal; ...@@ -8,11 +9,17 @@ import java.math.BigDecimal;
@Data @Data
public class OrderPriceVO { public class OrderPriceVO {
@ApiModelProperty(value = "订单总金额") @ApiModelProperty(value = "订单总金额")
public BigDecimal orderAmount; public BigDecimal orderAmount = BigDecimal.ZERO;
@ApiModelProperty(value = "商品价格") @ApiModelProperty(value = "商品价格")
public BigDecimal goodsAmount; public BigDecimal goodsAmount = BigDecimal.ZERO;
@ApiModelProperty(value = "实际价格") @ApiModelProperty(value = "实际价格")
public BigDecimal realAmount; public BigDecimal realAmount = BigDecimal.ZERO;
@ApiModelProperty(value = "优惠券扣除的费用") @ApiModelProperty(value = "优惠券扣除的费用")
public BigDecimal couponAmount; public BigDecimal couponAmount = BigDecimal.ZERO;
@ApiModelProperty(value = "参数json")
public String paramJson = "";
public void initParamJson() {
paramJson = JSONUtil.toJsonStr(this);
}
} }
...@@ -58,4 +58,5 @@ public class RentVehiclePriceVO extends OrderPriceVO{ ...@@ -58,4 +58,5 @@ public class RentVehiclePriceVO extends OrderPriceVO{
* 优惠描述 * 优惠描述
*/ */
private String couponDesc = ""; private String couponDesc = "";
} }
...@@ -344,6 +344,7 @@ public class OrderRentVehicleService extends AbstractOrderHandle<OrderRentVehicl ...@@ -344,6 +344,7 @@ public class OrderRentVehicleService extends AbstractOrderHandle<OrderRentVehicl
rvp.setBuyVehicleAmount(vehicleOrderItem.getBuyAmount()); rvp.setBuyVehicleAmount(vehicleOrderItem.getBuyAmount());
rvp.setCouponDesc(couponDesc); rvp.setCouponDesc(couponDesc);
rvp.initParamJson();
//设置收费明细 //设置收费明细
costDetail(rvp, handleChildren(detail, vehicleDayNum)); costDetail(rvp, handleChildren(detail, vehicleDayNum));
return rvp; return rvp;
......
...@@ -279,6 +279,7 @@ public class OrderTourService extends AbstractOrderHandle<OrderTourDetailBiz, To ...@@ -279,6 +279,7 @@ public class OrderTourService extends AbstractOrderHandle<OrderTourDetailBiz, To
tpv.setInsureAmount(insureAmount); tpv.setInsureAmount(insureAmount);
tpv.setTotalNumber(detail.getTotalNumber()); tpv.setTotalNumber(detail.getTotalNumber());
tpv.initParamJson();
//设置收费明细 //设置收费明细
costDetail(tpv, handleChildren(detail)); costDetail(tpv, handleChildren(detail));
return tpv; return tpv;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment