切换导航条
此项目
正在载入...
登录
anyv
/
xkeasy
·
提交
转到一个项目
GitLab
转到仪表盘
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
邮件补丁
差异文件
浏览文件
作者
anyv
6 years ago
提交
e8a5175acd4ba7b0913bc6e0a9d84f5a8a4a380a
1 个父辈
819290e8
1 个管道 的构建
通过
耗费 0 秒
1
变更
3
构建
1
隐藏空白字符变更
内嵌
并排对比
正在显示
3 个修改的文件
包含
22 行增加
和
6 行删除
app/portal/controller/IndexController.php
app/portal/controller/PayController.php
app/portal/controller/PersonalcenterController.php
app/portal/controller/IndexController.php
查看文件 @
e8a5175
...
...
@@ -70,6 +70,7 @@ class IndexController extends WeChatBaseController
}
}
else
{
$data_id
=
$this
->
request
->
param
();
dump
(
$data_id
);
die
;
//判断跳转链接是否存在数据
if
(
!
empty
(
$data_id
)){
//判断用户是不是老师
...
...
app/portal/controller/PayController.php
查看文件 @
e8a5175
...
...
@@ -223,12 +223,19 @@ class PayController extends HomeBaseController
}
//增加老师余额
Db
::
name
(
'my_user'
)
->
where
(
'uid'
,
$teacher
[
'uid'
])
->
setInc
(
'balance'
,
$money
);
//计算业务员这条订单的收入
$balance_salesman
=
$order
[
'money'
]
-
$order
[
'money'
]
*
$money_ratio
[
'platform_ratio'
]
-
$money
;
//平台抽成收益加入数据库
$as_income_money
[
'money'
]
=
$order
[
'money'
]
*
$money_ratio
[
'platform_ratio'
];
$as_income_money
[
'time'
]
=
time
();
Db
::
name
(
'income_money'
)
->
insert
(
$as_income_money
);
//计算业务员这条订单的收入
if
(
$order
[
'is_courier'
]
==
2
){
//如果是快递订单给业务员添加快递费
$balance_salesman
=
$order
[
'money'
]
-
$order
[
'money'
]
*
$money_ratio
[
'platform_ratio'
]
-
$money
+
$money_ratio
[
'courier'
];
}
else
{
//如果不是业务员订单则不用添加快递费
$balance_salesman
=
$order
[
'money'
]
-
$order
[
'money'
]
*
$money_ratio
[
'platform_ratio'
]
-
$money
;
}
//增加业务员的余额
Db
::
name
(
'my_user'
)
->
where
(
'uid'
,
$order
[
'salesman_uid'
])
->
setInc
(
'balance'
,
$balance_salesman
);
//添加业务员的收入记录
...
...
@@ -259,12 +266,19 @@ class PayController extends HomeBaseController
}
//增加老师余额
Db
::
name
(
'my_user'
)
->
where
(
'uid'
,
$teacher
)
->
setInc
(
'balance'
,
$money
);
//计算业务员这条订单的收入
$balance_salesman
=
$order
[
'money'
]
-
$order
[
'money'
]
*
$money_ratio
[
'platform_ratio'
]
-
$money
;
//平台抽成收益加入数据库
$ass_income_money
[
'money'
]
=
$order
[
'money'
]
*
$money_ratio
[
'platform_ratio'
];
$ass_income_money
[
'time'
]
=
time
();
Db
::
name
(
'income_money'
)
->
insert
(
$ass_income_money
);
//判断是不是快递配送
if
(
$order
[
'is_courier'
]
==
2
){
//计算业务员这条订单的收入
$balance_salesman
=
$order
[
'money'
]
-
$order
[
'money'
]
*
$money_ratio
[
'platform_ratio'
]
-
$money
+
$money_ratio
[
'courier'
];
}
else
{
//计算业务员这条订单的收入
$balance_salesman
=
$order
[
'money'
]
-
$order
[
'money'
]
*
$money_ratio
[
'platform_ratio'
]
-
$money
;
}
//增加业务员的余额
Db
::
name
(
'my_user'
)
->
where
(
'uid'
,
$order
[
'salesman_uid'
])
->
setInc
(
'balance'
,
$balance_salesman
);
cache
(
'aa'
,
$balance_salesman
);
...
...
app/portal/controller/PersonalcenterController.php
查看文件 @
e8a5175
...
...
@@ -622,7 +622,7 @@ class PersonalcenterController extends WeChatBaseController{
if
(
count
(
$res
)
!=
0
){
$where
=
[
'a.indent_type'
=>
2
,
'a.salesman_uid'
=>
$uid
'a.salesman_uid'
=>
$uid
,
];
if
(
$res
[
'school'
]
!=
''
){
$where
[
'a.school'
]
=
$res
[
'school'
];
...
...
@@ -667,7 +667,8 @@ class PersonalcenterController extends WeChatBaseController{
}
$this
->
assign
(
'indent_goods'
,
$indent_goods
);
$indent_money
=
Db
::
name
(
'money_income'
)
->
where
(
"uid ="
.
$uid
)
->
select
();
// $indent_money = Db::name('money_income') -> where("uid =".$uid) -> select();
$indent_money
=
$indent_goods
;
}
$total_money
=
0
;
...
...
请
注册
或
登录
后发表评论