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
75b324f9
Commit
75b324f9
authored
Aug 28, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
回调id判断
parent
adbacda5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
12 deletions
+15
-12
PrivacyNumber.php
application/task/controller/PrivacyNumber.php
+15
-12
No files found.
application/task/controller/PrivacyNumber.php
View file @
75b324f9
...
@@ -42,14 +42,13 @@ class PrivacyNumber
...
@@ -42,14 +42,13 @@ class PrivacyNumber
$call_time
=
strtotime
(
$post_data
[
0
][
'release_time'
])
-
strtotime
(
$post_data
[
0
][
'start_time'
]);
$call_time
=
strtotime
(
$post_data
[
0
][
'release_time'
])
-
strtotime
(
$post_data
[
0
][
'start_time'
]);
$post_data
[
0
][
'time'
]
=
$call_time
;
$post_data
[
0
][
'time'
]
=
$call_time
;
$report
=
new
SecretReport
();
$report
->
allowField
(
true
)
->
save
(
$post_data
[
0
]);
if
(
$call_time
>
0
)
{
if
(
$call_time
>
0
)
{
$date
=
date
(
'Y-m-d'
);
$end_date
=
date
(
'Y-m-d H:i:s'
,
time
());
$num
=
Db
::
table
(
'aliyun_secret_report'
)
->
where
(
'phone_no'
,
$post_data
[
0
][
'phone_no'
])
$start_date
=
date
(
'Y-m-d H:i:s'
,
strtotime
(
"-1 day"
));
$num
=
Db
::
table
(
'aliyun_secret_report'
)
->
where
(
'phone_no'
,
$post_data
[
0
][
'phone_no'
])
->
where
(
'peer_no'
,
$post_data
[
0
][
'peer_no'
])
->
where
(
'peer_no'
,
$post_data
[
0
][
'peer_no'
])
->
where
(
'create_time'
,
'between'
,
[
$date
.
' 00:00:00'
,
$date
.
' 23:59:59'
])
->
where
(
'create_time'
,
'between'
,
[
$start_date
,
$end_date
])
->
count
(
'id'
);
->
count
(
'id'
);
if
(
empty
(
$num
))
{
if
(
empty
(
$num
))
{
...
@@ -57,6 +56,9 @@ class PrivacyNumber
...
@@ -57,6 +56,9 @@ class PrivacyNumber
$m_service
->
saveCallNumByUserId
(
$post_data
[
0
][
'users_id'
]);
$m_service
->
saveCallNumByUserId
(
$post_data
[
0
][
'users_id'
]);
}
}
}
}
$report
=
new
SecretReport
();
$report
->
allowField
(
true
)
->
save
(
$post_data
[
0
]);
Log
::
write
(
json_encode
(
$post_data
[
0
]),
'AliYunSecretReport'
);
//记录日志
Log
::
write
(
json_encode
(
$post_data
[
0
]),
'AliYunSecretReport'
);
//记录日志
return
json_encode
([
'code'
=>
0
,
'msg'
=>
'接收成功'
]);
return
json_encode
([
'code'
=>
0
,
'msg'
=>
'接收成功'
]);
}
}
...
@@ -164,7 +166,7 @@ class PrivacyNumber
...
@@ -164,7 +166,7 @@ class PrivacyNumber
$params
=
Request
::
instance
()
->
param
();
$params
=
Request
::
instance
()
->
param
();
/*搜索A经纪人agent_id and B客户 user_id */
/*搜索A经纪人agent_id and B客户 user_id */
$phone
=
explode
(
'-'
,
$params
[
'userData'
]);
$phone
=
explode
(
'-'
,
$params
[
'userData'
]);
$phone_a
=
$phone
[
0
];
$phone_a
=
$phone
[
0
];
$phone_b
=
$phone
[
1
];
$phone_b
=
$phone
[
1
];
...
@@ -175,7 +177,7 @@ class PrivacyNumber
...
@@ -175,7 +177,7 @@ class PrivacyNumber
$call_type
=
1
;
$call_type
=
1
;
}
}
$date
=
[
$date
=
[
'call_id'
=>
$params
[
'callId'
],
'call_id'
=>
$params
[
'callId'
],
'phone_no'
=>
$phone_a
,
/*A*/
'phone_no'
=>
$phone_a
,
/*A*/
'secret_no'
=>
$params
[
'servingNum'
],
/*X*/
'secret_no'
=>
$params
[
'servingNum'
],
/*X*/
...
@@ -254,10 +256,10 @@ class PrivacyNumber
...
@@ -254,10 +256,10 @@ class PrivacyNumber
set_time_limit
(
0
);
set_time_limit
(
0
);
$m_bind
=
new
BindingPhone
();
$m_bind
=
new
BindingPhone
();
$where
[
'a.status'
]
=
1
;
$where
[
'a.status'
]
=
1
;
$where
[
'a.type'
]
=
1
;
$where
[
'a.type'
]
=
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,b.phone_x,a.subsId,a.expiry_date'
,
$where
);
$select_data
=
$m_bind
->
getBindingPhoneList
(
'a.id,a.aliYun_phone_id,b.phone_x,a.subsId,a.expiry_date'
,
$where
);
foreach
(
$select_data
as
$k
=>
$v
)
{
foreach
(
$select_data
as
$k
=>
$v
)
{
$query_status
=
PlsDemo
::
querySubscriptionDetail
(
$v
[
'subsId'
],
$v
[
'phone_x'
]);
$query_status
=
PlsDemo
::
querySubscriptionDetail
(
$v
[
'subsId'
],
$v
[
'phone_x'
]);
...
@@ -272,7 +274,8 @@ class PrivacyNumber
...
@@ -272,7 +274,8 @@ class PrivacyNumber
* 号码批量插入
* 号码批量插入
* @throws \Exception
* @throws \Exception
*/
*/
public
function
insertPhone
()
{
public
function
insertPhone
()
{
// $phone = [
// $phone = [
//
//
// ];
// ];
...
...
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