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
a5fd799c
Commit
a5fd799c
authored
Apr 10, 2019
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
// 优化
parent
9dec1ae8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
36 additions
and
12 deletions
+36
-12
Broker.php
application/api_broker/controller/Broker.php
+14
-8
RedisCacheService.php
application/api_broker/service/RedisCacheService.php
+16
-0
Member.php
application/index/controller/Member.php
+6
-4
No files found.
application/api_broker/controller/Broker.php
View file @
a5fd799c
...
@@ -16,6 +16,7 @@ use app\api_broker\service\BrokerService;
...
@@ -16,6 +16,7 @@ use app\api_broker\service\BrokerService;
use
app\api_broker\service\CallPhoneService
;
use
app\api_broker\service\CallPhoneService
;
use
app\api_broker\service\ClientService
;
use
app\api_broker\service\ClientService
;
use
app\api_broker\service\OrderLogService
;
use
app\api_broker\service\OrderLogService
;
use
app\api_broker\service\RedisCacheService
;
use
app\api_broker\service\VipService
;
use
app\api_broker\service\VipService
;
use
app\extra\RedisExt
;
use
app\extra\RedisExt
;
use
app\index\service\UserService
;
use
app\index\service\UserService
;
...
@@ -394,10 +395,13 @@ class Broker extends Basic
...
@@ -394,10 +395,13 @@ class Broker extends Basic
//跟进,对客户状态进行更新 0:求租;1:已租;-1:无效
//跟进,对客户状态进行更新 0:求租;1:已租;-1:无效
$Users
->
update_user_status
([
'id'
=>
$user_id
,
'user_status'
=>
$user_status
]);
$Users
->
update_user_status
([
'id'
=>
$user_id
,
'user_status'
=>
$user_status
]);
$redis
=
RedisExt
::
getRedis
();
// $redis = RedisExt::getRedis();
$user_key
=
'call_phone_user_'
.
date
(
'Y-m-d'
);
// $user_key = 'call_phone_user_' . date('Y-m-d');
$hash_key
=
$this
->
agentId
.
'-'
.
$params
[
'user_id'
]
.
'-'
.
$this
->
siteId
;
// $hash_key = $this->agentId . '-' . $params['user_id'].'-'.$this->siteId;
$redis
->
hDel
(
$user_key
,
$hash_key
);
// $redis->hDel($user_key, $hash_key);
$redis_service
=
new
RedisCacheService
();
$redis_service
->
delRecordCallRedis
(
$this
->
agentId
,
$params
[
'user_id'
],
$this
->
siteId
);
return
$this
->
response
(
"200"
,
"success!"
,
$result
);
return
$this
->
response
(
"200"
,
"success!"
,
$result
);
}
else
{
}
else
{
return
$this
->
response
(
"101"
,
"失败!"
);
return
$this
->
response
(
"101"
,
"失败!"
);
...
@@ -441,10 +445,12 @@ class Broker extends Basic
...
@@ -441,10 +445,12 @@ class Broker extends Basic
//跟进,对客户状态进行更新 0:求租;1:已租;-1:无效
//跟进,对客户状态进行更新 0:求租;1:已租;-1:无效
$Users
->
update_user_status
([
'id'
=>
$user_id
,
'user_status'
=>
$user_status
]);
$Users
->
update_user_status
([
'id'
=>
$user_id
,
'user_status'
=>
$user_status
]);
$redis
=
RedisExt
::
getRedis
();
// $redis = RedisExt::getRedis();
$user_key
=
'call_phone_user_'
.
date
(
'Y-m-d'
);
// $user_key = 'call_phone_user_' . date('Y-m-d');
$hash_key
=
$this
->
agentId
.
'-'
.
$params
[
'user_id'
]
.
'-'
.
$this
->
siteId
;
// $hash_key = $this->agentId . '-' . $params['user_id'].'-'.$this->siteId;
$redis
->
hDel
(
$user_key
,
$hash_key
);
// $redis->hDel($user_key, $hash_key);
$redis_service
=
new
RedisCacheService
();
$redis_service
->
delRecordCallRedis
(
$this
->
agentId
,
$params
[
'user_id'
],
$this
->
siteId
);
return
$this
->
response
(
"200"
,
"success!"
,
$result
);
return
$this
->
response
(
"200"
,
"success!"
,
$result
);
}
else
{
}
else
{
return
$this
->
response
(
"101"
,
"失败!"
);
return
$this
->
response
(
"101"
,
"失败!"
);
...
...
application/api_broker/service/RedisCacheService.php
View file @
a5fd799c
...
@@ -311,4 +311,19 @@ class RedisCacheService
...
@@ -311,4 +311,19 @@ class RedisCacheService
}
}
return
$result
;
return
$result
;
}
}
/**
* 删除拨打缓存
*
* @param $agent_id
* @param $user_id
* @param $site_id
* @return mixed
*/
public
function
delRecordCallRedis
(
$agent_id
,
$user_id
,
$site_id
)
{
$user_key
=
'call_phone_user_'
.
date
(
'Y-m-d'
);
$hash_key
=
$agent_id
.
'-'
.
$user_id
.
'-'
.
$site_id
;
return
$this
->
redis_ext
->
hDel
(
$user_key
,
$hash_key
);
}
}
}
\ No newline at end of file
application/index/controller/Member.php
View file @
a5fd799c
...
@@ -473,10 +473,12 @@ class Member extends Basic{
...
@@ -473,10 +473,12 @@ class Member extends Basic{
$user
=
new
Users
();
$user
=
new
Users
();
$user
->
update_user_status
([
'id'
=>
$params
[
'user_id'
],
'user_status'
=>
$params
[
'user_status'
]]);
$user
->
update_user_status
([
'id'
=>
$params
[
'user_id'
],
'user_status'
=>
$params
[
'user_status'
]]);
$redis
=
RedisExt
::
getRedis
();
// $redis = RedisExt::getRedis();
$user_key
=
'call_phone_user_'
.
date
(
'Y-m-d'
);
// $user_key = 'call_phone_user_'.date('Y-m-d');
$hash_key
=
$this
->
userId
.
'-'
.
$params
[
'user_id'
];
// $hash_key = $this->userId.'-'.$params['user_id'];
$redis
->
hDel
(
$user_key
,
$hash_key
);
// $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
);
return
$this
->
response
(
$status
,
$msg
,
$params
);
}
}
...
...
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