Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
朱继来
/
后台订单管理
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
d6429427
authored
Mar 07, 2019
by
朱继来
Browse files
Options
_('Browse Files')
Download
Plain Diff
Merge branch 'master' into development
parents
5974e414
736dccab
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
23 deletions
app/Http/Controllers/OrderController.php
app/Http/Controllers/OrderController.php
View file @
d6429427
...
...
@@ -24,11 +24,9 @@ function getCoupon($order_id)
->
where
([
'order_id'
=>
$order_id
,
'price_type'
=>
-
4
])
->
first
();
if
(
$price
)
{
return
$price
->
price
;
}
if
(
!
$price
)
return
null
;
return
null
;
return
$price
->
price
;
}
// 获取会员账号
...
...
@@ -53,15 +51,13 @@ function getPayName($order_id)
->
select
(
'pay_name'
)
->
get
();
if
(
!
empty
(
$payLog
))
{
if
(
!
$payLog
)
return
false
;
foreach
(
$payLog
as
$v
)
{
$payName
[]
=
$v
->
pay_name
;
}
return
implode
(
','
,
$payName
);
}
return
false
;
}
function
getShipping
(
$order_id
,
$shipping_type
=
1
)
...
...
@@ -73,11 +69,9 @@ function getShipping($order_id, $shipping_type=1)
->
orderBy
(
'order_shipping_id'
)
->
get
();
if
(
!
empty
(
$shipping
))
{
return
$shipping
;
}
if
(
!
$shipping
)
return
false
;
return
false
;
return
$shipping
;
}
function
getInvoiceStatus
(
$order_id
)
...
...
@@ -88,11 +82,9 @@ function getInvoiceStatus($order_id)
->
select
(
'invoice_status'
)
->
first
();
if
(
!
empty
(
$invoice
))
{
return
$invoice
->
invoice_status
;
}
if
(
!
$invoice
)
return
false
;
return
false
;
return
$invoice
->
invoice_status
;
}
function
getCompanyName
(
$user_id
)
...
...
@@ -103,16 +95,16 @@ function getCompanyName($user_id)
->
select
(
'com_name'
)
->
first
();
if
(
!
empty
(
$company
))
{
return
$company
->
com_name
;
}
if
(
!
$company
)
return
false
;
return
fals
e
;
return
$company
->
com_nam
e
;
}
// 获取操作人名称
function
getOperatorName
(
$uid
,
$type
)
{
$name
=
''
;
if
(
$type
==
1
)
{
$user
=
DB
::
connection
(
'order'
)
->
table
(
'lie_user_main'
)
->
where
(
'user_id'
,
$uid
)
->
select
(
'user_name'
)
->
first
();
...
...
@@ -139,7 +131,7 @@ function getSalesName($sale_id)
$user
=
DB
::
table
(
'user_info'
)
->
where
(
'userId'
,
$sale_id
)
->
select
(
'name'
)
->
first
();
return
isset
(
$user
->
name
)
?
$user
->
name
:
''
;
return
isset
(
$user
)
?
$user
->
name
:
''
;
}
// 判断用户是否为新用户 -- 第一次下单
...
...
@@ -162,7 +154,7 @@ function clientSource($user_id)
$user
=
DB
::
connection
(
'order'
)
->
table
(
'lie_user_main'
)
->
where
(
'user_id'
,
$user_id
)
->
select
(
'client_source'
)
->
first
();
return
$user
->
client_source
;
return
$user
?
$user
->
client_source
:
''
;
}
// 获取自营商品型号
...
...
@@ -170,7 +162,7 @@ function getGoodsName($goods_id)
{
$goods_info
=
json_decode
(
Redis
::
hget
(
'Self_SelfGoods'
,
$goods_id
),
true
);
return
$goods_info
[
'goods_name'
]
;
return
$goods_info
?
$goods_info
[
'goods_name'
]
:
''
;
}
// 获取订单来源
...
...
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