|
@@ -593,12 +593,35 @@ class PostRepository
|
|
|
'status_code' => 500
|
|
|
]);
|
|
|
}
|
|
|
+ $uid = $post->uid;
|
|
|
+ $title = $post->title;
|
|
|
+ if(!$title){
|
|
|
+ $title = subtext(strip_tags($post->content), 20);
|
|
|
+ }
|
|
|
+ $content = "经核实您的内容“{$title}”涉及违规,现已被删除,有任何问题请联系彩虹管理员";
|
|
|
|
|
|
+ $date = Carbon::now()->toDateTimeString();
|
|
|
DB::beginTransaction();
|
|
|
try {
|
|
|
$post->delete();
|
|
|
|
|
|
DB::commit();
|
|
|
+ $this->rabbitMqUtil->push('add_message_one', [
|
|
|
+ 'uid' => $uid,
|
|
|
+ 'message_rule_id' => 0,
|
|
|
+ 'message_type' => 1,
|
|
|
+ 'message_show_type' => 13,
|
|
|
+ 'param' => json_encode([
|
|
|
+ 'title' => '内容删除',
|
|
|
+ 'content' => $content,
|
|
|
+ 'cover' => '',
|
|
|
+ 'activity_url' => 0,
|
|
|
+ 'activity_time' => '',
|
|
|
+ ]),
|
|
|
+ 'is_read' => 0,
|
|
|
+ 'created_at' => $date,
|
|
|
+ 'updated_at' => $date,
|
|
|
+ ]);
|
|
|
return Response::create();
|
|
|
|
|
|
} catch (QueryException $exception) {
|