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
edb22d2f
Commit
edb22d2f
authored
Nov 06, 2018
by
zw
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'test' of
https://gitee.com/zwyjjc/tl_estate
into test
parents
6f37f0e4
f6c45d08
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
3 deletions
+22
-3
AAgentsPhone.php
application/model/AAgentsPhone.php
+10
-0
PrivacyNumber.php
application/task/controller/PrivacyNumber.php
+12
-3
No files found.
application/model/AAgentsPhone.php
View file @
edb22d2f
...
@@ -64,4 +64,13 @@ class AAgentsPhone extends BaseModel
...
@@ -64,4 +64,13 @@ class AAgentsPhone extends BaseModel
return
$result
;
return
$result
;
}
}
/**
* @param $where
* @param $fields
* @return mixed
*/
public
function
getAgentsByWhere
(
$where
,
$fields
)
{
return
$this
->
where
(
$where
)
->
value
(
$fields
);
}
}
}
\ No newline at end of file
application/task/controller/PrivacyNumber.php
View file @
edb22d2f
...
@@ -13,6 +13,8 @@ use app\api_broker\service\ClientService;
...
@@ -13,6 +13,8 @@ use app\api_broker\service\ClientService;
use
app\api_broker\untils\PlsDemo
;
use
app\api_broker\untils\PlsDemo
;
use
app\api_broker\untils\RongDemo
;
use
app\api_broker\untils\RongDemo
;
use
app\extra\RedisExt
;
use
app\extra\RedisExt
;
use
app\model\AAgents
;
use
app\model\AAgentsPhone
;
use
app\model\AliYunSecretReport
;
use
app\model\AliYunSecretReport
;
use
app\model\BindingPhone
;
use
app\model\BindingPhone
;
use
app\model\SecretReport
;
use
app\model\SecretReport
;
...
@@ -143,7 +145,8 @@ class PrivacyNumber
...
@@ -143,7 +145,8 @@ class PrivacyNumber
{
{
set_time_limit
(
0
);
set_time_limit
(
0
);
$m_bind
=
new
BindingPhone
();
$m_bind
=
new
BindingPhone
();
$m_agent
=
new
AAgents
();
$m_agent_phone
=
new
AAgentsPhone
();
$fields
=
'a.id,aliYun_phone_id,expiry_date,phone_x,phone_a,phone_b,subsId,a.type,a.mappingId'
;
$fields
=
'a.id,aliYun_phone_id,expiry_date,phone_x,phone_a,phone_b,subsId,a.type,a.mappingId'
;
$where
[
'a.status'
]
=
1
;
$where
[
'a.status'
]
=
1
;
$where
[
'a.expiry_date'
]
=
[
'<='
,
date
(
'Y-m-d'
)
.
' 23:59:59'
];
$where
[
'a.expiry_date'
]
=
[
'<='
,
date
(
'Y-m-d'
)
.
' 23:59:59'
];
...
@@ -154,6 +157,12 @@ class PrivacyNumber
...
@@ -154,6 +157,12 @@ class PrivacyNumber
$bind
=
new
BindingPhone
();
$bind
=
new
BindingPhone
();
$redis
=
RedisExt
::
getRedis
();
$redis
=
RedisExt
::
getRedis
();
foreach
(
$bind_data
[
'data'
]
as
$k
=>
$v
)
{
foreach
(
$bind_data
[
'data'
]
as
$k
=>
$v
)
{
$agent_id
=
$m_agent
->
getAgentsByWhere
([
'status'
=>
0
,
'phone'
=>
$v
[
'phone_a'
]],
'id'
);
if
(
empty
(
$agent_id
))
{
$agent_id
=
$m_agent_phone
->
getAgentsByWhere
([
'status'
=>
0
,
'phone'
=>
$v
[
'phone_a'
]],
'agents_id'
);
}
//解除绑定
//解除绑定
if
(
$v
[
'type'
]
==
1
&&
!
empty
(
$v
[
'subsId'
]))
{
if
(
$v
[
'type'
]
==
1
&&
!
empty
(
$v
[
'subsId'
]))
{
//释放阿里云隐私号码
//释放阿里云隐私号码
...
@@ -164,7 +173,7 @@ class PrivacyNumber
...
@@ -164,7 +173,7 @@ class PrivacyNumber
$phone_id
[
$k
]
=
$v
[
'aliYun_phone_id'
];
$phone_id
[
$k
]
=
$v
[
'aliYun_phone_id'
];
}
}
$call_key
=
'call_'
.
$v
[
'phone_a'
]
.
'_'
.
$v
[
'phone_b'
]
.
'_1'
;
$call_key
=
'call_'
.
$
agent_id
.
'_'
.
$
v
[
'phone_a'
]
.
'_'
.
$v
[
'phone_b'
]
.
'_1'
;
$redis
->
del
(
$call_key
);
$redis
->
del
(
$call_key
);
}
elseif
(
$v
[
'type'
]
==
2
&&
!
empty
(
$v
[
'mappingId'
]))
{
}
elseif
(
$v
[
'type'
]
==
2
&&
!
empty
(
$v
[
'mappingId'
]))
{
//释放容联云隐私号码
//释放容联云隐私号码
...
@@ -181,7 +190,7 @@ class PrivacyNumber
...
@@ -181,7 +190,7 @@ class PrivacyNumber
}
}
}
}
$call_key
=
'call_'
.
$v
[
'phone_a'
]
.
'_'
.
$v
[
'phone_b'
]
.
'_2'
;
$call_key
=
'call_'
.
$
agent_id
.
'_'
.
$
v
[
'phone_a'
]
.
'_'
.
$v
[
'phone_b'
]
.
'_2'
;
$redis
->
del
(
$call_key
);
$redis
->
del
(
$call_key
);
}
}
}
}
...
...
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