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
d2da715d
Commit
d2da715d
authored
Sep 18, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
容联云绑定号码检测
parent
39894d03
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
38 additions
and
7 deletions
+38
-7
CallPhoneService.php
application/api_broker/service/CallPhoneService.php
+6
-5
RongDemo.php
application/api_broker/untils/RongDemo.php
+30
-0
BindingPhone.php
application/model/BindingPhone.php
+2
-2
No files found.
application/api_broker/service/CallPhoneService.php
View file @
d2da715d
...
...
@@ -67,7 +67,7 @@ class CallPhoneService
* @param int $house_id
* @return mixed
*/
public
function
bindAXB
(
$phone_a
,
$phone_b
,
$record
=
true
,
int
$user_id
,
int
$agent_id
,
string
$agent_name
,
int
$landlord
,
int
$house_id
)
public
function
bindAXB
(
$phone_a
,
$phone_b
,
$record
=
true
,
int
$user_id
,
$agent_id
,
string
$agent_name
,
int
$landlord
,
int
$house_id
)
{
$result
[
'status'
]
=
'failed'
;
...
...
@@ -264,15 +264,16 @@ class CallPhoneService
/*容联云*/
$mappingId
=
$phone
->
getSubsId
(
$this
->
phone_x
,
$this
->
phone_a
,
$this
->
phone_b
,
1
,
'mappingId'
);
$yun_tong_xun
=
new
RongDemo
();
if
(
$mappingId
)
{
if
(
$mappingId
)
{
$result
=
$yun_tong_xun
->
releaseNumber
(
$mappingId
);
/*解绑*/
if
(
$result
[
'statusCode'
]
==
'000000'
)
{
$phone
->
unBind
(
$this
->
phone_x
,
$this
->
phone_a
,
$this
->
phone_b
);
}
else
{
$data
[
'status'
]
=
'failed'
;
$data
[
'msg'
]
=
'解除失败,如果需要继续与客户沟通,请联系运营!'
;
$yun_result
=
$yun_tong_xun
->
getBindInfo
(
$this
->
phone_a
,
$this
->
phone_b
,
$this
->
phone_x
,
$mappingId
);
if
(
empty
(
$yun_result
[
'data'
][
'mappingId'
]))
{
$phone
->
unBind
(
$this
->
phone_x
,
$this
->
phone_a
,
$this
->
phone_b
);
}
}
}
else
{
$data
[
'msg'
]
=
'没有号码绑定关系,请忽略!。'
;
...
...
application/api_broker/untils/RongDemo.php
View file @
d2da715d
...
...
@@ -224,4 +224,33 @@ class RongDemo
}
return
$msg
;
}
/**
* 检查AXB绑定状态
*
* @param $aNumber
* @param $bNumber
* @param $xNumber
* @param $mappingId
* @return mixed
*/
public
function
getBindInfo
(
$aNumber
,
$bNumber
,
$xNumber
,
$mappingId
)
{
$data
=
$this
->
components
;
$time
=
date
(
'YmdHis'
,
time
());
$sign
=
$this
->
sigParameter
(
$time
);
/*签名*/
$url
=
$this
->
url
(
'axb'
,
'query'
,
'cu01'
,
$sign
);
/*url*/
$Authorization
=
$this
->
Authorization
(
$time
);
/*认证信息*/
$post_data
=
[
'appId'
=>
$data
[
'appId'
],
'mappingId'
=>
$mappingId
,
'aNumber'
=>
$aNumber
,
'xNumber'
=>
$xNumber
,
'bNumber'
=>
$bNumber
];
$result
=
json_decode
(
$this
->
sendCurl
(
$url
,
$post_data
,
$Authorization
),
true
);
$result
[
'code_msg'
]
=
$this
->
getCodeString
(
$result
[
'statusCode'
]);
return
$result
;
}
}
\ No newline at end of file
application/model/BindingPhone.php
View file @
d2da715d
...
...
@@ -18,9 +18,9 @@ class BindingPhone extends BaseModel
*
* @param $phone_x
* @param $phone_a
* @param $phone_b
* @param $phoneId
* @param string $phone_b
* @param int $status
* @param string $phoneId
* @return bool|mixed
*/
public
function
getSubsId
(
$phone_x
,
$phone_a
,
$phone_b
=
''
,
$status
=
0
,
$phoneId
=
'subsId'
)
...
...
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