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
4ab2e94b
Commit
4ab2e94b
authored
Jun 12, 2019
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
a653d25a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
19 deletions
+36
-19
Member.php
application/index/controller/Member.php
+20
-16
MemberValidate.php
application/index/validate/MemberValidate.php
+16
-3
No files found.
application/index/controller/Member.php
View file @
4ab2e94b
...
...
@@ -10,6 +10,7 @@ use app\index\service\BrokerService;
use
app\index\service\UserService
;
use
app\model\AAgents
;
use
app\model\GOperatingRecords
;
use
app\model\OfficeUPhoneFollowUpTemporary
;
use
app\model\UPhoneFollowUp
;
use
app\model\UPhoneFollowUpTemporary
;
use
app\model\Users
;
...
...
@@ -464,35 +465,38 @@ class Member extends Basic{
/**
* 添加跟进
*
* @return \think\Response
*/
public
function
pcAddFollow
(){
$status
=
200
;
$msg
=
'成功!'
;
$params
=
$this
->
request
->
param
();
if
(
empty
(
$params
[
'content'
])
||
empty
(
$params
[
'user_id'
]))
{
return
$this
->
response
(
101
,
$msg
=
'缺少参数'
,
$params
);
$checkResult
=
$this
->
validate
(
$params
,
"MemberValidate.pcAddFollow"
);
if
(
true
!==
$checkResult
)
{
return
$this
->
response
(
101
,
$checkResult
);
}
//$params['id'] = '';
$params
[
'labels_id'
]
=
0
;
$params
[
'agent_id'
]
=
Session
::
get
(
"user_info.id"
);
$params
[
'type'
]
=
1
;
$params
[
'agent_id'
]
=
$this
->
userId
;
// $model = new UPhoneFollowUp($this->siteId);
$s_phone_follow_up
=
new
UPhoneFollowUpTemporary
(
$this
->
siteId
);
$result
=
$s_phone_follow_up
->
savePhoneFollow
(
$params
);
//$redis = RedisExt::getRedis();
//$user_key = 'call_phone_user_'.date('Y-m-d');
//$hash_key = $this->userId.'-'.$params['user_id'];
//$redis->hDel($user_key, $hash_key);
$redis_service
=
new
RedisCacheService
();
$redis_service
->
delRecordCallRedis
(
$this
->
userId
,
$params
[
'user_id'
],
$this
->
siteId
);
return
$this
->
response
(
$status
,
$msg
,
$params
);
if
(
$params
[
'entrust_type'
]
==
1
){
$model
=
new
OfficeUPhoneFollowUpTemporary
(
$this
->
siteId
);
}
else
{
$model
=
new
UPhoneFollowUpTemporary
(
$this
->
siteId
);
}
$result
=
$model
->
savePhoneFollow
(
$params
);
big_log
(
$result
);
if
(
$result
){
$redis_service
=
new
RedisCacheService
();
$redis_service
->
delRecordCallRedis
(
$this
->
userId
,
$params
[
'user_id'
],
$this
->
siteId
);
return
$this
->
response
(
200
,
'成功!'
,
$params
);
}
else
{
$redis_service
=
new
RedisCacheService
();
$redis_service
->
delRecordCallRedis
(
$this
->
userId
,
$params
[
'user_id'
],
$this
->
siteId
);
return
$this
->
response
(
200
,
'成功!'
,
$params
);
}
}
...
...
application/index/validate/MemberValidate.php
View file @
4ab2e94b
...
...
@@ -14,7 +14,7 @@ class MemberValidate extends Validate
{
protected
$regex
=
[
'phone'
=>
'/^1[23456789]{1}\d{9}$/'
];
protected
$rule
=
[
protected
$rule
=
[
//content user_id entrust_type
'agent_id_for_bind'
=>
'require|number|gt:0'
,
'user_nick'
=>
'length:0,80'
,
'user_name'
=>
'length:0,80'
,
...
...
@@ -26,6 +26,9 @@ class MemberValidate extends Validate
'source_intro'
=>
'in:0,1,2,3,4,5,6,7'
,
'user_status'
=>
'in:0,1,-1'
,
'user_label'
=>
'in:0,1,2'
,
'content'
=>
'require'
,
'user_id'
=>
'require|between:1,9999999999'
,
'entrust_type'
=>
'require|number'
,
];
protected
$message
=
[
...
...
@@ -42,11 +45,20 @@ class MemberValidate extends Validate
'source.in'
=>
'注册来源参数错误'
,
'source_intro.in'
=>
'来源简述参数错误'
,
'user_status.in'
=>
'客户状态参数错误'
,
'user_label.in'
=>
'用户标签'
'user_label.in'
=>
'用户标签'
,
'content.require'
=>
'内容不能为空'
,
'user_id.require'
=>
'user_id不能为空'
,
'user_id.between'
=>
'user_id必须在1-9999999999之间'
,
'entrust_type.require'
=>
'entrust_type不能为空'
,
'entrust_type.number'
=>
'entrust_type只能为数字'
,
];
protected
$scene
=
[
'getUserList'
=>
[
'agent_id_for_bind'
],
'add'
=>
'user_phonp,user_name,user_nick,user_pswd,sex,referrer_source,source,source_intro,user_status,user_label'
'add'
=>
'user_phonp,user_name,user_nick,user_pswd,sex,referrer_source,source,source_intro,user_status,user_label'
,
'pcAddFollow'
=>
'content,user_id,entrust_type'
];
}
\ 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