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
9f44a6b8
Commit
9f44a6b8
authored
Jan 22, 2019
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
号码占完,优化
parent
54a2155c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
10 deletions
+20
-10
CallPhoneService.php
application/api_broker/service/CallPhoneService.php
+20
-10
No files found.
application/api_broker/service/CallPhoneService.php
View file @
9f44a6b8
...
@@ -410,18 +410,28 @@ class CallPhoneService
...
@@ -410,18 +410,28 @@ class CallPhoneService
$where
[
'a.status'
]
=
1
;
$where
[
'a.status'
]
=
1
;
$where
[
'a.phone_a'
]
=
$this
->
phone_a
;
$where
[
'a.phone_a'
]
=
$this
->
phone_a
;
$where
[
'a.type'
]
=
$this
->
is_privacy
;
$where
[
'a.type'
]
=
$this
->
is_privacy
;
$agent_call
=
$this
->
m_bind
->
getPhoneX
(
'a.id,a.phone_a,a.phone_b,b.phone_x'
,
$where
,
'a.id ASC'
);
$agent_call
=
$this
->
m_bind
->
getBindingPhoneListLimit
(
1
,
100
,
'a.id,a.phone_a,a.phone_b,b.phone_x'
,
$where
);
$result_unbind
=
$this
->
agentsUnBindRedis
(
$agent_call
[
'phone_a'
],
$agent_call
[
'phone_b'
],
$agent_call
[
'phone_x'
]);
$data
[
'msg'
]
=
'号码使用完,请联系运营人员。'
;
$data
[
'msg'
]
=
'号码使用完,请联系运营人员。'
;
if
(
$result_unbind
[
'status'
]
==
'successful'
)
{
$result
=
PlsDemo
::
bindAxb
(
$this
->
phone_a
,
$this
->
phone_b
,
$this
->
expiry_date
,
$this
->
record
,
''
,
$this
->
city
);
$data
[
'status'
]
=
'success'
;
$data
[
'msg'
]
=
'绑定成功。'
;
$data
[
'phone'
]
=
$result
->
SecretBindDTO
->
SecretNo
;
$this
->
subs_id
=
$result
->
SecretBindDTO
->
SubsId
;
$this
->
request_id
=
$result
->
RequestId
;
$this
->
m_bind
->
unBindTable
(
$agent_call
[
'id'
]);
$is_bind
=
0
;
//处理经纪人全部点有意向,占用完号码的情况,释放100组号码
foreach
(
$agent_call
[
'data'
]
as
$k
=>
$v
)
{
$result_unbind
=
$this
->
agentsUnBindRedis
(
$v
[
'phone_a'
],
$v
[
'phone_b'
],
$v
[
'phone_x'
]);
//释放成功一次
if
(
$result_unbind
[
'status'
]
==
'successful'
)
{
$is_bind
=
1
;
$this
->
m_bind
->
unBindTable
(
$v
[
'id'
]);
}
}
if
(
$is_bind
)
{
$result
=
PlsDemo
::
bindAxb
(
$this
->
phone_a
,
$this
->
phone_b
,
$this
->
expiry_date
,
$this
->
record
,
''
,
$this
->
city
);
if
(
$result
->
Code
==
'OK'
)
{
$data
[
'status'
]
=
'success'
;
$data
[
'msg'
]
=
'绑定成功。'
;
$data
[
'phone'
]
=
$result
->
SecretBindDTO
->
SecretNo
;
$this
->
subs_id
=
$result
->
SecretBindDTO
->
SubsId
;
$this
->
request_id
=
$result
->
RequestId
;
}
}
}
}
else
{
}
else
{
$data
[
'msg'
]
=
'拨号失败,15秒再试,再无法拨号请联系请联系运营人员!'
;
$data
[
'msg'
]
=
'拨号失败,15秒再试,再无法拨号请联系请联系运营人员!'
;
...
...
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