Browse Source

管理平台--平台确认收款增加分期支付限制

wangyc 8 years ago
parent
commit
bcf51d792b

+ 7 - 0
src/main/java/com/uas/platform/b2c/trade/order/service/impl/OrderServiceImpl.java

@@ -1264,6 +1264,13 @@ public class OrderServiceImpl implements OrderService {
     @Transactional
     public Order ensurePayed(String orderid, Integer type, Long... param) {
         Order order = orderDao.findByOrderid(orderid);
+        if (order == null)
+            throw new IllegalOperatorException("此订单不存在,请重新确认订单信息");
+
+        // 分期付款目前只支持直接付款给卖家
+        if (order.getInstallmentId() != null)
+            throw new IllegalOperatorException("此订单为直接付款给卖家,平台不可确认收款,请重新确认订单信息");
+
         if (order.getStatus().intValue() != Status.PAID.value()
                 && order.getStatus().intValue() != Status.TOBEPAID.value()) {
             throw new IllegalOperatorException(