| | |
| | | import com.yeshi.fanli.entity.jd.JDOrderItem;
|
| | | import com.yeshi.fanli.entity.order.CommonOrder;
|
| | | import com.yeshi.fanli.entity.pdd.PDDOrder;
|
| | | import com.yeshi.fanli.entity.suning.SuningOrderInfo;
|
| | | import com.yeshi.fanli.entity.taobao.TaoBaoOrder;
|
| | | import com.yeshi.fanli.entity.vipshop.VipShopOrderDetail;
|
| | | import com.yeshi.fanli.util.Constant;
|
| | |
| | | commonOrder.setChildSourceType("唯品会");
|
| | | return commonOrder;
|
| | | }
|
| | |
|
| | | public static CommonOrder create(SuningOrderInfo order) {
|
| | | CommonOrder commonOrder = new CommonOrder();
|
| | | commonOrder.setCount(Integer.parseInt(order.getSaleNum()));
|
| | | commonOrder.setCreateTime(new Date());
|
| | | if ("确认收货".equalsIgnoreCase(order.getOrderLineStatusDesc())) {
|
| | | commonOrder.seteIncome(new BigDecimal(order.getPrePayCommission()));
|
| | | commonOrder.setSettlement(new BigDecimal(order.getPayAmount()));
|
| | | commonOrder.setSettleTime(
|
| | | new Date(TimeUtil.convertToTimeTemp(order.getOrderLineStatusChangeTime(), "yyyy-MM-dd HH:mm:ss")));
|
| | | }
|
| | | commonOrder.setOrderNo(order.getOrderCode() + "");
|
| | | commonOrder.setPayment(new BigDecimal(order.getPayAmount()));
|
| | | commonOrder.setSourcePosition(order.getPositionId());
|
| | | commonOrder.setSourceType(Constant.SOURCE_TYPE_SUNING);
|
| | | int state = 0;
|
| | | if ("等待付款".equalsIgnoreCase(order.getOrderLineStatusDesc()))
|
| | | state = CommonOrder.STATE_FK;
|
| | | else if ("支付完成".equalsIgnoreCase(order.getOrderLineStatusDesc()))
|
| | | state = CommonOrder.STATE_FK;
|
| | | else if ("退款".equalsIgnoreCase(order.getOrderLineStatusDesc()))
|
| | | state = CommonOrder.STATE_SX;
|
| | | else if ("订单已取消".equalsIgnoreCase(order.getOrderLineStatusDesc()))
|
| | | state = CommonOrder.STATE_SX;
|
| | | else if ("确认收货".equalsIgnoreCase(order.getOrderLineStatusDesc()))
|
| | | state = CommonOrder.STATE_JS;
|
| | |
|
| | | commonOrder.setOrderBy(1);
|
| | | commonOrder.setState(state);
|
| | | commonOrder.setThirdCreateTime(
|
| | | new Date(TimeUtil.convertToTimeTemp(order.getOrderSubmitTime(), "yyyy-MM-dd HH:mm:ss")));
|
| | | commonOrder.setUpdateTime(new Date());
|
| | | commonOrder.setTradeId(order.getOrderLineNumber());
|
| | | commonOrder.setEstimate(new BigDecimal(order.getPrePayCommission()));
|
| | | commonOrder.setChildSourceType("苏宁");
|
| | | return commonOrder;
|
| | | }
|
| | | }
|