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
1ccda4bb
Commit
1ccda4bb
authored
Aug 28, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
上海地区号码
parent
a41df2e7
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
35 additions
and
13 deletions
+35
-13
CellPhone.php
application/api_broker/controller/CellPhone.php
+1
-1
PlsDemo.php
application/api_broker/untils/PlsDemo.php
+4
-4
CellPhone.php
application/index/controller/CellPhone.php
+1
-1
Basic.php
application/index/extend/Basic.php
+29
-7
No files found.
application/api_broker/controller/CellPhone.php
View file @
1ccda4bb
...
...
@@ -31,7 +31,7 @@ class CellPhone extends Basic
header
(
'Access-Control-Allow-Origin:*'
);
$call
=
new
CallPhoneService
();
$call
=
new
CallPhoneService
(
$this
->
city
);
$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'
];
...
...
application/api_broker/untils/PlsDemo.php
View file @
1ccda4bb
...
...
@@ -74,13 +74,13 @@ class PlsDemo
*
* @param $phoneA
* @param $phoneB
* @param $time
过期时间
* @param $time 过期时间
* @param bool $isRecordingEnabled 是否录音
* @param string $poolKey 号码池Key
* @param string $phoneNoX 中间号码
* @param $expectCity 城市
* @return mixed|\SimpleXMLElement
*/
public
static
function
bindAxb
(
$phoneA
,
$phoneB
,
$time
,
$isRecordingEnabled
=
false
,
$phoneNoX
=
''
)
{
public
static
function
bindAxb
(
$phoneA
,
$phoneB
,
$time
,
$isRecordingEnabled
=
false
,
$phoneNoX
=
''
,
$expectCity
)
{
//组装请求对象-具体描述见控制台-文档部分内容
$request
=
new
BindAxbRequest
();
...
...
@@ -98,7 +98,7 @@ class PlsDemo
$request
->
setPhoneNoX
(
$phoneNoX
);
//可选:期望分配X号码归属的地市(省去地市后缀后的城市名称)
$request
->
setExpectCity
(
""
);
$request
->
setExpectCity
(
$expectCity
);
//必填:绑定关系对应的失效时间-不能早于当前系统时间
$request
->
setExpiration
(
$time
);
...
...
application/index/controller/CellPhone.php
View file @
1ccda4bb
...
...
@@ -157,7 +157,7 @@ class CellPhone extends Basic
$house_id
=
empty
(
$this
->
params
[
'house_id'
])
?
0
:
(
int
)
$this
->
params
[
'house_id'
];
$record
=
true
;
//录音
$call_phone
=
new
CallPhoneService
();
$call_phone
=
new
CallPhoneService
(
$this
->
city
);
$data
=
$call_phone
->
bindAXB
(
$this
->
params
[
'phone_a'
],
$phone_b
,
$record
,
$user_id
,
$this
->
userId
,
$this
->
userName
,
$house_id
);
$result
[
'msg'
]
=
''
;
if
(
$data
[
'status'
]
==
'success'
)
{
...
...
application/index/extend/Basic.php
View file @
1ccda4bb
...
...
@@ -9,6 +9,7 @@ namespace app\index\extend;
* Time: 9:35
* 基类
*/
use
app\extra\RedisExt
;
use
app\model\AAgents
;
use
app\model\GHousesToAgents
;
use
app\model\GOperatingRecords
;
...
...
@@ -36,6 +37,8 @@ class Basic extends Controller
public
$lastLoginTime
;
public
$city
;
protected
$filterVerify
=
array
(
'index/login'
,
'index/loginVerify'
,
...
...
@@ -86,6 +89,9 @@ class Basic extends Controller
$this
->
userVerify
();
$this
->
userAuth
(
$requestPath
);
}
//获取默认城市
$this
->
getCity
(
$this
->
agentId
);
}
/**
...
...
@@ -170,13 +176,7 @@ class Basic extends Controller
if
(
$requestPath
==
'index/editExclusive'
&&
isset
(
$this
->
params
[
'exclusive_id'
]))
{
$m_house_agent
=
new
GHousesToAgents
();
//独家方
$exclusive_num
=
$m_house_agent
->
alias
(
'a'
)
->
field
(
'a.id'
)
->
join
(
'a_agents b'
,
'a.agents_id=b.id'
,
'left'
)
->
where
(
'a.is_del'
,
0
)
->
where
(
'a.type'
,
3
)
->
where
(
'a.agents_id'
,
$this
->
params
[
'exclusive_id'
])
->
count
();
$exclusive_num
=
$m_house_agent
->
getAgentHouseNum
(
$this
->
params
[
'exclusive_id'
],
3
);
if
(
$exclusive_num
>
0
)
{
$is_auth
=
1
;
}
...
...
@@ -282,4 +282,25 @@ class Basic extends Controller
$result
=
$records
->
record
(
$agents_id
,
$type
,
$remark
,
''
,
$user_id
);
return
$result
;
}
/**
* 默认城市选择
* @param $agentId
*/
public
function
getCity
(
$agentId
)
{
try
{
$redis_
=
RedisExt
::
getRedis
();
if
(
$redis_
)
{
$city
=
$redis_
->
get
(
"agent_city_"
.
$agentId
);
$this
->
city
=
empty
(
$city
)
?
"上海市"
:
$city
;
}
else
{
$this
->
city
=
"上海市"
;
}
}
catch
(
Exception
$exception
)
{
$this
->
city
=
"上海市"
;
}
}
}
\ 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