会话列表 edit
This commit is contained in:
@@ -234,13 +234,13 @@ class MessageController extends ApiController
|
|||||||
$list_json = Redis::get('usermsg:list:' . $this->user_type . ':' . $this->uid);
|
$list_json = Redis::get('usermsg:list:' . $this->user_type . ':' . $this->uid);
|
||||||
if($list_json) {
|
if($list_json) {
|
||||||
$list_arr = json_decode($list_json, true);
|
$list_arr = json_decode($list_json, true);
|
||||||
foreach ($list_arr as $k => $list) {
|
foreach ($list_arr as $k => &$list) {
|
||||||
if($list['session_id'] == $session_id) {
|
if($list['session_id'] == $session_id) {
|
||||||
$list['id_del'] = 1;
|
$list['is_del'] = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(count($list_arr) >= 1) {
|
if(count($list_arr) >= 1) {
|
||||||
Redis::setEx('usermsg:list:' . $this->user_type . ':' . $this->uid, 30 * 86400, json_encode($list_arr));
|
Redis::set('usermsg:list:' . $this->user_type . ':' . $this->uid, json_encode($list_arr));
|
||||||
}else {
|
}else {
|
||||||
Redis::del('usermsg:list:' . $this->user_type . ':' . $this->uid);
|
Redis::del('usermsg:list:' . $this->user_type . ':' . $this->uid);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user