Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
introducer
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sugar
introducer
Commits
5b455863
Commit
5b455863
authored
Jun 08, 2023
by
sugar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
引充者商城
parent
d4303c1a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
16 deletions
+19
-16
application/api/model/PaymentLogModel.php
application/api/model/PaymentLogModel.php
+19
-16
No files found.
application/api/model/PaymentLogModel.php
View file @
5b455863
...
...
@@ -136,14 +136,15 @@ class PaymentLogModel extends Model
Users
::
addShoppingmoney
(
$pay_log
[
'user_id'
],
$pay_log
[
'need_pay'
],
9
,
$intro
,
$pay_log
[
'id'
],
$pay_log
[
'order_id'
],
$before
,
$after
);
//赠送购物金
$goodsinfo
=
Goods
::
where
([
'activity_list'
=>
1
])
->
find
();
//找出充值大礼包商品
//生成大礼包商品订单
$goods_data
=
[
'order_sn'
=>
getOrdersn
(
'goods'
),
'user_id'
=>
$pay_log
[
'user_id'
],
'goods_id'
=>
$goodsinfo
[
'goods_id'
],
'activity_list'
=>
1
,
'phone'
=>
$userinfo
[
'mobile'
],
'consignee'
=>
$pay_log
[
'user_id'
],
if
(
$goodsinfo
){
//生成大礼包商品订单
$goods_data
=
[
'order_sn'
=>
getOrdersn
(
'goods'
),
'user_id'
=>
$pay_log
[
'user_id'
],
'goods_id'
=>
$goodsinfo
[
'goods_id'
],
'activity_list'
=>
1
,
'phone'
=>
$userinfo
[
'mobile'
],
'consignee'
=>
$pay_log
[
'user_id'
],
// 'province_name' =>$pay_log['user_id'],
// 'city_name' =>$pay_log['user_id'],
// 'area_name' =>$pay_log['user_id'],
...
...
@@ -151,14 +152,16 @@ class PaymentLogModel extends Model
// 'province_id' =>$pay_log['user_id'],
// 'city_id' =>$pay_log['user_id'],
// 'area_id' =>$pay_log['user_id'],
'status'
=>
2
,
'total_amount'
=>
$pay_log
[
'need_pay'
],
'pay_fee'
=>
$pay_log
[
'need_pay'
],
'paytime'
=>
$pay_log
[
'createtime'
],
'verification_code'
=>
rand
(
100000
,
999999
),
'createtime'
=>
time
(),
];
Goodsorder
::
create
(
$goods_data
);
'status'
=>
2
,
'total_amount'
=>
$pay_log
[
'need_pay'
],
'pay_fee'
=>
$pay_log
[
'need_pay'
],
'paytime'
=>
$pay_log
[
'createtime'
],
'verification_code'
=>
rand
(
100000
,
999999
),
'createtime'
=>
time
(),
];
Goodsorder
::
create
(
$goods_data
);
}
//执行分佣
Commission
::
divideCommission
(
$pay_log
[
'order_sn'
]);
Db
::
commit
();
...
...
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