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
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
4 deletions
+35
-4
apps/classroom/Lib/Model/ZyRechargeModel.class.php
+30
-1
apps/course/Lib/Action/PayVideoAction.class.php
+5
-3
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
...
@@ -167,7 +167,7 @@ class PayVideoAction extends CommonAction
...
@@ -167,7 +167,7 @@ class PayVideoAction extends CommonAction
$this
->
assign
(
"is_asb"
,
$is_asb
);
$this
->
assign
(
"is_asb"
,
$is_asb
);
$this
->
assign
(
'event_id'
,
jiami
(
$event
[
'event_id'
]));
$this
->
assign
(
'event_id'
,
jiami
(
$event
[
'event_id'
]));
}
else
{
}
else
{
// $is_event为0时显示优惠券:活动不显示优惠券 拼团课单独购买显示优惠券
// $is_event为0时显示优惠券:活动不显示优惠券 拼团课单独购买显示优惠券
$is_event
=
$event
?
(
$event
[
'event_type'
]
==
3
?
0
:
intval
(
$event
[
'event_id'
]))
:
0
;
$is_event
=
$event
?
(
$event
[
'event_type'
]
==
3
?
0
:
intval
(
$event
[
'event_id'
]))
:
0
;
// 砍价成功不显示优惠券
// 砍价成功不显示优惠券
$event
[
'event_type'
]
==
4
&&
$is_event
=
$this
->
bgned
?
1
:
0
;
$event
[
'event_type'
]
==
4
&&
$is_event
=
$this
->
bgned
?
1
:
0
;
...
@@ -547,7 +547,7 @@ class PayVideoAction extends CommonAction
...
@@ -547,7 +547,7 @@ class PayVideoAction extends CommonAction
// 定义video_type_arr数组
// 定义video_type_arr数组
$video_type_arr
=
[
'zy_video'
=>
1
,
'zy_live'
=>
2
,
'zy_album'
=>
3
,
'zy_classes'
=>
6
];
$video_type_arr
=
[
'zy_video'
=>
1
,
'zy_live'
=>
2
,
'zy_album'
=>
3
,
'zy_classes'
=>
6
];
// 检测课程是否有活动 $is_event为0时显示优惠券:活动不显示优惠券 拼团课单独购买显示优惠券
// 检测课程是否有活动 $is_event为0时显示优惠券:活动不显示优惠券 拼团课单独购买显示优惠券
$is_event
=
0
;
$is_event
=
0
;
if
(
$type
=
$video_type_arr
[
$type
])
{
if
(
$type
=
$video_type_arr
[
$type
])
{
// 活动不显示优惠券
// 活动不显示优惠券
...
@@ -583,7 +583,7 @@ class PayVideoAction extends CommonAction
...
@@ -583,7 +583,7 @@ class PayVideoAction extends CommonAction
}
}
//订单类型
//订单类型
$data
[
'vtype'
]
=
$c_data
[
0
];
$data
[
'vtype'
]
=
$c_data
[
0
];
$vc_map
=
array
(
'uid'
=>
$this
->
mid
,
'type'
=>
1
,
'sid'
=>
$agent_id
?:
$mhm_id
,
'coupon_type'
=>
0
,
'etime'
=>
1
,
'maxprice'
=>
$moner_data
[
'price'
]);
$vc_map
=
array
(
'uid'
=>
$this
->
mid
,
'type'
=>
1
,
'sid'
=>
$agent_id
?:
$mhm_id
,
'coupon_type'
=>
0
,
'etime'
=>
1
,
'maxprice'
=>
$moner_data
[
'price'
]);
$videoCoupon
=
D
(
'Coupon'
,
'classroom'
)
->
getUserCouponList
(
$vc_map
,
0
);
$videoCoupon
=
D
(
'Coupon'
,
'classroom'
)
->
getUserCouponList
(
$vc_map
,
0
);
foreach
(
$videoCoupon
[
'data'
]
as
$key
=>
&
$val
)
{
foreach
(
$videoCoupon
[
'data'
]
as
$key
=>
&
$val
)
{
...
@@ -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