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
8c23baae
Commit
8c23baae
authored
Jun 21, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
绑定手机号修改
parent
c124d813
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
50 additions
and
4 deletions
+50
-4
CellPhone.php
application/api_broker/controller/CellPhone.php
+0
-0
PlsDemo.php
application/api_broker/untils/PlsDemo.php
+1
-1
BindingPhone.php
application/model/BindingPhone.php
+49
-3
No files found.
application/api_broker/controller/CellPhone.php
View file @
8c23baae
This diff is collapsed.
Click to expand it.
application/api_broker/untils/PlsDemo.php
View file @
8c23baae
...
...
@@ -80,7 +80,7 @@ class PlsDemo
* @param string $phoneNoX 中间号码
* @return mixed|\SimpleXMLElement
*/
public
static
function
bindAxb
(
$phoneA
,
$phoneB
,
$time
,
$isRecordingEnabled
=
false
,
$phoneNoX
=
'
17091955105
'
)
{
public
static
function
bindAxb
(
$phoneA
,
$phoneB
,
$time
,
$isRecordingEnabled
=
false
,
$phoneNoX
=
''
)
{
//组装请求对象-具体描述见控制台-文档部分内容
$request
=
new
BindAxbRequest
();
...
...
application/model/BindingPhone.php
View file @
8c23baae
...
...
@@ -88,18 +88,19 @@ class BindingPhone extends BaseModel
/**
* 获取phone_x
*
* @param $field
* @param $where
* @param
string
$field
* @param
array
$where
* @return array|false|\PDOStatement|string|\think\Model
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
getPhoneX
(
$field
,
$where
)
{
public
function
getPhoneX
(
$field
=
''
,
$where
=
[]
)
{
return
$this
->
alias
(
'a'
)
->
field
(
$field
)
->
join
(
'aliYun_phone b'
,
'a.aliYun_phone_id=b.id'
,
'left'
)
->
where
(
$where
)
->
order
(
'a.id desc'
)
->
find
();
}
...
...
@@ -137,4 +138,48 @@ class BindingPhone extends BaseModel
$this
->
update
([
'status'
=>
0
,
'id'
=>
$id
]);
return
;
}
/**
* @param $phone_x
* @param $phone_a
* @param $phone_b
* @param $record
* @param $time
* @param $result
* @param string $mappingId
* @param int $type
* @return int|string
*/
/**
* @param $phone_x
* @param $phone_a
* @param $phone_b
* @param $record
* @param $time
* @param $result
* @param string $mappingId
* @param int $type
* @return int|string
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
recordBindPhone
(
$phone_x
,
$phone_a
,
$phone_b
,
$record
,
$time
,
$result
,
$mappingId
=
''
,
$type
=
1
)
{
$m_ali_phone
=
new
AliYunPhone
();
$phone_id
=
$m_ali_phone
->
field
(
'id,bind_num'
)
->
where
(
'phone_x'
,
$phone_x
)
->
find
();
$phone_id
[
'bind_num'
]
+=
1
;
$m_ali_phone
->
where
(
'id'
,
$phone_id
[
'id'
])
->
update
([
'bind_num'
=>
$phone_id
[
'bind_num'
]]);
$insert_data
[
'phone_a'
]
=
$phone_a
;
$insert_data
[
'phone_b'
]
=
$phone_b
;
$insert_data
[
'subsId'
]
=
$result
->
SecretBindDTO
->
SubsId
;
$insert_data
[
'requestId'
]
=
$result
->
RequestId
;
$insert_data
[
'mappingId'
]
=
$mappingId
;
$insert_data
[
'record'
]
=
$record
;
$insert_data
[
'aliYun_phone_id'
]
=
$phone_id
[
'id'
];
$insert_data
[
'expiry_date'
]
=
$time
;
$insert_data
[
'type'
]
=
$type
;
$insert_data
[
'status'
]
=
1
;
return
$this
->
insert
(
$insert_data
);
}
}
\ No newline at end of file
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