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
bc37e310
authored
Nov 22, 2022
by
SUDPTDUBLXEROFX\Administrator
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
订单生成
parent
0c87a96b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
app/Http/Services/OrderService.php
app/Http/Services/OrderService.php
View file @
bc37e310
...
@@ -260,6 +260,7 @@ class OrderService
...
@@ -260,6 +260,7 @@ class OrderService
if
(
!
$res
){
if
(
!
$res
){
return
false
;
return
false
;
}
}
$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
(
"order_address_type"
,
1
)
->
whereIn
(
"order_id"
,
array_column
(
$result
,
"order_id"
))
->
get
()
->
keyBy
(
"order_id"
)
->
toArray
();
//地址信息
...
@@ -300,7 +301,16 @@ class OrderService
...
@@ -300,7 +301,16 @@ class OrderService
];
];
}
}
#统计当前用户各个状态数量
$orderCount
=
OrderModel
::
select
(
DB
::
raw
(
'count(*) as num, status'
))
->
where
(
"user_id"
,
$user_id
)
->
groupBy
(
'status'
)
->
get
()
->
keyby
(
"status"
)
->
toArray
();
return
[
return
[
"order_count"
=>
$orderCount
,
"bank_info"
=>
self
::
$bank_info
,
"bank_info"
=>
self
::
$bank_info
,
"total"
=>
$res
[
"total"
],
//返回总条数
"total"
=>
$res
[
"total"
],
//返回总条数
"page"
=>
$res
[
"current_page"
],
//第几页
"page"
=>
$res
[
"current_page"
],
//第几页
...
...
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