昵称问题

This commit is contained in:
2025-12-05 09:58:22 +08:00
parent ec61f138e6
commit e4dc67bb16
4 changed files with 10 additions and 7 deletions

View File

@@ -8,6 +8,7 @@ use app\chat\model\ChatDoNotDisturb;
use app\common\controller\ApiController;
use app\exception\MyBusinessException;
use app\utils\Session;
use ba\Random;
use support\Log;
use support\Request;
use support\Response;
@@ -122,6 +123,7 @@ class GroupController extends ApiController
Db::startTrans();
// 创建群
$group_id = Db::name('chat_group')->insertGetId([
'id' => Random::build('alnum', 32),
'name' => $name,
'shop_id' => $shop_id,
'avatar' => $avatar,

View File

@@ -214,7 +214,7 @@ class MessageController extends ApiController
}
// 未读计数
$unreadCount = Db::name('chat_unread_count')->where(['user_id' => $this->uid, 'session_id' => $session['session_id']])->value('count')?:0;
$unreadCount = Db::name('chat_unread_count')->where(['user_id' => $this->uid, 'session_id' => $session['to_id']])->value('count')?:0;
}
if($session['chat_type'] == 2) {
if($lastMsg) {