Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tl_estate
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hujun
tl_estate
Commits
b1fcb524
Commit
b1fcb524
authored
Oct 10, 2018
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
微聊分部门
parent
e8d54cc1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
1 deletion
+38
-1
OperationData.php
application/index/controller/OperationData.php
+38
-1
No files found.
application/index/controller/OperationData.php
View file @
b1fcb524
...
@@ -38,7 +38,7 @@ class OperationData extends Basic
...
@@ -38,7 +38,7 @@ class OperationData extends Basic
* 发起微聊用户数
* 发起微聊用户数
* @return \think\Response
* @return \think\Response
*/
*/
public
function
chatUserNum
()
public
function
chatUserNum
_old
()
{
{
$params
=
$this
->
params
;
$params
=
$this
->
params
;
$where
[
'create_time'
]
=
[
'between'
,
[
$params
[
'create_time_start'
]
.
' 00:00:00'
,
$params
[
'create_time_end'
]
.
' 23:59:59'
]
];
$where
[
'create_time'
]
=
[
'between'
,
[
$params
[
'create_time_start'
]
.
' 00:00:00'
,
$params
[
'create_time_end'
]
.
' 23:59:59'
]
];
...
@@ -54,6 +54,43 @@ class OperationData extends Basic
...
@@ -54,6 +54,43 @@ class OperationData extends Basic
return
$this
->
response
(
200
,
'success'
,
$result
);
return
$this
->
response
(
200
,
'success'
,
$result
);
}
}
public
function
chatUserNum
()
{
$params
=
$this
->
params
;
$where
[
'create_time'
]
=
[
'between'
,
[
$params
[
'create_time_start'
]
.
' 00:00:00'
,
$params
[
'create_time_end'
]
.
' 23:59:59'
]
];
// 先查新所有部门
$district_list
=
$this
->
getDistrict
();
$chatRelationModel
=
new
ChatRelation
();
foreach
(
$district_list
as
$key
=>
$v
)
{
$result_
[
"id"
]
=
$v
[
'id'
];
$result_
[
"district_name"
]
=
$v
[
'district_name'
];
$chat_user_all_num
=
0
;
$chat_user_num
=
0
;
// 商场进场数
$agentIds
=
$this
->
getAgentIDsByDistrictId
(
$v
[
'id'
]);
foreach
(
explode
(
','
,
$agentIds
)
as
$k1
=>
$v1
)
{
// 发起微聊用户数
$where
[
'from_id'
]
=
'user_'
.
$v1
;
$group
=
''
;
$res
=
$chatRelationModel
->
getChatUserNumOperation
(
$where
,
$group
);
$chat_user_all_num
+=
$res
;
$group
=
'from_id'
;
$res
=
$chatRelationModel
->
getChatUserNumOperation
(
$where
,
$group
);
$chat_user_num
+=
$res
;
}
$result_
[
"chat_user_all_num"
]
=
$chat_user_all_num
;
$result_
[
"chat_user_num"
]
=
$chat_user_num
;
$result
[]
=
$result_
;
}
return
$this
->
response
(
200
,
'success'
,
$result
);
}
/**
/**
* 客户来电数
* 客户来电数
* @return \think\Response
* @return \think\Response
...
...
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