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
07d6767e
Commit
07d6767e
authored
Oct 24, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
定时任务同步删除拨号redis缓存
parent
0b375e85
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
1 deletion
+13
-1
PrivacyNumber.php
application/task/controller/PrivacyNumber.php
+13
-1
No files found.
application/task/controller/PrivacyNumber.php
View file @
07d6767e
...
@@ -12,6 +12,7 @@ use app\api_broker\service\CallPhoneService;
...
@@ -12,6 +12,7 @@ use app\api_broker\service\CallPhoneService;
use
app\api_broker\service\ClientService
;
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\model\AliYunSecretReport
;
use
app\model\AliYunSecretReport
;
use
app\model\BindingPhone
;
use
app\model\BindingPhone
;
use
app\model\SecretReport
;
use
app\model\SecretReport
;
...
@@ -151,6 +152,7 @@ class PrivacyNumber
...
@@ -151,6 +152,7 @@ class PrivacyNumber
$binding_phone_id
=
[];
$binding_phone_id
=
[];
$phone_id
=
[];
$phone_id
=
[];
$bind
=
new
BindingPhone
();
$bind
=
new
BindingPhone
();
$redis
=
RedisExt
::
getRedis
();
foreach
(
$bind_data
[
'data'
]
as
$k
=>
$v
)
{
foreach
(
$bind_data
[
'data'
]
as
$k
=>
$v
)
{
//解除绑定
//解除绑定
if
(
$v
[
'type'
]
==
1
&&
!
empty
(
$v
[
'subsId'
]))
{
if
(
$v
[
'type'
]
==
1
&&
!
empty
(
$v
[
'subsId'
]))
{
...
@@ -160,6 +162,9 @@ class PrivacyNumber
...
@@ -160,6 +162,9 @@ class PrivacyNumber
$bind
->
unBind
(
$v
[
'phone_x'
],
$v
[
'phone_a'
],
$v
[
'phone_b'
],
$result
->
RequestId
);
$bind
->
unBind
(
$v
[
'phone_x'
],
$v
[
'phone_a'
],
$v
[
'phone_b'
],
$result
->
RequestId
);
$binding_phone_id
[
$k
]
=
$v
[
'id'
];
$binding_phone_id
[
$k
]
=
$v
[
'id'
];
$phone_id
[
$k
]
=
$v
[
'aliYun_phone_id'
];
$phone_id
[
$k
]
=
$v
[
'aliYun_phone_id'
];
$call_key
=
'call_'
.
$v
[
'phone_a'
]
.
'_'
.
$v
[
'phone_b'
]
.
'_1'
;
$redis
->
del
(
$call_key
);
}
}
}
elseif
(
$v
[
'type'
]
==
2
&&
!
empty
(
$v
[
'mappingId'
]))
{
}
elseif
(
$v
[
'type'
]
==
2
&&
!
empty
(
$v
[
'mappingId'
]))
{
//释放容联云隐私号码
//释放容联云隐私号码
...
@@ -169,6 +174,9 @@ class PrivacyNumber
...
@@ -169,6 +174,9 @@ class PrivacyNumber
$bind
->
unBind
(
$v
[
'phone_x'
],
$v
[
'phone_a'
],
$v
[
'phone_b'
]);
$bind
->
unBind
(
$v
[
'phone_x'
],
$v
[
'phone_a'
],
$v
[
'phone_b'
]);
$binding_phone_id
[
$k
]
=
$v
[
'id'
];
$binding_phone_id
[
$k
]
=
$v
[
'id'
];
$phone_id
[
$k
]
=
$v
[
'aliYun_phone_id'
];
$phone_id
[
$k
]
=
$v
[
'aliYun_phone_id'
];
$call_key
=
'call_'
.
$v
[
'phone_a'
]
.
'_'
.
$v
[
'phone_b'
]
.
'_2'
;
$redis
->
del
(
$call_key
);
}
else
{
}
else
{
$yun_result
=
$tong_xun
->
getBindInfo
(
$v
[
'phone_a'
],
$v
[
'phone_b'
],
$v
[
'phone_x'
],
$v
[
'mappingId'
]);
$yun_result
=
$tong_xun
->
getBindInfo
(
$v
[
'phone_a'
],
$v
[
'phone_b'
],
$v
[
'phone_x'
],
$v
[
'mappingId'
]);
if
(
empty
(
$yun_result
[
'data'
][
'mappingId'
]))
{
if
(
empty
(
$yun_result
[
'data'
][
'mappingId'
]))
{
...
@@ -287,9 +295,13 @@ class PrivacyNumber
...
@@ -287,9 +295,13 @@ class PrivacyNumber
$where
[
'a.status'
]
=
1
;
$where
[
'a.status'
]
=
1
;
$where
[
'a.expiry_date'
]
=
[
'<'
,
date
(
'Y-m-d H:i:s'
)
];
$where
[
'a.expiry_date'
]
=
[
'<'
,
date
(
'Y-m-d H:i:s'
)
];
$select_data
=
$m_bind
->
getBindingPhoneList
(
'a.id,a.aliYun_phone_id'
,
$where
);
$select_data
=
$m_bind
->
getBindingPhoneList
(
'a.id,a.aliYun_phone_id,a.phone_a,a.phone_b,a.type'
,
$where
);
$redis
=
RedisExt
::
getRedis
();
foreach
(
$select_data
[
'data'
]
as
$k
=>
$v
)
{
foreach
(
$select_data
[
'data'
]
as
$k
=>
$v
)
{
$m_bind
->
unBindTable
(
$v
[
'id'
],
$v
[
'aliYun_phone_id'
]);
$m_bind
->
unBindTable
(
$v
[
'id'
],
$v
[
'aliYun_phone_id'
]);
$call_key
=
'call_'
.
$v
[
'phone_a'
]
.
'_'
.
$v
[
'phone_b'
]
.
'_'
.
$v
[
'type'
];
$redis
->
del
(
$call_key
);
}
}
return
;
return
;
}
}
...
...
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