|
@@ -275,6 +275,12 @@ public class CarOrderServiceImpl implements CarOrderService {
|
|
|
*/
|
|
*/
|
|
|
CarOrder carOrder = getCarOrder(id);
|
|
CarOrder carOrder = getCarOrder(id);
|
|
|
|
|
|
|
|
|
|
+ carOrder.setStatus("3");
|
|
|
|
|
+
|
|
|
|
|
+ carOrder.setOrderFinishTime(new Date());
|
|
|
|
|
+
|
|
|
|
|
+ int c = carOrderDao.updateByPrimaryKeySelective(carOrder);
|
|
|
|
|
+
|
|
|
//判断是什么订单 支付方式 1 全款 2 贷款
|
|
//判断是什么订单 支付方式 1 全款 2 贷款
|
|
|
OfflinePayments offlinePayments = new OfflinePayments();
|
|
OfflinePayments offlinePayments = new OfflinePayments();
|
|
|
offlinePayments.setCarOrderId(carOrder.getId());
|
|
offlinePayments.setCarOrderId(carOrder.getId());
|
|
@@ -285,6 +291,7 @@ public class CarOrderServiceImpl implements CarOrderService {
|
|
|
if ("1".equals(carOrder.getPayType())) {
|
|
if ("1".equals(carOrder.getPayType())) {
|
|
|
offlinePayments.setPaytype("1");
|
|
offlinePayments.setPaytype("1");
|
|
|
offlinePayments.setTailStatus("1");
|
|
offlinePayments.setTailStatus("1");
|
|
|
|
|
+ offlinePayments.setDownPaymentStatus("1");
|
|
|
offlinePayments.setInvoicePath(invoicePath);
|
|
offlinePayments.setInvoicePath(invoicePath);
|
|
|
} else {
|
|
} else {
|
|
|
offlinePayments.setPaytype("2");
|
|
offlinePayments.setPaytype("2");
|
|
@@ -293,7 +300,7 @@ public class CarOrderServiceImpl implements CarOrderService {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
int i = offlinePaymentsDao.insertSelective(offlinePayments);
|
|
int i = offlinePaymentsDao.insertSelective(offlinePayments);
|
|
|
- if (i > 0) {
|
|
|
|
|
|
|
+ if (c > 0 && i > 0) {
|
|
|
return true;
|
|
return true;
|
|
|
}
|
|
}
|
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
@@ -317,11 +324,7 @@ public class CarOrderServiceImpl implements CarOrderService {
|
|
|
|
|
|
|
|
CarOrder carOrder = getCarOrder(id);
|
|
CarOrder carOrder = getCarOrder(id);
|
|
|
|
|
|
|
|
- carOrder.setStatus("3");
|
|
|
|
|
|
|
|
|
|
- carOrder.setOrderFinishTime(new Date());
|
|
|
|
|
-
|
|
|
|
|
- int c = carOrderDao.updateByPrimaryKeySelective(carOrder);
|
|
|
|
|
|
|
|
|
|
OfflinePayments offlinePayments = new OfflinePayments();
|
|
OfflinePayments offlinePayments = new OfflinePayments();
|
|
|
offlinePayments.setCarOrderId(carOrder.getId());
|
|
offlinePayments.setCarOrderId(carOrder.getId());
|
|
@@ -337,7 +340,7 @@ public class CarOrderServiceImpl implements CarOrderService {
|
|
|
offlinePayments.setDeliveryPath(invoicePath);
|
|
offlinePayments.setDeliveryPath(invoicePath);
|
|
|
int o = offlinePaymentsDao.updateByPrimaryKeySelective(offlinePayments);
|
|
int o = offlinePaymentsDao.updateByPrimaryKeySelective(offlinePayments);
|
|
|
// offlinePaymentsDao.queryOne(carOrder.getId());
|
|
// offlinePaymentsDao.queryOne(carOrder.getId());
|
|
|
- if (c > 0 && o > 0) {
|
|
|
|
|
|
|
+ if ( o > 0) {
|
|
|
return true;
|
|
return true;
|
|
|
}
|
|
}
|
|
|
|
|
|