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
4d3aea91
Commit
4d3aea91
authored
Jun 24, 2019
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
根据成交报告id查询经纪人
parent
a226032d
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
86 additions
and
1 deletion
+86
-1
OfficeBargain.php
application/index/controller/OfficeBargain.php
+21
-0
AliyunVoiceDown.php
application/model/AliyunVoiceDown.php
+30
-0
route.php
application/route.php
+2
-0
PrivacyNumber.php
application/task/controller/PrivacyNumber.php
+33
-1
No files found.
application/index/controller/OfficeBargain.php
View file @
4d3aea91
...
...
@@ -1346,4 +1346,24 @@ class OfficeBargain extends Basic
}
return
$this
->
response
(
$data
[
'code'
],
$data
[
'msg'
],
$data
[
'data'
]);
}
/**
* 根据成交报告id查询经纪人
* 1盘方,2客方,3反签,4独家,5合作方
*
*
* @return \think\Response
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
searchBargainAgents
()
{
if
(
empty
(
$this
->
params
[
'bargain_id'
]))
{
return
$this
->
response
(
101
,
'请求参数错误!'
);
}
$data
=
$this
->
m_bargain
->
getAgentTypeByBargainId
(
$this
->
params
[
'bargain_id'
]);
return
$this
->
response
(
200
,
""
,
$data
);
}
}
\ No newline at end of file
application/model/AliyunVoiceDown.php
0 → 100644
View file @
4d3aea91
<?php
namespace
app\model
;
use
think\Db
;
class
AliyunVoiceDown
extends
BaseModel
{
protected
$table
=
'office_g_room'
;
private
$db_
;
public
function
__construct
(
$data
=
[])
{
parent
::
__construct
(
$data
);
$this
->
db_
=
Db
::
name
(
$this
->
table
);
}
/**
* @param $data
* @return int|string
*/
public
function
insertAllData
(
$data
)
{
return
$this
->
db_
->
insertAll
(
$data
);
}
}
\ No newline at end of file
application/route.php
View file @
4d3aea91
...
...
@@ -664,6 +664,7 @@ Route::group('task', [
'rongStatusInformUrl'
=>
[
'task/PrivacyNumber/rongStatusInformUrl'
,
[
'method'
=>
'post | get'
]],
//隐私号码回调[状态通知]
'defaultFollowUp'
=>
[
'task/PrivacyNumber/defaultFollowUp'
,
[
'method'
=>
'post | get'
]],
//默认跟进
'callBackDownVoice'
=>
[
'task/PrivacyNumber/callBackDownVoice'
,
[
'method'
=>
'post | get'
]],
//回调录音
'getDownVoiceParams'
=>
[
'task/PrivacyNumber/getDownVoiceParams'
,
[
'method'
=>
'post | get'
]],
//回调录音
'updateShopTask'
=>
[
'task/JobTask/updateShopTask'
,
[
'method'
=>
'post | get'
]],
//默认跟进
...
...
@@ -1080,6 +1081,7 @@ Route::group('office_index', [
'checkBackOutOne/:check_status'
=>
[
'index/OfficeBargain/checkReport'
,
[
'method'
=>
'post'
],
[
'check_status'
=>
1
]],
//审核撤销成交报告-第一级审核
'checkBackOutTwo/:check_status'
=>
[
'index/OfficeBargain/checkReport'
,
[
'method'
=>
'post'
],
[
'check_status'
=>
2
]],
//审核撤销成交报告-第二级审核
'checkBackOutThree/:check_status'
=>
[
'index/OfficeBargain/checkReport'
,
[
'method'
=>
'post'
],
[
'check_status'
=>
3
]],
//审核撤销成交报告-第三级审核
'searchBargainAgents'
=>
[
'index/OfficeBargain/searchBargainAgents'
,
[
'method'
=>
'GET'
]],
//成交报告id获取盘方,客方,反签,独家,合作方
'collectingBill'
=>
[
'index/officePayLog/collectingBill'
,
[
'method'
=>
'get|post'
]],
//收款
'getBeForNum'
=>
[
'index/officePayLog/getBeForNum'
,
[
'method'
=>
'get'
]],
//获取上次提交收款的门牌号等
...
...
application/task/controller/PrivacyNumber.php
View file @
4d3aea91
...
...
@@ -17,12 +17,14 @@ use app\extra\RedisExt;
use
app\model\AAgents
;
use
app\model\AAgentsPhone
;
use
app\model\AliYunSecretReport
;
use
app\model\AliyunVoiceDown
;
use
app\model\BindingPhone
;
use
app\model\GLandlordPhone
;
use
app\model\TAgentTotalCallModel
;
use
app\model\Users
;
use
think\Log
;
use
think\Request
;
use
think\Response
;
class
PrivacyNumber
{
...
...
@@ -32,6 +34,7 @@ class PrivacyNumber
private
$m_agent
;
private
$m_agent_phone
;
private
$m_user
;
private
$m_down
;
public
function
__construct
()
{
$this
->
redis
=
RedisExt
::
getRedis
();
...
...
@@ -40,6 +43,7 @@ class PrivacyNumber
$this
->
m_agent
=
new
AAgents
();
$this
->
m_agent_phone
=
new
AAgentsPhone
();
$this
->
m_user
=
new
Users
();
$this
->
m_down
=
new
AliyunVoiceDown
();
}
/**
...
...
@@ -51,7 +55,7 @@ class PrivacyNumber
{
try
{
$post_data
=
Request
::
instance
()
->
param
();
$save_data_arr
=
$save_data
=
[];
$save_data_arr
=
$save_data
=
$down_array
=
[];
foreach
(
$post_data
as
$k
=>
$v
)
{
$save_data
=
$v
;
if
(
isset
(
$v
[
'id'
]))
{
...
...
@@ -103,12 +107,22 @@ class PrivacyNumber
$m_service
=
new
ClientService
();
$m_service
->
saveCallNumByUserId
(
$save_data
[
'users_id'
]);
}
$down_array
[
$k
]
=
[
'call_id'
=>
$v
[
'call_id'
],
'call_time'
=>
$v
[
'call_time'
],
'type'
=>
1
,
];
}
$save_data_arr
[]
=
$save_data
;
Log
::
write
(
json_encode
(
$save_data
),
'AliYunSecretReport'
);
//记录日志
}
$this
->
m_secret_report
->
insertDataAll
(
$save_data_arr
);
if
(
!
empty
(
$down_array
))
{
$this
->
m_down
->
insertAllData
(
$down_array
);
//录音下载
}
$return
=
json_encode
([
'code'
=>
0
,
'msg'
=>
'接收成功'
]);
}
catch
(
\Exception
$e
)
{
$return
=
json_encode
([
'code'
=>
""
,
'msg'
=>
$e
->
getMessage
()]);
...
...
@@ -395,6 +409,14 @@ class PrivacyNumber
$where
[
'call_id'
]
=
$params
[
'callId'
];
$update
[
'mp3_url'
]
=
$params
[
'recordUrl'
];
$this
->
m_secret_report
->
editData
(
$update
,
$params
[
'callId'
],
'call_id'
);
$down_array
=
[
'call_id'
=>
$params
[
'callId'
],
'mp3_url'
=>
$params
[
'recordUrl'
],
'type'
=>
2
,
];
$this
->
m_down
->
insertAllData
(
$down_array
);
$str
=
date
(
'Y-m-d h:i:s'
)
.
' 容联云录音'
.
var_export
(
$params
,
true
);
Log
::
write
(
$str
,
'rongRecordingInformUrl'
);
//记录日志
return
json_encode
([
"statusCode"
=>
'000000'
,
'msg'
=>
'接收成功'
]);
...
...
@@ -681,4 +703,13 @@ class PrivacyNumber
return
$return
;
}
public
function
getDownVoiceParams
()
{
$params
=
Request
::
instance
()
->
param
();
if
(
!
in_array
(
$params
[
'source'
],
[
1
,
2
]))
{
Response
::
create
([
'code'
=>
101
,
'msg'
=>
'参数错误'
],
'json'
);
}
}
}
\ No newline at end of file
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