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
d6de799a
Commit
d6de799a
authored
Nov 08, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
38ad1485
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
8 deletions
+10
-8
CellPhone.php
application/api_broker/controller/CellPhone.php
+1
-1
CallPhoneService.php
application/api_broker/service/CallPhoneService.php
+9
-7
No files found.
application/api_broker/controller/CellPhone.php
View file @
d6de799a
...
@@ -96,7 +96,7 @@ class CellPhone extends Basic
...
@@ -96,7 +96,7 @@ class CellPhone extends Basic
$call
=
new
CallPhoneService
();
$call
=
new
CallPhoneService
();
$result
=
$call
->
agentsUnBindRedis
(
$this
->
params
[
'phone_a'
],
$this
->
params
[
'phone_b'
],
$this
->
params
[
'phone_x'
],
$this
->
params
[
'user_id'
],
$this
->
agentId
);
$result
=
$call
->
agentsUnBindRedis
(
$this
->
params
[
'phone_a'
],
$this
->
params
[
'phone_b'
],
$this
->
params
[
'phone_x'
],
$this
->
params
[
'user_id'
],
$this
->
agentId
);
if
(
$result
[
'status'
]
==
'success'
)
{
if
(
$result
[
'status'
]
==
'success
ful
'
)
{
$this
->
msg
=
$result
[
'msg'
];
$this
->
msg
=
$result
[
'msg'
];
$this
->
data
[
'phone'
]
=
$result
[
'phone'
];
$this
->
data
[
'phone'
]
=
$result
[
'phone'
];
}
else
{
}
else
{
...
...
application/api_broker/service/CallPhoneService.php
View file @
d6de799a
...
@@ -293,7 +293,7 @@ class CallPhoneService
...
@@ -293,7 +293,7 @@ class CallPhoneService
*/
*/
public
function
agentsUnBindRedis
(
$phone_a
,
$phone_b
,
$phone_x
,
$user_id
=
0
,
$agent_id
=
0
)
public
function
agentsUnBindRedis
(
$phone_a
,
$phone_b
,
$phone_x
,
$user_id
=
0
,
$agent_id
=
0
)
{
{
$data
[
'status'
]
=
'success'
;
$data
[
'status'
]
=
'success
ful
'
;
$data
[
'msg'
]
=
''
;
$data
[
'msg'
]
=
''
;
if
(
empty
(
$phone_x
))
{
if
(
empty
(
$phone_x
))
{
$data
[
'status'
]
=
'failed'
;
$data
[
'status'
]
=
'failed'
;
...
@@ -315,7 +315,7 @@ class CallPhoneService
...
@@ -315,7 +315,7 @@ class CallPhoneService
$this
->
user_id
=
$user_id
;
$this
->
user_id
=
$user_id
;
$user_data
=
$this
->
getUserData
();
$user_data
=
$this
->
getUserData
();
if
(
empty
(
$user_data
[
'user_phone'
]))
{
if
(
empty
(
$user_data
[
'user_phone'
]))
{
$data
[
'status'
]
=
'fail
ed
'
;
$data
[
'status'
]
=
'fail'
;
$data
[
'msg'
]
=
'没有客户信息,可以忽略。'
;
$data
[
'msg'
]
=
'没有客户信息,可以忽略。'
;
return
$data
;
return
$data
;
}
}
...
@@ -327,7 +327,7 @@ class CallPhoneService
...
@@ -327,7 +327,7 @@ class CallPhoneService
}
}
if
(
empty
(
$this
->
phone_b
))
{
if
(
empty
(
$this
->
phone_b
))
{
$data
[
'status'
]
=
'fail
ed
'
;
$data
[
'status'
]
=
'fail'
;
$data
[
'msg'
]
=
'解除失败,请联系运营人员!'
;
$data
[
'msg'
]
=
'解除失败,请联系运营人员!'
;
return
$data
;
return
$data
;
}
}
...
@@ -389,7 +389,7 @@ class CallPhoneService
...
@@ -389,7 +389,7 @@ 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.phone_a,a.phone_b,b.phone_x'
,
$where
,
'a.id ASC'
);
$agent_call
=
$this
->
m_bind
->
getPhoneX
(
'a.
id,a.
phone_a,a.phone_b,b.phone_x'
,
$where
,
'a.id ASC'
);
$result_unbind
=
$this
->
agentsUnBindRedis
(
$agent_call
[
'phone_a'
],
$agent_call
[
'phone_b'
],
$agent_call
[
'phone_x'
]);
$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'
)
{
if
(
$result_unbind
[
'status'
]
==
'successful'
)
{
...
@@ -400,7 +400,7 @@ class CallPhoneService
...
@@ -400,7 +400,7 @@ class CallPhoneService
$this
->
subs_id
=
$result
->
SecretBindDTO
->
SubsId
;
$this
->
subs_id
=
$result
->
SecretBindDTO
->
SubsId
;
$this
->
request_id
=
$result
->
RequestId
;
$this
->
request_id
=
$result
->
RequestId
;
$this
->
m_bind
->
unBind
(
$agent_call
[
'phone_x'
],
$agent_call
[
'phone_a'
],
$agent_call
[
'phone_b
'
]);
$this
->
m_bind
->
unBind
Table
(
$agent_call
[
'id
'
]);
}
}
}
else
{
}
else
{
$data
[
'msg'
]
=
'拨号失败,15秒再试,再无法拨号请联系请联系运营人员!'
;
$data
[
'msg'
]
=
'拨号失败,15秒再试,再无法拨号请联系请联系运营人员!'
;
...
@@ -459,10 +459,12 @@ class CallPhoneService
...
@@ -459,10 +459,12 @@ 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.phone_a,a.phone_b,b.phone_x'
,
$where
,
'a.id ASC'
);
$agent_call
=
$this
->
m_bind
->
getPhoneX
(
'a.id,a.phone_a,a.phone_b,b.phone_x'
,
$where
,
'a.id ASC'
);
$result_unbind
=
$this
->
agentsUnBindRedis
(
$agent_call
[
'phone_a'
],
$agent_call
[
'phone_b'
],
$agent_call
[
'phone_x'
]);
$result_unbind
=
$this
->
agentsUnBindRedis
(
$agent_call
[
'phone_a'
],
$agent_call
[
'phone_b'
],
$agent_call
[
'phone_x'
]);
if
(
$result_unbind
[
'status'
]
==
'successful'
)
{
if
(
$result_unbind
[
'status'
]
==
'successful'
)
{
$result
=
$yun_tong_xun
->
setNumber
(
$this
->
phone_a
,
$this
->
phone_b
,
$area
,
$this
->
expiry_date
,
$record
);
$result
=
$yun_tong_xun
->
setNumber
(
$this
->
phone_a
,
$this
->
phone_b
,
$area
,
$this
->
expiry_date
,
$record
);
if
(
$result
[
'statusCode'
]
==
'000000'
)
{
if
(
$result
[
'statusCode'
]
==
'000000'
)
{
$data
[
'status'
]
=
'success'
;
$data
[
'status'
]
=
'success'
;
$data
[
'msg'
]
=
'绑定成功。'
;
$data
[
'msg'
]
=
'绑定成功。'
;
...
@@ -470,7 +472,7 @@ class CallPhoneService
...
@@ -470,7 +472,7 @@ class CallPhoneService
$this
->
mapping_id
=
$result
[
'data'
][
'mappingId'
];
$this
->
mapping_id
=
$result
[
'data'
][
'mappingId'
];
}
}
$this
->
m_bind
->
unBind
(
$agent_call
[
'phone_x'
],
$agent_call
[
'phone_a'
],
$agent_call
[
'phone_b
'
]);
$this
->
m_bind
->
unBind
Table
(
$agent_call
[
'id
'
]);
}
}
}
}
}
}
...
...
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