| xqd
@@ -334,7 +334,12 @@ class MyController extends Controller
|
|
|
foreach ($count as $interaction_id => $value) {
|
|
|
$interaction = InteractionInfo::find($interaction_id);
|
|
|
$dream_id = empty($interaction) ? '0':$interaction->dream_id;
|
|
|
+ if ($value>=5) {
|
|
|
$message =empty($interaction) ? '': $interaction->title."互动上已经提起了你".($value)."次!你还不去瞧一瞧?你也太大牌啦!";
|
|
|
+ }else{
|
|
|
+ $message =empty($interaction) ? '': $interaction->title."提起了你哦~点击看看!";
|
|
|
+ }
|
|
|
+ if (!empty($message)) {
|
|
|
$new_data8[] = [
|
|
|
'dream_id'=>$dream_id,
|
|
|
'interaction_id'=>$interaction_id,
|
| xqd
@@ -347,9 +352,9 @@ class MyController extends Controller
|
|
|
"is_url" => 0,
|
|
|
"type_id" => 2,
|
|
|
];
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
-// dd($new_data8);
|
|
|
$data9 = SystemInfoModel::where('to_user_id',$user->id)->where('type_id',2)->where('attr_id','!=',8)->orderBy('id','desc')->get()->toArray();
|
|
|
$data = array_merge($new_data8,$data9);
|
|
|
SystemInfoModel::where('to_user_id',$user->id)->where('type_id',2)->update(['is_read' => 1]);
|
| xqd
@@ -378,10 +383,8 @@ class MyController extends Controller
|
|
|
public function systemInfo()
|
|
|
{
|
|
|
$user = $this->getUser();
|
|
|
- $data = SystemInfoModel::where('user_id',$user->id)->where('type_id',0)->orderBy('id','desc')->get();
|
|
|
- foreach ($data as $item){ //访问接口 标记已读
|
|
|
- $item->update(['is_read'=>1]);
|
|
|
- }
|
|
|
+ $data = SystemInfoModel::where('to_user_id',$user->id)->where('type_id',0)->orderBy('id','desc')->get()->toArray();
|
|
|
+ SystemInfoModel::where('to_user_id',$user->id)->where('type_id',0)->update(['is_read' => 1]);
|
|
|
return $this->api($data);
|
|
|
}
|
|
|
|