切换导航条
此项目
正在载入...
登录
anyv
/
xkeasy
·
提交
转到一个项目
GitLab
转到仪表盘
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
邮件补丁
差异文件
浏览文件
作者
anyv
6 years ago
提交
6d752fd80a7aef53301a58c5f0f515cb5627b67f
1 个父辈
abb465d5
1 个管道 的构建
通过
耗费 0 秒
6
变更
3
构建
1
隐藏空白字符变更
内嵌
并排对比
正在显示
3 个修改的文件
包含
33 行增加
和
1 行删除
app/admin/controller/SalesmanController.php
app/admin/controller/StatisticalController.php
public/themes/admin_simpleboot3/admin/statistical/financial_list.html
app/admin/controller/SalesmanController.php
查看文件 @
6d752fd
...
...
@@ -392,8 +392,25 @@ class SalesmanController extends AdminBaseController{
public
function
set_free_man
(){
$id
=
$_POST
[
'id'
];
//删除老师购物车 浏览记录 收藏 订单待付款信息
$teacher
=
Db
::
name
(
'my_user'
)
->
where
(
'id'
,
$id
)
->
find
();
Db
::
name
(
'shopping_cart'
)
->
where
(
'uid'
,
$teacher
[
'uid'
])
->
delete
();
Db
::
name
(
'browsing_history'
)
->
where
(
'uid'
,
$teacher
[
'uid'
])
->
delete
();
Db
::
name
(
'collect'
)
->
where
(
'uid'
,
$teacher
[
'uid'
])
->
delete
();
Db
::
name
(
'indent'
)
->
where
(
"uid="
.
$teacher
[
'uid'
]
.
" and state=4"
)
->
delete
();
//获取这个老师下的所有学生信息
$student
=
Db
::
name
(
'my_user'
)
->
where
(
'pid'
,
$id
)
->
select
();
//循环删除学生的购物车 浏览记录 收藏 订单待付款信息
foreach
(
$student
as
$key
=>
$val
){
Db
::
name
(
'shopping_cart'
)
->
where
(
'uid'
,
$val
[
'uid'
])
->
delete
();
Db
::
name
(
'browsing_history'
)
->
where
(
'uid'
,
$val
[
'uid'
])
->
delete
();
Db
::
name
(
'collect'
)
->
where
(
'uid'
,
$val
[
'uid'
])
->
delete
();
Db
::
name
(
'indent'
)
->
where
(
"uid="
.
$val
[
'uid'
]
.
" and state=4"
)
->
delete
();
}
//改变老师的身份状态
$data
=
Db
::
name
(
'my_user'
)
->
where
(
'id'
,
$id
)
->
update
([
'status'
=>
0
,
'pid'
=>
0
,
'is_pro'
=>
0
,
'bind_status'
=>
0
,
'is_withdrawal'
=>
1
]);
$student
=
Db
::
name
(
'my_user'
)
->
where
(
'pid'
,
$id
)
->
update
([
'status'
=>
0
,
'pid'
=>
0
,
'bind_status'
=>
0
]);
//改变学生的身份状态
Db
::
name
(
'my_user'
)
->
where
(
'pid'
,
$id
)
->
update
([
'status'
=>
0
,
'pid'
=>
0
,
'bind_status'
=>
0
]);
if
(
$data
){
return
true
;
}
else
{
...
...
app/admin/controller/StatisticalController.php
查看文件 @
6d752fd
...
...
@@ -18,11 +18,15 @@ class StatisticalController extends AdminBaseController{
$where2
=
[
'indent_type'
=>
2
];
$where3
=
[
'type'
=>
1
];
if
(
!
empty
(
$_POST
[
'start_time'
])
&&
!
empty
(
$_POST
[
'end_time'
])){
$start_time
=
strtotime
(
$_POST
[
'start_time'
]);
$end_time
=
strtotime
(
$_POST
[
'end_time'
]);
$where
[
'create_time'
]
=
[[
'>='
,
$start_time
],[
'<='
,
$end_time
]];
$where2
[
'create_time'
]
=
[[
'>='
,
$start_time
],[
'<='
,
$end_time
]];
$where3
[
'time'
]
=
[[
'>='
,
$start_time
],[
'<='
,
$end_time
]];
}
$platform
=
Db
::
name
(
'indent'
)
->
where
(
$where
)
->
where
(
"state = 2 or state = 3 or state = 5"
)
->
select
();
$platform_money
=
0
;
...
...
@@ -37,6 +41,13 @@ class StatisticalController extends AdminBaseController{
$salesman_money
+=
$val
[
'money'
];
}
$this
->
assign
(
'salesman_money'
,
$salesman_money
);
//显示平台抽成收益
$income
=
Db
::
name
(
'income_money'
)
->
where
(
$where3
)
->
select
();
$income_money
=
0
;
foreach
(
$income
as
$key
=>
$val
){
$income_money
+=
$val
[
'money'
];
}
$this
->
assign
(
'income_money'
,
$income_money
);
return
$this
->
fetch
();
}
...
...
public/themes/admin_simpleboot3/admin/statistical/financial_list.html
查看文件 @
6d752fd
...
...
@@ -32,6 +32,10 @@
<td>
业务员订单
</td>
<td>
{$salesman_money}
</td>
</tr>
<tr>
<td>
平台抽成收益
</td>
<td>
{$income_money}
</td>
</tr>
</tbody>
</table>
</div>
...
...
请
注册
或
登录
后发表评论