邀请加入公会功能--受邀申请处理
This commit is contained in:
@@ -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]];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user