切换导航条
此项目
正在载入...
登录
anyv
/
xkeasy
·
提交
转到一个项目
GitLab
转到仪表盘
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
邮件补丁
差异文件
浏览文件
作者
anyv
6 years ago
提交
f5166b2ec938383333d3886ad0ccc7a95c83bfd1
1 个父辈
47a25f22
1 个管道 的构建
通过
耗费 0 秒
5
变更
1
构建
1
隐藏空白字符变更
内嵌
并排对比
正在显示
1 个修改的文件
包含
2 行增加
和
11 行删除
app/portal/controller/PayController.php
app/portal/controller/PayController.php
查看文件 @
f5166b2
...
...
@@ -24,14 +24,7 @@ class PayController extends HomeBaseController
'payment'
=>
config
(
'wechat_config.payment'
),
];
}
public
function
test
(){
dump
(
cache
(
'order'
));
dump
(
cache
(
'uid'
));
dump
(
cache
(
'data_user'
));
dump
(
cache
(
'result'
));
dump
(
cache
(
'result'
));
dump
(
cache
(
'result'
));
}
/**
* 微信支付
...
...
@@ -89,16 +82,13 @@ class PayController extends HomeBaseController
$out_trade_no
=
$notify
->
out_trade_no
;
//查询订单信息
$order
=
Db
::
name
(
'indent'
)
->
where
(
'order_number'
,
$out_trade_no
)
->
find
();
cache
(
'order'
,
$order
);
if
(
$successful
){
$update
[
'state'
]
=
2
;
//更新订单状态为待发货
Db
::
name
(
'indent'
)
->
where
(
'order_number'
,
$out_trade_no
)
->
update
(
$update
);
$uid
=
$order
[
'uid'
];
cache
(
'uid'
,
$uid
);
//查询当前用户身份
$data_user
=
Db
::
name
(
'my_user'
)
->
where
(
'uid'
,
$uid
)
->
find
();
cache
(
'data_user'
,
$data_user
);
if
(
$order
[
'indent_type'
]
==
1
){
//如果是平台商品 学生购买
if
(
$data_user
[
'status'
]
==
4
){
...
...
@@ -123,6 +113,7 @@ class PayController extends HomeBaseController
Db
::
name
(
'money_income'
)
->
insert
(
$data_money_income_salesman
);
}
Db
::
name
(
'my_user'
)
->
where
(
'uid'
,
$salesman
[
'uid'
])
->
setInc
(
'balance'
,
$money_salesman
);
$money_teacher
=
0
;
foreach
(
$data_indent_goods
as
$key
=>
$val
){
$money_teacher
+=
$val
[
'price'
]
*
$val
[
'number'
]
*
$money_ratio
[
'teacher_ratio'
];
...
...
请
注册
或
登录
后发表评论