加群处理
This commit is contained in:
@@ -217,6 +217,7 @@ class GroupController extends ApiController
|
|||||||
}
|
}
|
||||||
Db::commit();
|
Db::commit();
|
||||||
if($res) {
|
if($res) {
|
||||||
|
Redis::del('usermsg:list:' . $this->user_type . ':' . $this->uid);
|
||||||
return $this->success();
|
return $this->success();
|
||||||
}else {
|
}else {
|
||||||
return $this->error();
|
return $this->error();
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ namespace app\chat\model;
|
|||||||
|
|
||||||
use ba\Random;
|
use ba\Random;
|
||||||
use support\Log;
|
use support\Log;
|
||||||
|
use support\Redis;
|
||||||
use support\think\Db;
|
use support\think\Db;
|
||||||
|
|
||||||
class ChatGroup extends BaseModel
|
class ChatGroup extends BaseModel
|
||||||
@@ -60,6 +61,7 @@ class ChatGroup extends BaseModel
|
|||||||
'join_time' => $now,
|
'join_time' => $now,
|
||||||
]);
|
]);
|
||||||
$user = Db::name('chat_user')->where(['user_id' => $shop_id])->find();
|
$user = Db::name('chat_user')->where(['user_id' => $shop_id])->find();
|
||||||
|
Redis::del('usermsg:list:' . 2 . ':' . $shop_id);
|
||||||
if(!$user) {
|
if(!$user) {
|
||||||
$res = Db::name('chat_user')->insert([
|
$res = Db::name('chat_user')->insert([
|
||||||
'user_id' => $shop_id,
|
'user_id' => $shop_id,
|
||||||
|
|||||||
Reference in New Issue
Block a user