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
b6bd6add
Commit
b6bd6add
authored
Apr 10, 2019
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
回调缓存
parent
af20efcb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
5 deletions
+16
-5
PrivacyNumber.php
application/task/controller/PrivacyNumber.php
+16
-5
No files found.
application/task/controller/PrivacyNumber.php
View file @
b6bd6add
...
...
@@ -96,8 +96,10 @@ class PrivacyNumber
$save_data_arr
=
$save_data
=
[];
foreach
(
$post_data
as
$k
=>
$v
)
{
$save_data
=
$v
;
$save_data
[
'report_id'
]
=
$v
[
'id'
];
unset
(
$save_data
[
'id'
]);
//阿里大于返回是的id改为report_id
if
(
isset
(
$v
[
'id'
]))
{
$save_data
[
'report_id'
]
=
$v
[
'id'
];
unset
(
$save_data
[
'id'
]);
//阿里大于返回是的id改为report_id
}
$info
=
$this
->
redis
->
get
(
$v
[
'phone_no'
]
.
'_'
.
$v
[
'secret_no'
]
.
'_'
.
$v
[
'peer_no'
]
.
'_1'
);
if
(
empty
(
$info
))
{
...
...
@@ -131,10 +133,19 @@ class PrivacyNumber
$save_data
[
'time'
]
=
$call_time
;
if
(
$call_time
>
0
)
{
$end_date
=
date
(
'Y-m-d H:i:s'
,
time
());
$start_date
=
date
(
'Y-m-d H:i:s'
,
strtotime
(
"-1 day"
));
$num
=
$this
->
m_secret_report
->
getCallNumber
(
$post_data
[
0
][
'phone_no'
],
$post_data
[
0
][
'peer_no'
],
$start_date
,
$end_date
);
$key
=
'call_back_'
.
$v
[
'phone_no'
]
.
'_'
.
$v
[
'peer_no'
]
.
'_'
.
date
(
'Y-m-d'
,
strtotime
(
'-1 day'
));
$time
=
$this
->
redis
->
get
(
$key
);
if
(
empty
(
$time
))
{
$end_date
=
date
(
'Y-m-d H:i:s'
,
time
());
$start_date
=
date
(
'Y-m-d H:i:s'
,
strtotime
(
"-1 day"
));
$num
=
$this
->
m_secret_report
->
getCallNumber
(
$post_data
[
0
][
'phone_no'
],
$post_data
[
0
][
'peer_no'
],
$start_date
,
$end_date
);
}
else
{
$num
=
1
;
}
if
(
empty
(
$num
))
{
$expiration_time
=
strtotime
(
date
(
'23:59:59'
))
-
time
();
$this
->
redis
->
set
(
$key
,
time
(),
$expiration_time
);
$m_service
=
new
ClientService
();
$m_service
->
saveCallNumByUserId
(
$save_data
[
'users_id'
]);
}
...
...
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