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
f853f845
Commit
f853f845
authored
Jan 10, 2019
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
model
parent
c8dc6f9e
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
24 additions
and
7 deletions
+24
-7
CallPhoneService.php
application/api_broker/service/CallPhoneService.php
+2
-1
CellPhone.php
application/index/controller/CellPhone.php
+6
-1
Label.php
application/index/controller/Label.php
+6
-1
PhoneFollowUpService.php
application/index/service/PhoneFollowUpService.php
+4
-4
UPhoneFollowUpTemporary.php
application/model/UPhoneFollowUpTemporary.php
+6
-0
No files found.
application/api_broker/service/CallPhoneService.php
View file @
f853f845
...
...
@@ -16,6 +16,7 @@ use app\model\AliYunPhone;
use
app\model\BindingPhone
;
use
app\model\SecretReport
;
use
app\model\UPhoneFollowUp
;
use
app\model\UPhoneFollowUpTemporary
;
use
app\model\Users
;
use
think\Log
;
...
...
@@ -562,7 +563,7 @@ class CallPhoneService
if
(
empty
(
$array
[
2
])){
$this
->
redis
->
hDel
(
$user_key
,
$v
);
}
else
{
$m_follow_up
=
new
UPhoneFollowUp
(
$array
[
2
]);
$m_follow_up
=
new
UPhoneFollowUp
Temporary
(
$array
[
2
]);
$num
=
$m_follow_up
->
getFollowTotal
(
$follow_where
);
if
(
empty
(
$num
)
&&
!
empty
(
$array
[
1
]))
{
//$agent_id, $user_id, $content, $type
...
...
application/index/controller/CellPhone.php
View file @
f853f845
...
...
@@ -14,6 +14,7 @@ use app\index\extend\Basic;
use
app\model\AAgents
;
use
app\model\SecretReport
;
use
app\model\UPhoneFollowUp
;
use
app\model\UPhoneFollowUpTemporary
;
use
app\model\Users
;
use
app\model\TAgentTotalCallModel
;
...
...
@@ -93,6 +94,7 @@ class CellPhone extends Basic
$list
=
$report
->
getCallList
(
$pageNo
,
$pageSize
,
'id desc'
,
$field
,
$where
);
$m_user
=
new
Users
();
$m_phone_follow
=
new
UPhoneFollowUp
(
$this
->
siteId
);
$m_phone_follow_temp
=
new
UPhoneFollowUpTemporary
(
$this
->
siteId
);
$m_agent
=
new
AAgents
();
foreach
(
$list
as
$k
=>
$v
)
{
if
(
empty
(
$v
[
'agents_id'
]))
{
...
...
@@ -142,7 +144,10 @@ class CellPhone extends Basic
$where_follow
[
'user_id'
]
=
$v
[
'users_id'
];
$where_follow
[
'type'
]
=
0
;
$where_follow
[
'agent_id'
]
=
$v
[
'agents_id'
];
$result
[
$k
][
'content'
]
=
$m_phone_follow
->
getUserFollowKey
(
'content'
,
$where_follow
,
'id DESC'
);
$result
[
$k
][
'content'
]
=
$m_phone_follow_temp
->
getUserFollowKey
(
'content'
,
$where_follow
,
'id DESC'
);
if
(
empty
(
$result
[
$k
][
'content'
]))
{
$result
[
$k
][
'content'
]
=
$m_phone_follow
->
getUserFollowKey
(
'content'
,
$where_follow
,
'id DESC'
);
}
}
else
{
$result
[
$k
][
'user_nick'
]
=
""
;
$result
[
$k
][
'content'
]
=
""
;
...
...
application/index/controller/Label.php
View file @
f853f845
...
...
@@ -14,6 +14,7 @@ use app\model\FollowUp;
use
app\model\GLabels
;
use
app\model\ULabels
;
use
app\model\UPhoneFollowUp
;
use
app\model\UPhoneFollowUpTemporary
;
use
think\Session
;
class
Label
extends
Basic
...
...
@@ -162,8 +163,12 @@ class Label extends Basic
if
(
empty
(
$this
->
params
[
'user_id'
]))
{
return
$this
->
response
(
101
,
'没有用户信息'
);
}
$follow
=
new
UPhoneFollowUp
(
$this
->
siteId
);
$follow
=
new
UPhoneFollowUp
Temporary
(
$this
->
siteId
);
$user_status
=
$follow
->
getUserFollowKey
(
'user_status'
,
[
'user_id'
=>
$this
->
params
[
'user_id'
]],
'id DESC'
);
if
(
empty
(
$user_status
))
{
$follow
=
new
UPhoneFollowUp
(
$this
->
siteId
);
$user_status
=
$follow
->
getUserFollowKey
(
'user_status'
,
[
'user_id'
=>
$this
->
params
[
'user_id'
]],
'id DESC'
);
}
return
$this
->
response
(
200
,
''
,
$user_status
);
}
...
...
application/index/service/PhoneFollowUpService.php
View file @
f853f845
...
...
@@ -93,14 +93,14 @@ class PhoneFollowUpService
$where
.=
" AND agent_id in {implode(',',
$agent_id
)}"
;
}
}
$date
=
time
();
$start_time
=
strtotime
(
$start_time
);
$end_time
=
strtotime
(
$end_time
);
if
(
$start_time
==
$end_time
&&
$start_time
<
$date
)
{
$data
=
$this
->
phoneFollowUpTemporary
->
getFollowList
V2
(
$page_no
,
$page_size
,
$where
,
$field
);
if
(
$start_time
==
$end_time
)
{
$data
=
$this
->
phoneFollowUpTemporary
->
getFollowList
(
$page_no
,
$page_size
,
$order_
=
'id desc'
,
$field
,
$where
);
}
else
{
$data
=
$this
->
phoneFollowUp
->
getFollowList
(
$page_no
,
$page_size
,
$order_
=
'id desc'
,
$field
,
$where
);
$data
=
$this
->
phoneFollowUp
->
getFollowListV2
(
$page_no
,
$page_size
,
$where
,
$field
);
}
$s_user_service
=
new
UserService
();
...
...
application/model/UPhoneFollowUpTemporary.php
View file @
f853f845
...
...
@@ -162,4 +162,10 @@ class UPhoneFollowUpTemporary extends BaseModel
return
$this
->
UPhoneFollowUp
->
query
(
$sql
);
}
public
function
getUserFollowKey
(
$field
,
$where
,
$order
=
'id asc'
)
{
return
$this
->
UPhoneFollowUp
->
where
(
$where
)
->
order
(
$order
)
->
value
(
$field
);
}
}
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