Browse Source

bug修复

master
nizongfeng 1 year ago
parent
commit
c6cf160d32
5 changed files with 56 additions and 0 deletions
  1. +13
    -0
      application/admin/dao/OrderHotelDao.php
  2. +13
    -0
      application/admin/dao/OrderItemDao.php
  3. +18
    -0
      application/admin/dao/OrderMainDao.php
  4. +7
    -0
      application/admin/service/PaymentOrderService.php
  5. +5
    -0
      application/admin/service/ReceiptOrderService.php

+ 13
- 0
application/admin/dao/OrderHotelDao.php View File

@@ -342,4 +342,17 @@ class OrderHotelDao
return [];
}
}

public function updatePayOrderName($id, $name) {
try{
$data = [
"payment_order_name"=>$name
];
$model = new OrderHotel();
$model->save($data,["payment_order_id"=>$id]);
return Util::returnArrSu();
}catch (Exception $e){
return Util::returnArrEr("同步名称到订单失败".$e->getMessage());
}
}
}

+ 13
- 0
application/admin/dao/OrderItemDao.php View File

@@ -293,4 +293,17 @@ class OrderItemDao
return [];
}
}

public function updatePayOrderName($id, $name) {
try{
$data = [
"payment_order_name"=>$name
];
$model = new OrderItem();
$model->save($data,["payment_order_id"=>$id]);
return Util::returnArrSu();
}catch (Exception $e){
return Util::returnArrEr("同步名称到订单失败".$e->getMessage());
}
}
}

+ 18
- 0
application/admin/dao/OrderMainDao.php View File

@@ -384,4 +384,22 @@ class OrderMainDao
return Util::returnArrEr("将主订单从收款单下移除失败".$e->getMessage());
}
}

/**
* @param $id
* @param $name
* @return array
*/
public function updateReceiptOrderName($id, $name) {
try{
$data = [
"receipt_order_name"=>$name
];
$model = new OrderMain();
$model->save($data,["receipt_order_id"=>$id]);
return Util::returnArrSu();
}catch (Exception $e){
return Util::returnArrEr("同步名称到订单失败".$e->getMessage());
}
}
}

+ 7
- 0
application/admin/service/PaymentOrderService.php View File

@@ -30,6 +30,13 @@ class PaymentOrderService
if (!$addRe['flag']) {
return $addRe;
}
if (!empty($param['id'])) {
$orderHotelModel = new OrderHotelDao();
$orderHotelModel->updatePayOrderName($param['id'], $param["name"]);

$orderItemModel = new OrderItemDao();
$orderItemModel->updatePayOrderName($param['id'], $param["name"]);
}
return Util::returnArrSu();

}


+ 5
- 0
application/admin/service/ReceiptOrderService.php View File

@@ -29,6 +29,11 @@ class ReceiptOrderService
if (!$addRe['flag']) {
return $addRe;
}
if (!empty($param['id'])) {
$orderModel = new OrderMainDao();
$orderModel->updateReceiptOrderName($param['id'], $param["name"]);
}

return Util::returnArrSu();

}


Loading…
Cancel
Save