格式转换

This commit is contained in:
邓皓元 2019-11-15 12:50:51 +08:00
parent 9c02f4d6ed
commit c755199298

View File

@ -676,15 +676,20 @@ class OrderService extends Service
$orderCards = [];
foreach ($res as $card) {
$counts = isset($orderShipments[$card->sim]) ? $orderShipments[$card->sim] + $cards[$card->sim] : $cards[$card->sim];
$counts = intval($counts);
$created_at = Carbon::parse($order->order_at)->format('Y-m-d H:i:s');
$orderCards[] = [
'type' => $order['type'],
'sim' => $card->sim,
'order_id' => $orderId,
'company_id' => $order['company_id'],
'package_id' => $order['package_id'],
'counts' => isset($orderShipments[$card->sim]) ? $orderShipments[$card->sim] + $cards[$card->sim] : $cards[$card->sim],
'counts' => $counts,
'unit_price' => $order['unit_price'],
'created_at' => $order->order_at,
'created_at' => $created_at,
'updated_at' => date('Y-m-d H:i:s'),
];
};