Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
eduline
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
冷斌
eduline
Commits
eab98316
Commit
eab98316
authored
May 19, 2020
by
冷斌
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
`试卷`
parent
edc8480f
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
1 deletions
+32
-1
apps/classroom/Lib/Model/ZyRechargeModel.class.php
+30
-1
apps/course/Lib/Action/PayVideoAction.class.php
+2
-0
No files found.
apps/classroom/Lib/Model/ZyRechargeModel.class.php
View file @
eab98316
...
@@ -108,7 +108,36 @@ class ZyRechargeModel extends Model
...
@@ -108,7 +108,36 @@ class ZyRechargeModel extends Model
if
(
$attach
)
{
if
(
$attach
)
{
$data
[
'note_wxpay'
]
=
$attach
;
$data
[
'note_wxpay'
]
=
$attach
;
}
}
//推广奖励
if
(
$recharge
[
'invite_id'
]
>
0
)
{
$count
=
M
(
'zy_recharge'
)
->
where
(
array
(
'invite_id'
=>
$recharge
[
'invite_id'
]))
->
count
();
$num
=
$count
-
1
;
$level
=
[
0
=>
0.1
,
50
=>
0.2
,
180
=>
0.3
];
$r
=
0
;
foreach
(
$level
as
$time
=>
$rate
)
{
if
(
$num
>=
$time
)
{
$r
=
$rate
;
}
}
$money
=
$recharge
[
'money'
]
*
$r
;
$zy_split_balance
=
M
(
'zy_split_balance'
)
->
where
(
array
(
'uid'
=>
$recharge
[
'invite_id'
]))
->
find
();
$nn
=
$zy_split_balance
[
'balance'
]
+
$money
;
M
(
'zy_split_balance'
)
->
where
(
array
(
'uid'
=>
$recharge
[
'invite_id'
]))
->
save
([
'balance'
=>
$nn
]);
M
(
'zy_split_balance_flow'
)
->
add
([
'uid'
=>
$recharge
[
'invite_id'
],
'type'
=>
5
,
'num'
=>
$money
,
'balance'
=>
$money
,
'rel_id'
=>
1
,
'rel_type'
=>
'zy_classes_order'
,
'note'
=>
$recharge
[
'note'
],
'ctime'
=>
time
(),
]);
}
//修改购买记录状态
//修改购买记录状态
$rer
=
M
(
'zy_recharge'
)
->
where
(
array
(
'pay_pass_num'
=>
$pay_pass_num
))
->
save
(
$data
);
$rer
=
M
(
'zy_recharge'
)
->
where
(
array
(
'pay_pass_num'
=>
$pay_pass_num
))
->
save
(
$data
);
if
(
$rer
)
{
if
(
$rer
)
{
...
...
apps/course/Lib/Action/PayVideoAction.class.php
View file @
eab98316
...
@@ -1744,6 +1744,7 @@ class PayVideoAction extends CommonAction
...
@@ -1744,6 +1744,7 @@ class PayVideoAction extends CommonAction
//使用后台提示模版
//使用后台提示模版
$this
->
assign
(
'isAdmin'
,
1
);
$this
->
assign
(
'isAdmin'
,
1
);
$check_type
=
t
(
$_POST
[
'check_type'
]);
$check_type
=
t
(
$_POST
[
'check_type'
]);
$invite_id
=
t
(
$_POST
[
'invite_id'
])
?:
0
;
//必须要先登录才能进行操作
//必须要先登录才能进行操作
$this
->
mid
=
$this
->
mid
?:
intval
(
$_POST
[
'mid'
]);
$this
->
mid
=
$this
->
mid
?:
intval
(
$_POST
[
'mid'
]);
...
@@ -1911,6 +1912,7 @@ class PayVideoAction extends CommonAction
...
@@ -1911,6 +1912,7 @@ class PayVideoAction extends CommonAction
'note'
=>
"
{
$this
->
site
[
'site_keyword'
]
}
在线教育-购买
{
$title
}
"
,
'note'
=>
"
{
$this
->
site
[
'site_keyword'
]
}
在线教育-购买
{
$title
}
"
,
'pay_type'
=>
$_POST
[
'pay'
],
'pay_type'
=>
$_POST
[
'pay'
],
'pay_pass_num'
=>
$pay_pass_num
,
'pay_pass_num'
=>
$pay_pass_num
,
'invite_id'
=>
$invite_id
,
));
));
if
(
!
$id
)
{
if
(
!
$id
)
{
...
...
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