Commit 28666fc7 authored by hangjun83's avatar hangjun83

openapi 1.1

parent e5010fe8
<?php
/*
* This file is part of the Jiannei/lumen-api-starter.
*
* (c) Jiannei <longjian.huang@foxmail.com>
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/
namespace App\Repositories\Transformers\Rhawn;
use League\Fractal\TransformerAbstract;
class OrderDetailTransformer extends TransformerAbstract
{
/**
* 格式化结果
* @param $rhawnSorders
* @return array
*/
public function transform($rhawnSorders)
{
$orderTransReturn = [];
if($rhawnSorders){
foreach($rhawnSorders as $order){
$temp = [];
$temp['so_id'] = $order->so_id;
$temp['so_no'] = $order->so_no;
$temp['so_cus_po'] = $order->so_cus_po;
$temp['so_total'] = $order->so_total;
$temp['so_review_status'] = $order->so_review_status;
$temp['so_pay_status'] = $order->so_pay_status;
$temp['so_ca_name'] = $order->so_ca_name;
$temp['so_ca_mobile'] = $order->so_ca_mobile;
$temp['so_ca_phone'] = $order->so_ca_phone;
$temp['so_ca_province'] = $order->so_ca_province;
$temp['so_ca_city'] = $order->so_ca_city;
$temp['so_ca_county'] = $order->so_ca_county;
$temp['so_ca_street'] = $order->so_ca_street;
$temp['so_cia_name'] = $order->so_cia_name;
$temp['so_cia_mobile'] = $order->so_cia_mobile;
$temp['so_cia_phone'] = $order->so_cia_phone;
$temp['so_cia_province'] = $order->so_cia_province;
$temp['so_cia_city'] = $order->so_cia_city;
$temp['so_cia_county'] = $order->so_cia_county;
$temp['so_cia_street'] = $order->so_cia_street;
$temp['so_ci_method'] = $order->so_ci_method;
$temp['so_ci_type'] = $order->so_ci_type;
$temp['so_ci_title'] = $order->so_ci_title;
$temp['so_ci_bank'] = $order->so_ci_bank;
$temp['so_ci_bknum'] = $order->so_ci_bknum;
$temp['so_ci_addr'] = $order->so_ci_addr;
$temp['so_ci_phone'] = $order->so_ci_phone;
$temp['so_ci_vatno'] = $order->so_ci_vatno;
$temp['so_note'] = $order->so_note;
$temp['so_ctime'] = date('Y-m-d H:i:s',$order->so_ctime);
array_push($orderTransReturn,$temp);
}
}
return $orderTransReturn;
}
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment