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
ce03548d
Commit
ce03548d
authored
Aug 23, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
通话回调处理,记录客户拨打。
parent
68988a8c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
2 deletions
+12
-2
PrivacyNumber.php
application/task/controller/PrivacyNumber.php
+12
-2
No files found.
application/task/controller/PrivacyNumber.php
View file @
ce03548d
...
@@ -8,9 +8,9 @@
...
@@ -8,9 +8,9 @@
namespace
app\task\controller
;
namespace
app\task\controller
;
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\model\AliYunPhone
;
use
app\model\AliYunSecretReport
;
use
app\model\AliYunSecretReport
;
use
app\model\BindingPhone
;
use
app\model\BindingPhone
;
use
app\model\SecretReport
;
use
app\model\SecretReport
;
...
@@ -39,11 +39,16 @@ class PrivacyNumber
...
@@ -39,11 +39,16 @@ class PrivacyNumber
$post_data
[
0
][
'agents_id'
]
=
$agents_id
;
$post_data
[
0
][
'agents_id'
]
=
$agents_id
;
$post_data
[
0
][
'users_id'
]
=
Db
::
table
(
'u_users'
)
->
where
(
'user_phone'
,
$post_data
[
0
][
'peer_no'
])
->
value
(
'id'
);
$post_data
[
0
][
'users_id'
]
=
Db
::
table
(
'u_users'
)
->
where
(
'user_phone'
,
$post_data
[
0
][
'peer_no'
])
->
value
(
'id'
);
}
}
$call_time
=
strtotime
(
$post_data
[
0
][
'release_time'
])
-
strtotime
(
$post_data
[
0
][
'start_time'
]);
$post_data
[
0
][
'time'
]
=
strtotime
(
$post_data
[
0
][
'release_time'
])
-
strtotime
(
$post_data
[
0
][
'start_time'
])
;
$post_data
[
0
][
'time'
]
=
$call_time
;
$report
=
new
SecretReport
();
$report
=
new
SecretReport
();
$report
->
allowField
(
true
)
->
save
(
$post_data
[
0
]);
$report
->
allowField
(
true
)
->
save
(
$post_data
[
0
]);
if
(
$call_time
>
0
)
{
$m_service
=
new
ClientService
();
$m_service
->
saveCallNumByUserId
(
$post_data
[
0
][
'users_id'
]);
}
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'
=>
'接收成功'
]);
}
}
...
@@ -191,6 +196,11 @@ class PrivacyNumber
...
@@ -191,6 +196,11 @@ class PrivacyNumber
$report
->
allowField
(
true
)
->
save
(
$date
);
$report
->
allowField
(
true
)
->
save
(
$date
);
$str
=
date
(
'Y-m-d h:i:s'
)
.
' 容联云话单'
.
var_export
(
$params
,
true
);
$str
=
date
(
'Y-m-d h:i:s'
)
.
' 容联云话单'
.
var_export
(
$params
,
true
);
if
(
$params
[
'duration'
]
>
0
&&
$date
[
'users_id'
])
{
$m_service
=
new
ClientService
();
$m_service
->
saveCallNumByUserId
(
$date
[
'users_id'
]);
}
Log
::
write
(
$str
,
'rongBilledInformUrl'
);
//记录日志
Log
::
write
(
$str
,
'rongBilledInformUrl'
);
//记录日志
return
json_encode
([
"statusCode"
=>
'000000'
,
'msg'
=>
'接收成功'
]);
return
json_encode
([
"statusCode"
=>
'000000'
,
'msg'
=>
'接收成功'
]);
}
}
...
...
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