From 22a26a9236a847a4541514478213f5773d0f12a8 Mon Sep 17 00:00:00 2001 From: yangqingyuan Date: Wed, 21 Aug 2024 16:40:16 +0800 Subject: [PATCH] =?UTF-8?q?feat=EF=BC=9A=E4=BF=AE=E5=A4=8D=E7=BA=BF?= =?UTF-8?q?=E4=B8=8A=E7=BB=AD=E8=B4=B9=E8=AE=A2=E5=8D=95=E8=B4=B9=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/gxwebsoft/shop/controller/OrderPayController.java | 3 ++- src/main/java/com/gxwebsoft/shop/entity/OrderPay.java | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) 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: