wzq %!s(int64=5) %!d(string=hai) anos
pai
achega
1508cfcf45
Modificáronse 1 ficheiros con 20 adicións e 1 borrados
  1. 20 1
      app/Repositories/Post/PostRepository.php

+ 20 - 1
app/Repositories/Post/PostRepository.php

@@ -644,6 +644,8 @@ class PostRepository
             $post->is_suggest = 1;
             $post->is_suggest = 1;
         }
         }
 
 
+        $date = Carbon::now()->toDateTimeString();
+
         DB::beginTransaction();
         DB::beginTransaction();
         try {
         try {
             $post->save();
             $post->save();
@@ -656,6 +658,23 @@ class PostRepository
                 $push['title'] = '【由你内容】推荐通知';
                 $push['title'] = '【由你内容】推荐通知';
                 $push['text'] = '你的内容《'.$title.'》被小编推荐全平台优先展示喽,获得推荐位后你的内容会被更多人看到。记得多来和大家互动赚取更多U米~';
                 $push['text'] = '你的内容《'.$title.'》被小编推荐全平台优先展示喽,获得推荐位后你的内容会被更多人看到。记得多来和大家互动赚取更多U米~';
                 $rabbitmq->push('send_push_msg_queue',$push);
                 $rabbitmq->push('send_push_msg_queue',$push);
+
+                $this->rabbitMqUtil->push('add_message_one', [
+                    'uid' => $post->uid,
+                    'message_rule_id' => 0,
+                    'message_type' => 1,
+                    'message_show_type' => 'system_common',
+                    'param' => [
+                        'title' => $push['title'],
+                        'content' => $push['text'],
+                        'cover' => '',
+                        'activity_url' => 0,
+                        'activity_time' => '',
+                    ],
+                    'is_read' => 0,
+                    'created_at' => $date,
+                    'updated_at' => $date,
+                ]);
             }
             }
             return Response::create();
             return Response::create();
         } catch (QueryException $exception) {
         } catch (QueryException $exception) {
@@ -716,7 +735,7 @@ class PostRepository
                 'uid' => $uid,
                 'uid' => $uid,
                 'message_rule_id' => 0,
                 'message_rule_id' => 0,
                 'message_type' => 1,
                 'message_type' => 1,
-                'message_show_type' => 'post_delete',
+                'message_show_type' => 'system_common',
                 'param' => [
                 'param' => [
                     'title' => '内容删除',
                     'title' => '内容删除',
                     'content' => $content,
                     'content' => $content,