From d28bed1a1275131a5ca37f7da37961e2b518ac07 Mon Sep 17 00:00:00 2001 From: admin <weikou2014> Date: 星期一, 26 八月 2019 13:44:00 +0800 Subject: [PATCH] 淘礼金创建异常处理 --- fanli/src/main/java/com/yeshi/fanli/util/factory/goods/CommonOrderFactory.java | 14 ++++++++++++-- 1 files changed, 12 insertions(+), 2 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/util/factory/goods/CommonOrderFactory.java b/fanli/src/main/java/com/yeshi/fanli/util/factory/goods/CommonOrderFactory.java index 7b17e87..5849ec9 100644 --- a/fanli/src/main/java/com/yeshi/fanli/util/factory/goods/CommonOrderFactory.java +++ b/fanli/src/main/java/com/yeshi/fanli/util/factory/goods/CommonOrderFactory.java @@ -21,6 +21,12 @@ commonOrder.setSettlement( MoneyBigDecimalUtil.div(new BigDecimal(order.getOrderAmount()), new BigDecimal(100)));// 缁撶畻閲戦 commonOrder.setSettleTime(new Date(order.getOrderVerifyTime() * 1000)); + } else if (order.getOrderStatus() == 2) {// 纭鏀惰揣褰掍负瀹℃牳閫氳繃 + commonOrder.seteIncome( + MoneyBigDecimalUtil.div(new BigDecimal(order.getPromotionAmount()), new BigDecimal(100))); + commonOrder.setSettlement( + MoneyBigDecimalUtil.div(new BigDecimal(order.getOrderAmount()), new BigDecimal(100)));// 缁撶畻閲戦 + commonOrder.setSettleTime(new Date(order.getOrderReceiveTime() * 1000)); } else { commonOrder.seteIncome(new BigDecimal(0)); commonOrder.setSettlement(new BigDecimal(0)); @@ -40,11 +46,14 @@ } else if (1 == order.getOrderStatus()) { state = CommonOrder.STATE_FK; } else if (2 == order.getOrderStatus()) { - state = CommonOrder.STATE_FK; + state = CommonOrder.STATE_JS; } else if (3 == order.getOrderStatus()) { state = CommonOrder.STATE_FK; } else if (4 == order.getOrderStatus()) { - state = CommonOrder.STATE_WQ; + if (order.getOrderReceiveTime() == null || order.getOrderReceiveTime() == 0) + state = CommonOrder.STATE_SX; + else + state = CommonOrder.STATE_WQ; } else if (5 == order.getOrderStatus()) { state = CommonOrder.STATE_JS; } else if (8 == order.getOrderStatus()) { @@ -89,6 +98,7 @@ commonOrder.setThirdCreateTime(new Date(order.getOrder().getOrderTime())); commonOrder.setUpdateTime(new Date()); commonOrder.setTradeId(order.getTradeId()); + commonOrder.setEstimate(order.getEstimateFee()); return commonOrder; } -- Gitblit v1.8.0