切换导航条
此项目
正在载入...
登录
李忠强
/
temporaryfood
·
提交
转到一个项目
GitLab
转到仪表盘
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
邮件补丁
差异文件
浏览文件
作者
何书鹏
3 years ago
提交
49cdb730b9e4e436bb80ef27a9e01bad04f5c4a0
1 个父辈
928946e8
代码优化
隐藏空白字符变更
内嵌
并排对比
正在显示
3 个修改的文件
包含
7 行增加
和
11 行删除
application/api/controller/Order.php
application/api/controller/Rider.php
application/api/job/OrderAutoOper.php
application/api/controller/Order.php
查看文件 @
49cdb73
...
...
@@ -601,7 +601,6 @@ class Order extends Api
$model
=
new
\app\api\model\Order
();
$order
=
$model
::
get
(
$order_id
);
if
(
!
$order
)
$this
->
error
(
'订单不存在'
);
// $third = Third::get(['user_id'=>$this->auth->id]);
$third
=
Third
::
alias
(
'a'
)
->
join
(
'user b'
,
'b.id = a.user_id'
)
->
where
(
'a.user_id'
,
$order
[
'user_id'
])
...
...
@@ -629,16 +628,14 @@ class Order extends Api
'type'
=>
'wechat'
,
'orderid'
=>
$order
[
'order_no'
],
'title'
=>
'订单号-'
.
$order
[
'order_no'
],
// 'amount' => $order['pay_price'],
'amount'
=>
0.01
,
'amount'
=>
$order
[
'pay_price'
],
// 'amount' => 0.01,
'method'
=>
'miniapp'
,
'openid'
=>
$openid
,
'notifyurl'
=>
$this
->
request
->
domain
()
.
'/api/notify/orderNotify/type/wechat'
,
'returnurl'
=>
''
,
];
$result
=
Service
::
submitOrder
(
$params
);
// $order->pay_user_id = $this->auth->id;
// $order->isUpdate()->save();
$this
->
success
(
'支付信息'
,
$result
);
}
...
...
@@ -759,10 +756,10 @@ class Order extends Api
$wechat
=
Pay
::
wechat
(
$config
);
$refund_no
=
'LQ-'
.
time
()
.
mt_rand
(
10000
,
99999
);
$param
=
[
// 'total_fee' => $order['pay_price'],
// 'refund_fee' => $order['pay_price'],
'total_fee'
=>
1
,
'refund_fee'
=>
1
,
'total_fee'
=>
$order
[
'pay_price'
],
'refund_fee'
=>
$order
[
'pay_price'
],
// 'total_fee' => 1,
// 'refund_fee' => 1,
'out_trade_no'
=>
$order
[
'order_no'
],
'out_refund_no'
=>
$refund_no
];
...
...
application/api/controller/Rider.php
查看文件 @
49cdb73
...
...
@@ -366,7 +366,6 @@ class Rider extends Api
Db
::
startTrans
();
try
{
// $money = 0.01;
$order_sn
=
date
(
'Ymd'
)
.
substr
(
implode
(
NULL
,
array_map
(
'ord'
,
str_split
(
substr
(
uniqid
(),
7
,
13
),
1
))),
0
,
8
);
$withdraw
=
Withdraw
::
create
([
'user_id'
=>
$user
[
'id'
],
...
...
application/api/job/OrderAutoOper.php
查看文件 @
49cdb73
...
...
@@ -6,7 +6,7 @@ use think\queue\Job;
/**
*
发送优惠券
自动操作
*
订单
自动操作
*/
class
OrderAutoOper
extends
BaseJob
{
...
...
请
注册
或
登录
后发表评论