Browse Source

优化

dev
nizongfeng 3 years ago
parent
commit
6025788eb3
1 changed files with 6 additions and 3 deletions
  1. +6
    -3
      application/admin/service/OrderMainService.php

+ 6
- 3
application/admin/service/OrderMainService.php View File

@@ -35,6 +35,9 @@ class OrderMainService
if (!$addOrderMain["flag"]) { if (!$addOrderMain["flag"]) {
return $addOrderMain; return $addOrderMain;
} }
if (!isset($param['subOrderList']) || count($param['subOrderList'])==0) {
return Util::returnArrSu("成功",$addOrderMain['data']);
}
$orderId = $addOrderMain['data']; $orderId = $addOrderMain['data'];
//所有子订单设置为删除 //所有子订单设置为删除
$orderHotelDao = new OrderHotelDao(); $orderHotelDao = new OrderHotelDao();
@@ -109,7 +112,7 @@ class OrderMainService
if (!$setOrderMainRe['flag']) { if (!$setOrderMainRe['flag']) {
return $setOrderMainRe; return $setOrderMainRe;
} }
return Util::returnArrSu("",$orderId);
return Util::returnArrSu("成功",$orderId);
} }


/** /**
@@ -213,7 +216,7 @@ class OrderMainService
//重新计算订单总金额 //重新计算订单总金额
$orderMainDao = new OrderMainDao(); $orderMainDao = new OrderMainDao();
$orderMainDao->setOrderAmount($subOrderRe['data']['order_id']); $orderMainDao->setOrderAmount($subOrderRe['data']['order_id']);
return Util::returnArrSu();
return Util::returnArrSu("成功");
}catch (Exception $e){ }catch (Exception $e){
return Util::returnArrEr("删除子订单失败:".$e->getMessage()); return Util::returnArrEr("删除子订单失败:".$e->getMessage());
} }
@@ -265,6 +268,6 @@ class OrderMainService
return $subOrderList; return $subOrderList;
} }
$orderMain["subOrderList"]=$subOrderList['data']; $orderMain["subOrderList"]=$subOrderList['data'];
return Util::returnArrSu("",$orderMain);
return Util::returnArrSu("成功",$orderMain);
} }
} }

Loading…
Cancel
Save