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
1fc20662
authored
Jul 27, 2019
by
朱继来
Browse files
Options
_('Browse Files')
Download
Plain Diff
fix
parents
c4516540
69bcdc34
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
14 additions
and
8 deletions
app/Http/Controllers/CronController.php
app/Http/Function.php
app/Model/OrderModel.php
app/Model/OrderRefundModel.php
app/Model/PayLogModel.php
app/Http/Controllers/CronController.php
View file @
1fc20662
...
...
@@ -57,9 +57,11 @@ class CronController extends Controller
// 合并用户
$resp
=
$this
->
mergeUser
(
$pay_log_amount
,
$joint_offline_amount
);
$resp
=
$this
->
mergeUser
(
$resp
,
$self_accounts_amount
);
dd
(
$
)
// 保存用户金额数据
if
(
!
empty
(
$resp
))
{
$cur_rate
=
$this
->
getRate
();
foreach
(
$resp
as
$k
=>
$v
)
{
$data
=
[];
...
...
@@ -96,7 +98,8 @@ dd($)
}
}
$data
[
'cur_rate'
]
=
$this
->
getRate
();
$data
[
'cur_rate'
]
=
$cur_rate
;
$data
[
'amount'
]
=
$data
[
'rmb_amount'
]
+
$data
[
'usd_amount'
]
*
$data
[
'cur_rate'
];
$res
=
$UserAmountModel
->
updateOrCreate
([
'user_id'
=>
$k
],
$data
);
...
...
@@ -111,7 +114,7 @@ dd($)
$rank
=
$UserAmountModel
->
getUserAmount
();
$RedisModel
->
set
(
'api_lx_activity_user_rank'
,
json_encode
(
$rank
));
return
$
resp
;
return
$
RedisModel
->
get
(
'api_lx_activity_user_rank'
)
;
}
// 过滤尽调数据、添加币种
...
...
app/Http/Function.php
View file @
1fc20662
...
...
@@ -52,8 +52,8 @@
if
(
!
function_exists
(
'curl_init'
))
exit
(
'Need to open the curl extension'
);
$method
=
strtoupper
(
$method
);
$ci
=
curl_init
();
curl_setopt
(
$ci
,
CURLOPT_CONNECTTIMEOUT
,
1
0
);
curl_setopt
(
$ci
,
CURLOPT_TIMEOUT
,
1
0
);
curl_setopt
(
$ci
,
CURLOPT_CONNECTTIMEOUT
,
3
0
);
curl_setopt
(
$ci
,
CURLOPT_TIMEOUT
,
3
0
);
curl_setopt
(
$ci
,
CURLOPT_RETURNTRANSFER
,
true
);
curl_setopt
(
$ci
,
CURLOPT_SSL_VERIFYPEER
,
false
);
curl_setopt
(
$ci
,
CURLOPT_SSL_VERIFYHOST
,
false
);
...
...
app/Model/OrderModel.php
View file @
1fc20662
...
...
@@ -269,9 +269,9 @@ class OrderModel extends Model
// 标题
if
(
$map
[
'order_goods_type'
]
==
1
)
{
$headerCell
=
[
'订单ID'
,
'订单编号'
,
'会员账号'
,
'收货人'
,
'下单日期'
,
'下单时间'
,
'客户名称'
,
'平台来源'
,
'商品型号'
,
'制造商'
,
'供应商'
,
'数量'
,
'单价'
,
'均摊后单价'
,
'商品小计'
,
'币种'
,
'客服'
,
'商品总额'
,
'运费'
,
'附加费'
,
'优惠券'
,
'订单总额'
,
'付款类型'
,
'订单状态'
,
'发货状态'
,
'收货地址'
,
'发票类型'
,
'发票状态'
,
'发票抬头'
,
'公司注册地址'
,
'公司电话'
,
'adtags来源'
,
'新用户来源'
,
'取消原因'
,
'推送备注'
,
'是否为测试订单'
,
'是否为新订单'
];
$headerCell
=
[
'订单ID'
,
'订单编号'
,
'会员账号'
,
'收货人'
,
'下单日期'
,
'下单时间'
,
'客户名称'
,
'平台来源'
,
'
SKUID'
,
'
商品型号'
,
'制造商'
,
'供应商'
,
'数量'
,
'单价'
,
'均摊后单价'
,
'商品小计'
,
'币种'
,
'客服'
,
'商品总额'
,
'运费'
,
'附加费'
,
'优惠券'
,
'订单总额'
,
'付款类型'
,
'订单状态'
,
'发货状态'
,
'收货地址'
,
'发票类型'
,
'发票状态'
,
'发票抬头'
,
'公司注册地址'
,
'公司电话'
,
'adtags来源'
,
'新用户来源'
,
'取消原因'
,
'推送备注'
,
'是否为测试订单'
,
'是否为新订单'
];
}
else
{
$headerCell
=
[
'订单ID'
,
'订单编号'
,
'会员账号'
,
'收货人'
,
'下单日期'
,
'下单时间'
,
'客户名称'
,
'平台来源'
,
'商品型号'
,
'制造商'
,
'供应商'
,
'数量'
,
'单价'
,
'均摊后单价'
,
'商品小计'
,
'币种'
,
'客服'
,
'商品总额'
,
'运费'
,
'附加费'
,
'优惠券'
,
'订单总额'
,
'付款类型'
,
'订单状态'
,
'发货状态'
,
'收货地址'
,
'发票类型'
,
'发票状态'
,
'发票抬头'
,
'公司注册地址'
,
'公司电话'
,
'adtags来源'
,
'新用户来源'
,
'取消原因'
,
'推送备注'
,
'是否为测试订单'
,
'销售类型'
,
'业务类型'
];
$headerCell
=
[
'订单ID'
,
'订单编号'
,
'会员账号'
,
'收货人'
,
'下单日期'
,
'下单时间'
,
'客户名称'
,
'平台来源'
,
'
SKUID'
,
'
商品型号'
,
'制造商'
,
'供应商'
,
'数量'
,
'单价'
,
'均摊后单价'
,
'商品小计'
,
'币种'
,
'客服'
,
'商品总额'
,
'运费'
,
'附加费'
,
'优惠券'
,
'订单总额'
,
'付款类型'
,
'订单状态'
,
'发货状态'
,
'收货地址'
,
'发票类型'
,
'发票状态'
,
'发票抬头'
,
'公司注册地址'
,
'公司电话'
,
'adtags来源'
,
'新用户来源'
,
'取消原因'
,
'推送备注'
,
'是否为测试订单'
,
'销售类型'
,
'业务类型'
];
}
array_unshift
(
$cellData
,
$headerCell
);
...
...
@@ -345,6 +345,8 @@ class OrderModel extends Model
$tmp
[
$i
][
'com_name'
]
=
!
empty
(
$order
[
$i
][
'tax_title'
])
?
$order
[
$i
][
'tax_title'
]
:
$order
[
$i
][
'com_name'
];
$tmp
[
$i
][
'items_source'
]
=
$this
->
getOrderSource
(
$order
[
$i
][
'order_id'
],
$order
[
$i
][
'order_type'
]);
$tmp
[
$i
][
'goods_id'
]
=
$order
[
$i
][
'goods_id'
];
// 自营商品名称换成商品型号
$tmp
[
$i
][
'goods_name'
]
=
$order
[
$i
][
'order_goods_type'
]
==
1
?
$order
[
$i
][
'goods_name'
]
:
$this
->
getGoodsName
(
$order
[
$i
][
'goods_id'
]);
$tmp
[
$i
][
'brand_name'
]
=
$order
[
$i
][
'brand_name'
];
...
...
app/Model/OrderRefundModel.php
View file @
1fc20662
...
...
@@ -319,7 +319,7 @@ class OrderRefundModel extends Model
public
function
getJointReturnAmount
(
$user_id
,
$start_time
,
$end_time
)
{
return
$this
->
where
(
'user_id'
,
$user_id
)
//
->where('status', 10)
->
where
(
'status'
,
10
)
->
whereBetween
(
'refund_time'
,
[
$start_time
,
$end_time
])
->
select
(
'user_id'
,
'currency'
,
'pay_amount'
,
'price_fall'
)
->
get
()
...
...
app/Model/PayLogModel.php
View file @
1fc20662
...
...
@@ -21,6 +21,7 @@ class PayLogModel extends Model
->
leftJoin
(
'lie_order as o'
,
'p.order_id'
,
'='
,
'o.order_id'
)
->
where
(
'p.is_paid'
,
1
)
->
whereBetween
(
'p.pay_time'
,
[
$start_time
,
$end_time
])
->
where
(
'o.status'
,
'>'
,
2
)
->
where
(
'o.is_type'
,
0
)
->
select
(
$field
)
// ->select('user_id', DB::raw('sum(pay_amount) as pay_amount'))
...
...
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