记得上下班打卡 | git大法好,push需谨慎

Commit 67a654ce authored by jiangxiulong's avatar jiangxiulong

refundPriceCharges

parent c5ad16d6
...@@ -63,6 +63,8 @@ public class KylinOrderTicketVo implements Serializable, Cloneable { ...@@ -63,6 +63,8 @@ public class KylinOrderTicketVo implements Serializable, Cloneable {
private BigDecimal priceExpress; private BigDecimal priceExpress;
@ApiModelProperty(position = 27, value = "退款价格") @ApiModelProperty(position = 27, value = "退款价格")
private BigDecimal priceRefund; private BigDecimal priceRefund;
@ApiModelProperty(position = 27, value = "退款扣除的手续费金额")
private BigDecimal refundPriceCharges;
@ApiModelProperty(position = 28, value = "退款张数") @ApiModelProperty(position = 28, value = "退款张数")
private Integer refundNumber; private Integer refundNumber;
@ApiModelProperty(position = 29, value = "选择支付方式") @ApiModelProperty(position = 29, value = "选择支付方式")
......
...@@ -123,6 +123,11 @@ public class KylinOrderTickets implements Serializable ,Cloneable { ...@@ -123,6 +123,11 @@ public class KylinOrderTickets implements Serializable ,Cloneable {
*/ */
private BigDecimal priceRefund; private BigDecimal priceRefund;
/**
* 退款扣除的手续费金额
*/
private BigDecimal refundPriceCharges;
/** /**
* 退款张数 * 退款张数
*/ */
......
...@@ -517,6 +517,9 @@ CREATE TABLE `kylin_order_tickets` ...@@ -517,6 +517,9 @@ CREATE TABLE `kylin_order_tickets`
) ENGINE = InnoDB ) ENGINE = InnoDB
DEFAULT CHARSET utf8mb4 DEFAULT CHARSET utf8mb4
COLLATE utf8mb4_unicode_ci COMMENT '订单'; COLLATE utf8mb4_unicode_ci COMMENT '订单';
alter table kylin_order_tickets add refund_price_charges decimal(10, 2) NOT NULL DEFAULT '0.00' COMMENT '退款扣除的手续费金额' after price_refund;
-- 订单关系 -- 订单关系
drop TABLE if exists `kylin_order_ticket_relations`; drop TABLE if exists `kylin_order_ticket_relations`;
CREATE TABLE `kylin_order_ticket_relations` CREATE TABLE `kylin_order_ticket_relations`
......
...@@ -100,7 +100,7 @@ public class KylinRefundsStatusServiceImpl { ...@@ -100,7 +100,7 @@ public class KylinRefundsStatusServiceImpl {
); );
KylinOrderTicketStatus orderStatusTable = new KylinOrderTicketStatus(); KylinOrderTicketStatus orderStatusTable = new KylinOrderTicketStatus();
int newStatus = 0; int newStatus = 0;
if (refundCallbackParam.getRefundPrice().add(orderInfo.getPriceRefund()).compareTo(orderInfo.getPriceActual()) == 0) { if (refundCallbackParam.getRefundPrice().add(refundInfo.getPriceCharges()).add(orderInfo.getPriceRefund()).add(orderInfo.getRefundPriceCharges()).compareTo(orderInfo.getPriceActual()) == 0) {
newStatus = KylinTableStatusConst.ORDER_STATUS4; newStatus = KylinTableStatusConst.ORDER_STATUS4;
} else { } else {
newStatus = KylinTableStatusConst.ORDER_STATUS6; newStatus = KylinTableStatusConst.ORDER_STATUS6;
...@@ -173,6 +173,7 @@ public class KylinRefundsStatusServiceImpl { ...@@ -173,6 +173,7 @@ public class KylinRefundsStatusServiceImpl {
update.setRefundNumber(num); update.setRefundNumber(num);
update.setPriceRefund(price); update.setPriceRefund(price);
update.setUpdatedAt(LocalDateTime.now()); update.setUpdatedAt(LocalDateTime.now());
update.setRefundPriceCharges(orderInfo.getRefundPriceCharges().add(refundInfo.getPriceCharges()));
kylinOrderTicketsMapper.update( kylinOrderTicketsMapper.update(
update, new UpdateWrapper<KylinOrderTickets>() update, new UpdateWrapper<KylinOrderTickets>()
.eq("order_tickets_id", orderTicketsId) .eq("order_tickets_id", orderTicketsId)
...@@ -181,6 +182,7 @@ public class KylinRefundsStatusServiceImpl { ...@@ -181,6 +182,7 @@ public class KylinRefundsStatusServiceImpl {
HashMap<String, Object> orderVo = new HashMap<>(); HashMap<String, Object> orderVo = new HashMap<>();
orderVo.put("updatedAt", DateUtil.getNowTime()); orderVo.put("updatedAt", DateUtil.getNowTime());
orderVo.put("priceRefund", price); orderVo.put("priceRefund", price);
orderVo.put("refundPriceCharges", orderInfo.getRefundPriceCharges().add(refundInfo.getPriceCharges()));
orderVo.put("status", newStatus); orderVo.put("status", newStatus);
orderVo.put("refundNumber", num); orderVo.put("refundNumber", num);
BasicDBObject orderVov = new BasicDBObject("$set", mongoConverter.convertToMongoType(orderVo)); BasicDBObject orderVov = new BasicDBObject("$set", mongoConverter.convertToMongoType(orderVo));
......
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