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
457b77b4
Commit
457b77b4
authored
Jun 10, 2019
by
clone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
f4a727a5
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
85 additions
and
20 deletions
+85
-20
Broker.php
application/api_broker/controller/Broker.php
+57
-0
OfficeHomePageLog.php
application/api_broker/controller/OfficeHomePageLog.php
+1
-0
BrokerValidate.php
application/api_broker/validate/BrokerValidate.php
+24
-18
route.php
application/route.php
+3
-2
No files found.
application/api_broker/controller/Broker.php
View file @
457b77b4
...
...
@@ -31,6 +31,8 @@ use app\model\Evaluate;
use
app\model\GOperatingRecords
;
use
app\model\NoteLog
;
use
app\model\OBargainModel
;
use
app\model\OfficeFollowUpLogModel
;
use
app\model\OfficeUPhoneFollowUp
;
use
app\model\SecretReport
;
use
app\model\UPhoneFollowUp
;
use
app\model\UPhoneFollowUpTemporary
;
...
...
@@ -460,6 +462,61 @@ class Broker extends Basic
}
}
/**客户电话跟进
* @return \think\Response
* @throws Exception
* @throws \think\exception\PDOException
*/
public
function
addUserPhoneFollowUpV2
()
{
$params
=
$this
->
params
;
/* $params = array(
'content' => '跟进内容',
'labels_id' => 1,//g_labels表主键
'user_id' => 1,
'agent_id' => 1,
'type' => 1,//0电话跟进 1普通跟进
'user_status' => 1,//客户状态
'entrust_type' => 1,//委托类型 0找铺 1找办公楼
);*/
$checkResult
=
$this
->
validate
(
$params
,
"BrokerValidate.add_phone_follow_up_verify"
);
if
(
true
!==
$checkResult
)
{
return
$this
->
response
(
"300"
,
$checkResult
);
}
if
(
$params
[
'agent_id'
]
!=
$this
->
agentId
)
{
return
$this
->
response
(
"101"
,
"失败!"
);
}
$user_id
=
$params
[
'user_id'
];
$user_status
=
$params
[
'user_status'
];
$entrust_type
=
$params
[
"entrust_type"
];
$Users
=
new
Users
();
$result
=
[];
if
(
$entrust_type
==
0
){
$s_phone_follow_up
=
new
UPhoneFollowUpTemporary
(
$this
->
siteId
);
$result
=
$s_phone_follow_up
->
savePhoneFollow
(
$params
);
}
else
{
$office_follow_up
=
new
OfficeUPhoneFollowUp
(
$this
->
siteId
);
$result
=
$office_follow_up
->
savePhoneFollow
(
$params
);
}
if
(
$result
>
0
)
{
//跟进,对客户状态进行更新 0:求租;1:已租;-1:无效
$Users
->
update_user_status
([
'id'
=>
$user_id
,
'user_status'
=>
$user_status
]);
$redis_service
=
new
RedisCacheService
();
$redis_service
->
delRecordCallRedis
(
$this
->
agentId
,
$params
[
'user_id'
],
$this
->
siteId
);
return
$this
->
response
(
"200"
,
"success!"
,
$result
);
}
else
{
return
$this
->
response
(
"101"
,
"失败!"
);
}
}
/**
* 客户搜索
*
...
...
application/api_broker/controller/OfficeHomePageLog.php
View file @
457b77b4
...
...
@@ -17,6 +17,7 @@ use app\model\OfficeUPhoneFollowUp;
use
app\model\ULabels
;
use
app\model\UPhoneFollowUp
;
use
app\model\UPhoneFollowUpTemporary
;
use
app\model\Users
;
use
app\search\service\SearchService
;
use
app\task\controller\FollowUpTask
;
use
think\Log
;
...
...
application/api_broker/validate/BrokerValidate.php
View file @
457b77b4
<?php
namespace
app\api_broker\validate
;
use
think\Validate
;
/**
...
...
@@ -8,32 +10,36 @@ use think\Validate;
* Date: 2018/8/3
* Time: 上午10:11
*/
class
BrokerValidate
extends
Validate
{
class
BrokerValidate
extends
Validate
{
protected
$rule
=
[
'type'
=>
'require|in:0,1,2'
,
'agent_id'
=>
'require|number|gt:0'
,
'labels_id'
=>
'number'
,
'user_id'
=>
'require|number|gt:0'
,
// 'user_status' => 'require|in:-1,0,1'
'type'
=>
'require|in:0,1,2'
,
'agent_id'
=>
'require|number|gt:0'
,
'labels_id'
=>
'number'
,
'user_id'
=>
'require|number|gt:0'
,
'entrust_type'
=>
'require|in:0,1,2'
,
// 'user_status' => 'require|in:-1,0,1'
];
protected
$message
=
[
'type.require'
=>
'网络异常,请再次提交!错误代码:bv1'
,
//type为必填字段
'type.in'
=>
'网络异常,请再次提交!错误代码:bv2'
,
//type只能0,1,2中间
'agent_id.require'
=>
'网络异常,请再次提交!错误代码:bv3'
,
//agent_id为必填字段
'agent_id.number'
=>
'网络异常,请再次提交!错误代码:bv4'
,
//agent_id只能为数字
'agent_id.gt'
=>
'网络异常,请再次提交!错误代码:bv10'
,
//agent_id必须大于0
'labels_id.number'
=>
'普通标签为必选'
,
//labels_id只能为数字
'user_id.require'
=>
'网络异常,请再次提交!错误代码:bv6'
,
//user_id为必填字段
'user_id.number'
=>
'网络异常,请再次提交!错误代码:bv7'
,
//user_id只能为数字
'user_id.gt'
=>
'网络异常,请再次提交!错误代码:bv11'
,
//user_id必须大于0
// 'user_status.require' => '状态标签为必选',//user_status为必填字段
// 'user_status.number' => '状态标签为必选'//user_status只能为数字
'type.require'
=>
'网络异常,请再次提交!错误代码:bv1'
,
//type为必填字段
'type.in'
=>
'网络异常,请再次提交!错误代码:bv2'
,
//type只能0,1,2中间
'agent_id.require'
=>
'网络异常,请再次提交!错误代码:bv3'
,
//agent_id为必填字段
'agent_id.number'
=>
'网络异常,请再次提交!错误代码:bv4'
,
//agent_id只能为数字
'agent_id.gt'
=>
'网络异常,请再次提交!错误代码:bv10'
,
//agent_id必须大于0
'labels_id.number'
=>
'普通标签为必选'
,
//labels_id只能为数字
'user_id.require'
=>
'网络异常,请再次提交!错误代码:bv6'
,
//user_id为必填字段
'user_id.number'
=>
'网络异常,请再次提交!错误代码:bv7'
,
//user_id只能为数字
'user_id.gt'
=>
'网络异常,请再次提交!错误代码:bv11'
,
//user_id必须大于0
// 'user_status.require' => '状态标签为必选',//user_status为必填字段
// 'user_status.number' => '状态标签为必选'//user_status只能为数字
'entrust_type.require'
=>
'客户找铺类型不能为空'
,
//type为必填字段
'entrust_type.in'
=>
'客户找铺类型错误'
,
//type只能0,1,2中间
];
protected
$scene
=
[
// 'add_phone_follow_up_verify' => [ 'labels_id', 'user_id', 'agent_id', 'user_status', 'type' ],
'add_phone_follow_up_verify'
=>
[
'labels_id'
,
'user_id'
,
'agent_id'
,
'type'
],
'add_phone_follow_up_verify'
=>
[
'labels_id'
,
'user_id'
,
'agent_id'
,
'type'
,
'entrust_type'
],
];
}
application/route.php
View file @
457b77b4
...
...
@@ -714,6 +714,7 @@ Route::group('broker', [
'getLabelsList'
=>
[
'api_broker/label/getLabelsList'
,
[
'method'
=>
'get'
]],
//标签列表
'add_phone_follow_up'
=>
[
'api_broker/broker/add_phone_follow_up'
,
[
'method'
=>
'get|post'
]],
//新增-客户电话跟进
'addUserPhoneFollowUp'
=>
[
'api_broker/broker/addUserPhoneFollowUp'
,
[
'method'
=>
'get|post'
]],
//新增-客户电话跟进
'addUserPhoneFollowUpV2'
=>
[
'api_broker/broker/addUserPhoneFollowUpV2'
,
[
'method'
=>
'get|post'
]],
//新增-客户电话跟进
'useraction_search'
=>
[
'api_broker/broker/useraction_search'
,
[
'method'
=>
'get|post'
]],
//客户电话跟进
'vip'
=>
[
'api_broker/broker/vip'
,
[
'method'
=>
'get|post'
]],
'userStateSearch'
=>
[
'api_broker/broker/userStateSearch'
,
[
'method'
=>
'get|post'
]],
//新增-客户电话跟进
...
...
@@ -1003,8 +1004,8 @@ Route::group('office', [
'bargainMain'
=>
[
'api_broker/OfficeBargain/bargainList'
,
[
'method'
=>
'POST|GET'
]],
'bargainMainV2'
=>
[
'api_broker/OfficeBargain/bargainListV2'
,
[
'method'
=>
'POST|GET'
]],
'userFollowUpList'
=>
[
'api_broker/OfficeHomePageLog/userFollowUpList'
,
[
'method'
=>
'POST|GET'
]],
'houseFollowUpList'
=>
[
'api_broker/OfficeHomePageLog/houseFollowUpList'
,
[
'method'
=>
'POST|GET'
]],
'userFollowUpList'
=>
[
'api_broker/OfficeHomePageLog/userFollowUpList'
,
[
'method'
=>
'POST|GET'
]],
'houseFollowUpList'
=>
[
'api_broker/OfficeHomePageLog/houseFollowUpList'
,
[
'method'
=>
'POST|GET'
]],
]);
Route
::
group
(
'office_index'
,
[
...
...
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