Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
openApi
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hj
openApi
Commits
6c8e2fcc
Commit
6c8e2fcc
authored
Oct 10, 2022
by
hangjun83
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
openapi 1.1
parent
dc018387
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
238 additions
and
3 deletions
+238
-3
server/app/Http/Controllers/Swagger/Responses/Rhawn/Properties/OrdersProperty.php
...ers/Swagger/Responses/Rhawn/Properties/OrdersProperty.php
+230
-0
server/app/Repositories/Transformers/Rhawn/OrdersListTransformer.php
...Repositories/Transformers/Rhawn/OrdersListTransformer.php
+1
-1
server/app/Services/Api/RhawnOrdersService.php
server/app/Services/Api/RhawnOrdersService.php
+7
-2
No files found.
server/app/Http/Controllers/Swagger/Responses/Rhawn/Properties/OrdersProperty.php
View file @
6c8e2fcc
...
@@ -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",
...
...
server/app/Repositories/Transformers/Rhawn/OrdersListTransformer.php
View file @
6c8e2fcc
...
@@ -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
);
}
}
}
}
...
...
server/app/Services/Api/RhawnOrdersService.php
View file @
6c8e2fcc
...
@@ -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
){
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment