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
5a02d1cd
Commit
5a02d1cd
authored
Jun 06, 2019
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
房东电话
parent
36fea835
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
52 additions
and
15 deletions
+52
-15
CellPhone.php
application/api_broker/controller/CellPhone.php
+3
-2
CallPhoneService.php
application/api_broker/service/CallPhoneService.php
+45
-11
CellPhone.php
application/index/controller/CellPhone.php
+4
-2
No files found.
application/api_broker/controller/CellPhone.php
View file @
5a02d1cd
...
...
@@ -34,9 +34,10 @@ class CellPhone extends Basic
$call
=
new
CallPhoneService
(
$this
->
city
,
$this
->
siteId
);
$record
=
true
;
//是否录音
$user_id
=
empty
(
$this
->
params
[
'user_id'
])
?
0
:
(
int
)
$this
->
params
[
'user_id'
];
$house_id
=
empty
(
$this
->
params
[
'house_id'
])
?
0
:
(
int
)
$this
->
params
[
'house_id'
];
//
$house_id = empty($this->params['house_id']) ? 0:(int)$this->params['house_id'];
$landlord
=
empty
(
$this
->
params
[
'landlord'
])
?
0
:
(
int
)
$this
->
params
[
'landlord'
];
$result
=
$call
->
bindAXB
(
$this
->
params
[
'phone_a'
],
$this
->
params
[
'phone_b'
],
$record
,
$user_id
,
$this
->
agentId
,
$this
->
agentName
,
$landlord
,
$house_id
);
$type
=
empty
(
$this
->
params
[
'type'
])
?
1
:
(
int
)
$this
->
params
[
'type'
];
$result
=
$call
->
bindAXB
(
$this
->
params
[
'phone_a'
],
$this
->
params
[
'phone_b'
],
$record
,
$user_id
,
$this
->
agentId
,
$this
->
agentName
,
$landlord
,
$type
);
if
(
$result
[
'status'
]
==
'success'
)
{
$this
->
msg
=
$result
[
'msg'
];
...
...
application/api_broker/service/CallPhoneService.php
View file @
5a02d1cd
...
...
@@ -16,6 +16,8 @@ use app\index\service\UserLogService;
use
app\model\AliYunPhone
;
use
app\model\BindingPhone
;
use
app\model\AliYunSecretReport
;
use
app\model\GLandlordPhone
;
use
app\model\OfficeGRoom
;
use
app\model\SecretReport
;
use
app\model\UPhoneFollowUp
;
use
app\model\UPhoneFollowUpTemporary
;
...
...
@@ -72,10 +74,10 @@ class CallPhoneService
* @param int $agent_id
* @param string $agent_name
* @param int $landlord
* @param int $
house_id
* @param int $
type
* @return mixed
*/
public
function
bindAXB
(
$phone_a
,
$phone_b
,
$record
=
true
,
int
$user_id
,
$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
$
type
)
{
$result
[
'status'
]
=
'failed'
;
$type
=
''
;
...
...
@@ -83,17 +85,24 @@ class CallPhoneService
$result
[
'msg'
]
=
'本机号码格式错误,请重新编辑!'
;
return
$result
;
}
if
(
!
empty
(
$user_id
))
{
$this
->
user_id
=
$user_id
;
$user_data
=
$this
->
getUserDataV2
();
if
(
empty
(
$user_data
[
'user_phone'
]))
{
$result
[
'status'
]
=
'fail'
;
$result
[
'msg'
]
=
'没有用户信息'
;
return
$result
;
if
(
$landlord
)
{
if
(
$type
==
1
)
{
$phone_b
=
$this
->
getHouseLandlordPhone
(
$user_id
);
//商铺房东手机号
}
else
{
$phone_b
=
$this
->
getBuildingRoomLandlordPhone
(
$user_id
);
//楼盘房源房东手机号
}
}
else
{
$this
->
user_id
=
$user_id
;
$user_data
=
$this
->
getUserDataV2
();
if
(
empty
(
$user_data
[
'user_phone'
]))
{
$result
[
'status'
]
=
'fail'
;
$result
[
'msg'
]
=
'没有用户信息'
;
return
$result
;
}
$phone_b
=
$user_data
[
'user_phone'
];
}
$phone_b
=
$user_data
[
'user_phone'
];
}
if
(
empty
(
$phone_a
)
||
strlen
(
$phone_a
)
!=
11
)
{
...
...
@@ -697,4 +706,28 @@ class CallPhoneService
}
return
$result
;
}
/**
* 商铺房东手机号
*
* @param $id
* @return array
*/
public
function
getHouseLandlordPhone
(
$id
)
{
$m_landlord
=
new
GLandlordPhone
();
return
$m_landlord
->
getValue
(
'phone'
,
[
'id'
=>
$id
]);
}
/**
* 楼盘房源房东手机号
*
* @param $id
* @return mixed
*/
public
function
getBuildingRoomLandlordPhone
(
$id
)
{
$m_landlord
=
new
OfficeGRoom
();
return
$m_landlord
->
getFieldOneValue
(
'phone'
,
[
'id'
=>
$id
]);
}
}
\ No newline at end of file
application/index/controller/CellPhone.php
View file @
5a02d1cd
...
...
@@ -291,11 +291,13 @@ class CellPhone extends Basic
$phone_b
=
$this
->
params
[
'phone_b'
];
}
$house_id
=
empty
(
$this
->
params
[
'house_id'
])
?
0
:
(
int
)
$this
->
params
[
'house_id'
];
//
$house_id = empty($this->params['house_id']) ? 0:(int)$this->params['house_id'];
$landlord
=
empty
(
$this
->
params
[
'landlord'
])
?
0
:
(
int
)
$this
->
params
[
'landlord'
];
$type
=
empty
(
$this
->
params
[
'type'
])
?
0
:
(
int
)
$this
->
params
[
'type'
];
$record
=
true
;
//录音
$call_phone
=
new
CallPhoneService
(
$this
->
city
,
$this
->
siteId
);
$data
=
$call_phone
->
bindAXB
(
$this
->
params
[
'phone_a'
],
$phone_b
,
$record
,
$user_id
,
$this
->
userId
,
$this
->
userName
,
$landlord
,
$
house_id
);
$data
=
$call_phone
->
bindAXB
(
$this
->
params
[
'phone_a'
],
$phone_b
,
$record
,
$user_id
,
$this
->
userId
,
$this
->
userName
,
$landlord
,
$
type
);
$result
[
'msg'
]
=
''
;
if
(
$data
[
'status'
]
==
'success'
)
{
// $push = new PushMessageService();
...
...
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