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
9886d5b9
Commit
9886d5b9
authored
Mar 20, 2018
by
zfc
Committed by
zw
Mar 22, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
容联云and阿里云订单表合并
parent
ec94ed5d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
40 additions
and
12 deletions
+40
-12
SecretReport.php
application/model/SecretReport.php
+13
-0
PrivacyNumber.php
application/task/controller/PrivacyNumber.php
+27
-12
No files found.
application/model/SecretReport.php
View file @
9886d5b9
...
@@ -212,4 +212,17 @@ class SecretReport extends Model
...
@@ -212,4 +212,17 @@ class SecretReport extends Model
}
}
return
$price
;
return
$price
;
}
}
/**
* @param $field
* @param $where
* @return false|\PDOStatement|string|\think\Collection
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
getArr
(
$field
,
$where
){
$r
=
$this
->
field
(
$field
)
->
where
(
$where
)
->
select
();
return
$r
;
}
}
}
application/task/controller/PrivacyNumber.php
View file @
9886d5b9
...
@@ -75,18 +75,18 @@ class PrivacyNumber
...
@@ -75,18 +75,18 @@ class PrivacyNumber
/*容联云音频下载*/
/*容联云音频下载*/
$rongRecord
=
new
RongBilledInform
();
$rongRecord
=
new
RongBilledInform
();
$ids
=
array
();
$ids
=
array
();
$field
=
'id,
mp3_url
'
;
$field
=
'id,
voice_file
'
;
$where
=
'
download
=0'
;
$where
=
'
record_down
=0'
;
$down_data2
=
$rongRecord
->
getArr
(
$field
,
$where
);
$down_data2
=
$rongRecord
->
getArr
(
$field
,
$where
);
if
(
$down_data2
)
{
if
(
$down_data2
)
{
foreach
(
$down_data2
as
$k
=>
$v
)
{
foreach
(
$down_data2
as
$k
=>
$v
)
{
$ids
[]
=
$v
[
'id'
];
$ids
[]
=
$v
[
'id'
];
$down_url2
=
explode
(
'/'
,
$v
[
'
mp3_url
'
]);
$down_url2
=
explode
(
'/'
,
$v
[
'
voice_file
'
]);
down_file
(
$v
[
'
mp3_url
'
],
ROOT_PATH
.
'public'
.
DS
.
'static'
.
DS
.
'voice'
,
array_pop
(
$down_url2
));
down_file
(
$v
[
'
voice_file
'
],
ROOT_PATH
.
'public'
.
DS
.
'static'
.
DS
.
'voice'
,
array_pop
(
$down_url2
));
}
}
}
}
$id_str
=
implode
(
','
,
$ids
);
$id_str
=
implode
(
','
,
$ids
);
$update
[
'
download
'
]
=
1
;
$update
[
'
record_down
'
]
=
1
;
$where
=
" id in(
$id_str
)"
;
$where
=
" id in(
$id_str
)"
;
$rongRecord
->
save
(
$update
,
$where
);
$rongRecord
->
save
(
$update
,
$where
);
...
@@ -142,17 +142,32 @@ class PrivacyNumber
...
@@ -142,17 +142,32 @@ class PrivacyNumber
$params
=
Request
::
instance
()
->
param
();
$params
=
Request
::
instance
()
->
param
();
/*搜索A经纪人agent_id and B客户 user_id */
/*搜索A经纪人agent_id and B客户 user_id */
$date
=
[
'call_id'
=>
$params
[
'callId'
],
'phone_no'
=>
$params
[
'callerNum'
],
/*A*/
'secret_no'
=>
$params
[
'calleeNum'
],
/*X*/
'peer_no'
=>
$params
[
'servingNum'
],
/*B*/
'start_time'
=>
$params
[
'answerTime'
],
/*被叫接听时间*/
'call_time'
=>
$params
[
'startTime'
],
/*本次通话开始时间*/
'release_time'
=>
$params
[
'endTime'
],
/*本次通话结束时间*/
'ring_time'
=>
$params
[
'calleeRingTime'
],
/*被叫振铃时间*/
'time'
=>
$params
[
'duration'
],
/*本次通话时间*/
'release_dir'
=>
$params
[
'result'
],
/*本次通话的结果,0 成功2无应答 9呼叫失败 11*/
'mapping_id'
=>
$params
[
'mappingId'
],
/*绑定容联云id*/
'type'
=>
2
,
'call_display'
=>
$params
[
'calldisplay'
],
];
$phone_a
=
$params
[
'callerNum'
];
$phone_a
=
$params
[
'callerNum'
];
if
(
$phone_a
)
{
if
(
$phone_a
)
{
$agents_id
=
Db
::
table
(
'agents'
)
->
where
(
"phone='
{
$phone_a
}
' AND password IS NOT NULL"
)
->
value
(
'id'
);
$agents_id
=
Db
::
table
(
'agents'
)
->
where
(
"phone='
{
$phone_a
}
' AND password IS NOT NULL"
)
->
value
(
'id'
);
if
(
empty
(
$agents_id
))
{
if
(
empty
(
$agents_id
))
{
$agents_id
=
Db
::
table
(
'a_agents_phone'
)
->
where
(
'phone'
,
$phone_a
)
->
value
(
'agents_id'
);
$agents_id
=
Db
::
table
(
'a_agents_phone'
)
->
where
(
'phone'
,
$phone_a
)
->
value
(
'agents_id'
);
}
}
$
params
[
'agents_id'
]
=
$agents_id
;
$
date
[
'agents_id'
]
=
$agents_id
;
$
params
[
'users_id'
]
=
Db
::
table
(
'u_users'
)
->
where
(
'user_phone'
,
$phone_a
)
->
value
(
'id'
);
$
date
[
'users_id'
]
=
Db
::
table
(
'u_users'
)
->
where
(
'user_phone'
,
$phone_a
)
->
value
(
'id'
);
}
}
$report
=
new
RongBilledInform
();
$report
=
new
SecretReport
();
$report
->
allowField
(
true
)
->
save
(
$
params
);
$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
);
...
@@ -163,9 +178,9 @@ class PrivacyNumber
...
@@ -163,9 +178,9 @@ class PrivacyNumber
//录音通知
//录音通知
public
function
rongRecordingInformUrl
(){
public
function
rongRecordingInformUrl
(){
$params
=
Request
::
instance
()
->
param
();
$params
=
Request
::
instance
()
->
param
();
$report
=
new
RongBilledInform
();
$report
=
new
SecretReport
();
$where
[
'call
I
d'
]
=
$params
[
'callId'
];
$where
[
'call
_i
d'
]
=
$params
[
'callId'
];
$update
[
'
mp3_url
'
]
=
$params
[
'recordUrl'
];
$update
[
'
voice_file
'
]
=
$params
[
'recordUrl'
];
$report
->
save
(
$update
,
$where
);
$report
->
save
(
$update
,
$where
);
$str
=
date
(
'Y-m-d h:i:s'
)
.
' 容联云录音'
.
var_export
(
$params
,
true
);
$str
=
date
(
'Y-m-d h:i:s'
)
.
' 容联云录音'
.
var_export
(
$params
,
true
);
Log
::
write
(
$str
,
'rongRecordingInformUrl'
);
//记录日志
Log
::
write
(
$str
,
'rongRecordingInformUrl'
);
//记录日志
...
...
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