Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
semour
/
semour_web
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
31a96d68
authored
Dec 02, 2022
by
SUDPTDUBLXEROFX\Administrator
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
订单列表
parent
9b0887a5
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
6 deletions
app/Http/Services/OrderService.php
app/Models/OrderAddressModel.php
app/Http/Services/OrderService.php
View file @
31a96d68
...
@@ -287,13 +287,14 @@ class OrderService
...
@@ -287,13 +287,14 @@ class OrderService
$result
=
$res
[
"data"
];
$result
=
$res
[
"data"
];
$orderAddressArr
=
OrderAddressModel
::
where
(
"order_address_type"
,
1
)
->
whereIn
(
"order_id"
,
array_column
(
$result
,
"order_id"
))
->
get
()
->
keyBy
(
"order_id
"
)
->
toArray
();
//地址信息
$orderAddressArr
=
OrderAddressModel
::
where
In
(
"order_id"
,
array_column
(
$result
,
"order_id"
))
->
get
()
->
keyBy
(
"order_address_type
"
)
->
toArray
();
//地址信息
$temp
=
[];
$temp
=
[];
foreach
(
$result
as
$k
=>
$v
){
foreach
(
$result
as
$k
=>
$v
){
$order_id
=
$v
[
"order_id"
];
$order_id
=
$v
[
"order_id"
];
$items
=
OrderItemsModel
::
where
(
"order_id"
,
$order_id
)
->
get
()
->
toArray
();
$items
=
OrderItemsModel
::
where
(
"order_id"
,
$order_id
)
->
get
()
->
toArray
();
$orderAddress
=
\Arr
::
get
(
$orderAddressArr
,
$order_id
,[]);
$receiveAddress
=
\Arr
::
get
(
$orderAddressArr
,
OrderAddressModel
::
order_address_type_receive
,[]);
$piaoAddress
=
\Arr
::
get
(
$orderAddressArr
,
OrderAddressModel
::
order_address_type_piao
,[]);
$merchandise_total
=
0
;
//商品总额
$merchandise_total
=
0
;
//商品总额
foreach
(
$items
as
$a
=>
$b
){
foreach
(
$items
as
$a
=>
$b
){
...
@@ -317,10 +318,10 @@ class OrderService
...
@@ -317,10 +318,10 @@ class OrderService
"goods_name_arr"
=>
array_column
(
$items
,
"goods_name"
),
"goods_name_arr"
=>
array_column
(
$items
,
"goods_name"
),
"status"
=>
$v
[
"status"
],
"status"
=>
$v
[
"status"
],
"status_en"
=>
\Arr
::
get
(
OrderModel
::
$status
,
$v
[
"status"
],
""
),
"status_en"
=>
\Arr
::
get
(
OrderModel
::
$status
,
$v
[
"status"
],
""
),
"receiver"
=>
\Arr
::
get
(
$
order
Address
,
"consignee"
),
"receiver"
=>
\Arr
::
get
(
$
receive
Address
,
"consignee"
),
"email"
=>
\Arr
::
get
(
$
order
Address
,
"email"
),
"email"
=>
\Arr
::
get
(
$
receive
Address
,
"email"
),
"phone"
=>
\Arr
::
get
(
$
order
Address
,
"phone"
),
"phone"
=>
\Arr
::
get
(
$
receive
Address
,
"phone"
),
"shipping_address"
=>
\Arr
::
get
(
$
order
Address
,
"detail_address"
),
"shipping_address"
=>
\Arr
::
get
(
$
receive
Address
,
"detail_address"
),
"shipping"
=>
\Arr
::
get
(
$priceArr
,
3
,
0
),
//运费
"shipping"
=>
\Arr
::
get
(
$priceArr
,
3
,
0
),
//运费
"payment_surcharge_paypal"
=>
$payment_surcharge_paypal
,
//paypal 支付手续费
"payment_surcharge_paypal"
=>
$payment_surcharge_paypal
,
//paypal 支付手续费
"payment_surcharge_ttl"
=>
35
,
//ttl 支付手续费
"payment_surcharge_ttl"
=>
35
,
//ttl 支付手续费
...
...
app/Models/OrderAddressModel.php
View file @
31a96d68
...
@@ -10,6 +10,10 @@ class OrderAddressModel extends Model
...
@@ -10,6 +10,10 @@ class OrderAddressModel extends Model
protected
$primaryKey
=
'order_address_id'
;
protected
$primaryKey
=
'order_address_id'
;
public
$timestamps
=
false
;
public
$timestamps
=
false
;
// `order_address_type` '1收货信息 2账单邮寄信息',
const
order_address_type_receive
=
1
;
const
order_address_type_piao
=
2
;
//获取订单地址详情
//获取订单地址详情
public
static
function
getOrderAddressInfo
(
$where
)
public
static
function
getOrderAddressInfo
(
$where
)
{
{
...
...
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