gq 7 years ago
parent
commit
5cae0fa3ae

+ 1 - 1
server/app/Http/Controllers/Api/V1/DreamController.php

@@ -438,7 +438,7 @@ class DreamController extends Controller
             $dream->mark += $coin*$number;
             $dream->mark += $coin*$number;
             $dream->save();
             $dream->save();
 //            在支持梦想时 如果梦主排名配取代时发送系统消息
 //            在支持梦想时 如果梦主排名配取代时发送系统消息
-//            $this->systemInfo($dream->id,$user->id,$old_top_user_id);
+            $this->systemInfo($dream->id,$user->id,$old_top_user_id);
 
 
 
 
             //            梦想实现创建二维码
             //            梦想实现创建二维码

+ 7 - 0
server/app/Http/Controllers/Api/V1/MyController.php

@@ -329,6 +329,13 @@ class MyController extends Controller
         $data8  =  SystemInfoModel::where('to_user_id',$user->id)->where('type_id',2)->where('attr_id',8)->orderBy('id','desc')->get()->toArray();
         $data8  =  SystemInfoModel::where('to_user_id',$user->id)->where('type_id',2)->where('attr_id',8)->orderBy('id','desc')->get()->toArray();
 //        计算interaction_id出现的次数
 //        计算interaction_id出现的次数
         $count = array_count_values(array_column($data8,"interaction_id"));
         $count = array_count_values(array_column($data8,"interaction_id"));
+        if (!empty($count)) {
+            foreach ($count as $interaction_id => $value) {
+                if ($value>=5) {
+                    $interaction = InteractionInfo::find($interaction_id);
+                }
+            }
+        }
         dd($count);
         dd($count);
         $new_data8 = [] ;
         $new_data8 = [] ;
         if (count($data8) > 0) {
         if (count($data8) > 0) {