邀请加入公会功能--受邀申请处理

This commit is contained in:
2025-11-21 11:15:16 +08:00
parent afb6ee48f7
commit 81897a34b4
4 changed files with 138 additions and 6 deletions

View File

@@ -43,19 +43,19 @@ class UserMessage extends Model
{
//获取系统消息
$system_message = db::name('system_message')
->where('type', 1)//1系统消息 3公告下的房间推荐4公告下的活动'
->where(['type'=>[1, 6]])//1系统消息 3公告下的房间推荐4公告下的活动' 6工会邀请
->where('FIND_IN_SET(:user_id, receiving_id)', ['user_id' => $uid])
->count();
//自己已经阅读过的信息
$user_read_message = db::name('user_message')
->where(['user_id' => $uid,'type' => 1])
->where(['user_id' => $uid,'type' => [1, 6]])
->count();
$system_no_read_count = $system_message - $user_read_message;
$system_last_message = db::name('system_message')
->field('id,type,title,content,url')
->where('type', 1)//1系统消息 3公告下的房间推荐4公告下的活动'
->where('type', [1, 6])//1系统消息 3公告下的房间推荐4公告下的活动' 6工会邀请
->where('FIND_IN_SET(:user_id, receiving_id)', ['user_id' => $uid])
->order('id desc')
->find() ?? null;
@@ -104,7 +104,7 @@ class UserMessage extends Model
if($type == 1){
$where['type'] = ['in' , [1, 5, 6]];
$where['type'] = ['in' , [1, 6]];
}else{
$where['type'] = ['in' , [3, 4]];
}