Commit 6c8e2fcc authored by hangjun83's avatar hangjun83

openapi 1.1

parent dc018387
...@@ -76,6 +76,236 @@ class OrdersProperty ...@@ -76,6 +76,236 @@ class OrdersProperty
*/ */
public $soPayStatus; public $soPayStatus;
/**
* @Property(
* type="string",
* description="收货人"
* )
*
* @var string
*/
public $soCaName;
/**
* @Property(
* type="integer",
* description="收货人手机"
* )
*
* @var string
*/
public $soCaMobile;
/**
* @Property(
* type="integer",
* description="收货人电话"
* )
*
* @var string
*/
public $soCaPhone;
/**
* @Property(
* type="string",
* description="收货地省份"
* )
*
* @var string
*/
public $soCaProvince;
/**
* @Property(
* type="string",
* description="收货地城市"
* )
*
* @var string
*/
public $soCaCity;
/**
* @Property(
* type="string",
* description="收货地区县"
* )
*
* @var string
*/
public $soCaCounty;
/**
* @Property(
* type="string",
* description="收货地街道"
* )
*
* @var string
*/
public $soCaStreet;
/**
* @Property(
* type="string",
* description="收票人"
* )
*
* @var string
*/
public $soCiaName;
/**
* @Property(
* type="integer",
* description="收票人手机"
* )
*
* @var string
*/
public $soCiaMobile;
/**
* @Property(
* type="integer",
* description="收票人电话"
* )
*
* @var string
*/
public $soCiaPhone;
/**
* @Property(
* type="string",
* description="收票地省份"
* )
*
* @var string
*/
public $soCiaProvince;
/**
* @Property(
* type="string",
* description="收票地城市"
* )
*
* @var string
*/
public $soCiaCity;
/**
* @Property(
* type="string",
* description="收票地区县"
* )
*
* @var string
*/
public $soCiaCounty;
/**
* @Property(
* type="string",
* description="收票地街道"
* )
*
* @var string
*/
public $soCiaStreet;
/**
* @Property(
* type="integer",
* description="开票方式"
* )
*
* @var string
*/
public $soCiMethod;
/**
* @Property(
* type="integer",
* description="开票类型"
* )
*
* @var string
*/
public $soCiType;
/**
* @Property(
* type="string",
* description="开票抬头"
* )
*
* @var string
*/
public $soCiTitle;
/**
* @Property(
* type="string",
* description="开户行"
* )
*
* @var string
*/
public $soCiBank;
/**
* @Property(
* type="string",
* description="开户行账号"
* )
*
* @var string
*/
public $soCiBknum;
/**
* @Property(
* type="string",
* description="注册地"
* )
*
* @var string
*/
public $soCiAddr;
/**
* @Property(
* type="integer",
* description="注册电话"
* )
*
* @var string
*/
public $soCiPhone;
/**
* @Property(
* type="string",
* description="纳税人识别号"
* )
*
* @var string
*/
public $soCiVatno;
/**
* @Property(
* type="string",
* description="订单备注"
* )
*
* @var string
*/
public $soNote;
/** /**
* @Property( * @Property(
* type="integer", * type="integer",
......
...@@ -55,7 +55,7 @@ class OrdersListTransformer extends TransformerAbstract ...@@ -55,7 +55,7 @@ class OrdersListTransformer extends TransformerAbstract
$temp['so_ci_phone'] = $order->so_ci_phone; $temp['so_ci_phone'] = $order->so_ci_phone;
$temp['so_ci_vatno'] = $order->so_ci_vatno; $temp['so_ci_vatno'] = $order->so_ci_vatno;
$temp['so_note'] = $order->so_note; $temp['so_note'] = $order->so_note;
$temp['so_ctime'] = $order->so_ctime; $temp['so_ctime'] = date('Y-m-d H:i:s',$order->so_ctime);
array_push($orderTransReturn,$temp); array_push($orderTransReturn,$temp);
} }
} }
......
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
namespace App\Services\Api; namespace App\Services\Api;
use App\Repositories\Eloquent\RhawnSordersRepositoryEloquent; use App\Repositories\Eloquent\RhawnSordersRepositoryEloquent;
use App\Repositories\Transformers\Rhawn\OrderDetailTransformer;
use App\Repositories\Transformers\Rhawn\OrdersDispatchTransformer; use App\Repositories\Transformers\Rhawn\OrdersDispatchTransformer;
use App\Rhawn\Repositories\Eloquent\RhawnCustomerRepositoryEloquent; use App\Rhawn\Repositories\Eloquent\RhawnCustomerRepositoryEloquent;
use App\Rhawn\Services\RhawnCustomerService; use App\Rhawn\Services\RhawnCustomerService;
...@@ -72,7 +73,8 @@ class RhawnOrdersService ...@@ -72,7 +73,8 @@ class RhawnOrdersService
if(!$order){ if(!$order){
throw new \Exception('订单编号不存在',500); throw new \Exception('订单编号不存在',500);
} }
return $this->rhawnOrdersService->getCustomerOrderItemsByOrderId($customer['cus_id'],$order['so_id']); $orderDetail = $this->rhawnOrdersService->getCustomerOrderItemsByOrderId($customer['cus_id'],$order['so_id']);
return app(OrderDetailTransformer::class)->transform($orderDetail);
}catch(\Throwable $exception){ }catch(\Throwable $exception){
SimpleLogs::writeLog($exception->getMessage(),__CLASS__.':getCustomerOrderDetail','error'); SimpleLogs::writeLog($exception->getMessage(),__CLASS__.':getCustomerOrderDetail','error');
...@@ -102,6 +104,8 @@ class RhawnOrdersService ...@@ -102,6 +104,8 @@ class RhawnOrdersService
$orderItems['weight'],$requestParams['so_ca_province'],$orderItems['total'],$customer['cus_free_express'],$customer['cus_level'] $orderItems['weight'],$requestParams['so_ca_province'],$orderItems['total'],$customer['cus_free_express'],$customer['cus_level']
); );
//判断是偶发
$data = []; $data = [];
$data['sorders']['cus_id'] = $customer['cus_id']; $data['sorders']['cus_id'] = $customer['cus_id'];
$data['sorders']['so_cus_po'] = $requestParams['so_cus_po']; $data['sorders']['so_cus_po'] = $requestParams['so_cus_po'];
...@@ -177,7 +181,8 @@ class RhawnOrdersService ...@@ -177,7 +181,8 @@ class RhawnOrdersService
$orderId = $this->rhawnOrdersService->createOrders($data); $orderId = $this->rhawnOrdersService->createOrders($data);
if($orderId){ if($orderId){
return $this->rhawnOrdersService->getCustomerOrderItemsByOrderId($customer['cus_id'],$orderId); $orderDetail = $this->rhawnOrdersService->getCustomerOrderItemsByOrderId($customer['cus_id'],$orderId);
return app(OrderDetailTransformer::class)->transform($orderDetail);
} }
return null; return null;
}catch(\Throwable $exception){ }catch(\Throwable $exception){
......
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