Kaynağa Gözat

记录 完成、删除时间

dev
nizongfeng 3 yıl önce
ebeveyn
işleme
261490a6d8
1 değiştirilmiş dosya ile 19 ekleme ve 2 silme
  1. +19
    -2
      application/admin/dao/OrderMainDao.php

+ 19
- 2
application/admin/dao/OrderMainDao.php Dosyayı Görüntüle

@@ -105,10 +105,27 @@ class OrderMainDao
if (!$orderInfoRe['flag']) {
return $orderInfoRe;
}
$orderStatus = $this->getStatus($cnt,$statusList,$orderInfoRe['data']);
$orderInfo = $orderInfoRe['data'];
$orderStatus = $this->getStatus($cnt,$statusList,$orderInfo);
$saveVal = [
"total_amount" => $amount,
"cost_amount" => $cost,
"profit_amount"=>$amount-$cost,
"order_status"=>$orderStatus,
"success_time"=>null,
"cancel_time"=>null
];
if ($orderStatus != $orderInfo["order_status"]) {
if ($orderStatus==10) {
$saveVal["success_time"] = date("Y-m-d H:i:s");
}
if ($orderStatus == 11 ) {
$saveVal['cancel_time'] = date("Y-m-d H:m:s");
}
}
//更新金额
$orderMain = new OrderMain();
$orderMain->save(["total_amount" => $amount, "cost_amount" => $cost,"profit_amount"=>$amount-$cost,"order_status"=>$orderStatus],["id" => $orderId]);
$orderMain->save($saveVal,["id" => $orderId]);
return Util::returnArrSu();
}catch (Exception $e){
return Util::returnArrEr("更新主表订单金额失败:".$e->getMessage());


Yükleniyor…
İptal
Kaydet