加群处理

This commit is contained in:
2025-12-05 18:24:33 +08:00
parent 66de463881
commit 3cb634d663
2 changed files with 3 additions and 0 deletions

View File

@@ -217,6 +217,7 @@ class GroupController extends ApiController
}
Db::commit();
if($res) {
Redis::del('usermsg:list:' . $this->user_type . ':' . $this->uid);
return $this->success();
}else {
return $this->error();

View File

@@ -4,6 +4,7 @@ namespace app\chat\model;
use ba\Random;
use support\Log;
use support\Redis;
use support\think\Db;
class ChatGroup extends BaseModel
@@ -60,6 +61,7 @@ class ChatGroup extends BaseModel
'join_time' => $now,
]);
$user = Db::name('chat_user')->where(['user_id' => $shop_id])->find();
Redis::del('usermsg:list:' . 2 . ':' . $shop_id);
if(!$user) {
$res = Db::name('chat_user')->insert([
'user_id' => $shop_id,