refactor(zy): 修改消息通知的类型和功能
This commit is contained in:
@@ -223,20 +223,20 @@ class Club extends Base
|
||||
'reason' => $params['reason'],
|
||||
'status' => 1
|
||||
]);
|
||||
(new Message())->allowField(true)->save([ // 消息通知
|
||||
'type' => 3,
|
||||
'name' => $club->name,
|
||||
'avatar' => $club->logo,
|
||||
'from_id' => $club->id,
|
||||
'content' => json_encode([
|
||||
'topic' => '俱乐部加入申请',
|
||||
'俱乐部名称' => $club->name,
|
||||
'申请人' => $this->user->nickname,
|
||||
'申请时间' => date('Y-m-d H:i:s'),
|
||||
'reason' => $params['reason'] ?? '',
|
||||
'apply_id' => $apply->id
|
||||
])
|
||||
]);
|
||||
// (new Message())->allowField(true)->save([ // 消息通知
|
||||
// 'type' => 3,
|
||||
// 'name' => $club->name,
|
||||
// 'avatar' => $club->logo,
|
||||
// 'from_id' => $club->id,
|
||||
// 'content' => json_encode([
|
||||
// 'topic' => '俱乐部加入申请',
|
||||
// '俱乐部名称' => $club->name,
|
||||
// '申请人' => $this->user->nickname,
|
||||
// '申请时间' => date('Y-m-d H:i:s'),
|
||||
// 'reason' => $params['reason'] ?? '',
|
||||
// 'apply_id' => $apply->id
|
||||
// ])
|
||||
// ]);
|
||||
}
|
||||
Db::commit();
|
||||
} catch (ValidateException | PDOException | Exception $e) {
|
||||
@@ -296,20 +296,20 @@ class Club extends Base
|
||||
'reason' => $params['reason'],
|
||||
'status' => 1
|
||||
]);
|
||||
(new Message())->allowField(true)->save([ // 消息通知
|
||||
'type' => 3,
|
||||
'name' => $club->name,
|
||||
'avatar' => $club->logo,
|
||||
'from_id' => $club->id,
|
||||
'content' => json_encode([
|
||||
'topic' => '俱乐部加入申请',
|
||||
'俱乐部名称' => $club->name,
|
||||
'申请人' => $user->nickname,
|
||||
'申请时间' => date('Y-m-d H:i:s'),
|
||||
'reason' => $params['reason'] ?? '',
|
||||
'apply_id' => $apply->id,
|
||||
])
|
||||
]);
|
||||
// (new Message())->allowField(true)->save([ // 消息通知
|
||||
// 'type' => 3,
|
||||
// 'name' => $club->name,
|
||||
// 'avatar' => $club->logo,
|
||||
// 'from_id' => $club->id,
|
||||
// 'content' => json_encode([
|
||||
// 'topic' => '俱乐部加入申请',
|
||||
// '俱乐部名称' => $club->name,
|
||||
// '申请人' => $user->nickname,
|
||||
// '申请时间' => date('Y-m-d H:i:s'),
|
||||
// 'reason' => $params['reason'] ?? '',
|
||||
// 'apply_id' => $apply->id,
|
||||
// ])
|
||||
// ]);
|
||||
}
|
||||
Db::commit();
|
||||
} catch (ValidateException | PDOException | Exception $e) {
|
||||
|
||||
Reference in New Issue
Block a user