session_id

This commit is contained in:
2025-12-04 19:14:18 +08:00
parent 65005291d9
commit a08e4ec26f

View File

@@ -206,6 +206,7 @@ namespace extend\chat\model;
}
}
$time = d();
$user = Db::name('chat_user')->where(['user_id' => self::$user_info['uid']])->find();
// 通知数据
$notice_data = [
'from_id' => self::$user_info['uid'],
@@ -271,24 +272,10 @@ namespace extend\chat\model;
$user_type = $grep['role']==1?2:1;
$str_uid = self::getUid($grep['user_id'], $user_type);
// 如果发送的是优惠券,检查这个人有没有领取过
// if($message['msg_type'] == 4 && !empty($message['coupon']) && !empty($message['chat_coupon_id'])) {
// // 查询有没有领取过优惠券
// $mk_shop_coupon_record = Db::name('mk_shop_coupon_record')->where([
// 'source' => '群聊发放',
// 'source_id ' => $message['chat_coupon_id'],
// 'user_id' => $grep['user_id'],
// 'shop_id' => $message['shop_id'],
// ])->find();
// if($mk_shop_coupon_record) {
// $notice_data['coupon_claim'] = 1;
// }else {
// $notice_data['coupon_claim'] = 0;
// }
// }
// 群成员是否在线,在线发 不在线存起来等上线了发 免打扰也不发消息
if($grep['is_dist'] == 0) {
if(Gateway::isUidOnline($str_uid)) {
$notice_data['nick'] = $user['nick_name'] . $notice_data['content'];
Gateway::sendToUid($str_uid, self::sendReceive($notice_data));
}else {
// 存消息