diff --git a/src/main/java/com/gxwebsoft/shop/controller/OrderPayController.java b/src/main/java/com/gxwebsoft/shop/controller/OrderPayController.java index 5bd6235..92f9ced 100644 --- a/src/main/java/com/gxwebsoft/shop/controller/OrderPayController.java +++ b/src/main/java/com/gxwebsoft/shop/controller/OrderPayController.java @@ -240,7 +240,8 @@ public class OrderPayController extends BaseController { OrderPay newOrderPay = new OrderPay(); BeanCopier.create(olderPay, newOrderPay, CopyOptions.create().ignoreNullValue().setIgnoreProperties("id","orderNo")).copy(); - newOrderPay.setPayPrice(orderPay.getOrderPrice()); + + newOrderPay.setOrderPrice(BigDecimal.valueOf(orderPay.getOrderPriceInt())); newOrderPay.setStartTime(orderPay.getStartTime()); newOrderPay.setPayTime(new Date()); newOrderPay.setCreateTime(new Date()); diff --git a/src/main/java/com/gxwebsoft/shop/entity/OrderPay.java b/src/main/java/com/gxwebsoft/shop/entity/OrderPay.java index f207c42..0412368 100644 --- a/src/main/java/com/gxwebsoft/shop/entity/OrderPay.java +++ b/src/main/java/com/gxwebsoft/shop/entity/OrderPay.java @@ -220,6 +220,10 @@ public class OrderPay implements Serializable { @TableField(exist = false) private String merchantName; + @ApiModelProperty(value = "订单费用") + @TableField(exist = false) + private Integer orderPriceInt;//为了方便转成BigDecimal orderPrice + public Long getExpirationDay() { switch(payStatus){ case OrderConstants.PAY_STATUS_NO_PAY: