| | |
| | | package com.yeshi.fanli.util.factory.shop;
|
| | |
|
| | | import com.yeshi.fanli.entity.shop.BanLiShopOrder;
|
| | | import com.yeshi.fanli.util.MoneyBigDecimalUtil;
|
| | | import com.yeshi.fanli.util.TimeUtil;
|
| | | import com.yeshi.fanli.vo.shop.BanLiShopOrderGoodsVO;
|
| | | import com.yeshi.fanli.vo.shop.BanLiShopOrderVO;
|
| | |
| | | vo.setOrderId(order.getOrderNo());
|
| | | vo.setOrderTime(TimeUtil.getGernalTime(order.getCreateTime().getTime(), "yyyy-MM-dd HH:mm:ss"));
|
| | | // 需要确定订单状态输出
|
| | | if (order.getState() == BanLiShopOrder.STATE_INVALID) {
|
| | | vo.setState("订单失效");
|
| | | vo.setStateColor("#E5005C");
|
| | | vo.setStateDesc("未成功支付");
|
| | | if (order.getState() == BanLiShopOrder.STATE_INVALID || order.getState() == BanLiShopOrder.STATE_NO_PAY) {
|
| | | vo.setState("未付款");
|
| | | vo.setStateColor("#e5005c");
|
| | | } else if (order.getState() == BanLiShopOrder.STATE_PART_PAY) {
|
| | | vo.setState("未实付");
|
| | | vo.setStateColor("#e5005c");
|
| | | } else if (order.getState() == BanLiShopOrder.STATE_SUCCESS) {
|
| | | vo.setState("充值成功");
|
| | | vo.setStateColor("#2FB102");
|
| | | vo.setStateDesc("");
|
| | | } else {
|
| | | vo.setState("充值成功");
|
| | | vo.setStateColor("#2FB102");
|
| | | vo.setStateDesc("");
|
| | | } else if (order.getState() == BanLiShopOrder.STATE_REJECT
|
| | | || order.getState() == BanLiShopOrder.STATE_REJECT_REFUND_FAIL
|
| | | || order.getState() == BanLiShopOrder.STATE_REJECT_REFUND_PART_SUCCESS
|
| | | || order.getState() == BanLiShopOrder.STATE_REJECT_REFUND_SUCCESS) {// 拒绝了
|
| | | vo.setState("充值失败");
|
| | | vo.setStateColor("#e5005c");
|
| | | } else if (order.getState() == BanLiShopOrder.STATE_PAID) {
|
| | | vo.setState("审核中");
|
| | | vo.setStateColor("#777777");
|
| | | }
|
| | | vo.setStateDesc("实付款 ¥" + getPaidMoney(order));
|
| | |
|
| | | return vo;
|
| | | }
|
| | |
|
| | | private static String getPaidMoney(BanLiShopOrder order) {
|
| | | if (order.getMoneyPaymentState() == null || order.getMoneyPaymentState() == BanLiShopOrder.PAY_STATE_NOPAY
|
| | | || order.getMoneyPaymentState() == BanLiShopOrder.PAY_STATE_REFUND) {
|
| | | return "0.00";
|
| | | } else
|
| | | return order.getMoneyPayment().setScale(2).toString();
|
| | | }
|
| | |
|
| | | }
|