| xqd
@@ -323,11 +323,22 @@ class MyController extends Controller
|
|
|
*/
|
|
|
public function supInfo()
|
|
|
{
|
|
|
+// 支持消息有 7私信 8@ 9梦想倒计时 10排名 梦想结束
|
|
|
+// XX在互动上已经提起了你999次!你还不去瞧一瞧?你也太大牌啦!
|
|
|
$user = $this->getUser();
|
|
|
- $data = SystemInfoModel::with('touser')->where('user_id',$user->id)->where('type_id',2)->orderBy('id','desc')->get();
|
|
|
- foreach ($data as $item){ //访问接口 标记已读
|
|
|
- $item->update(['is_read'=>1]);
|
|
|
+ $data8 = SystemInfoModel::where('to_user_id',$user->id)->where('type_id',2)->where('attr_id',8)->orderBy('id','desc')->groupBy('interaction_id')->get()->toArray();
|
|
|
+ dd($data8);
|
|
|
+ $new_data8 = [] ;
|
|
|
+ if (count($data8) > 0) {
|
|
|
+ if (count($data8) >= 5) {
|
|
|
+ $data8[0]['message'] = "XX在互动上已经提起了你".count($data8)."次!你还不去瞧一瞧?你也太大牌啦!";
|
|
|
+ $new_data8[] = $data8[0];
|
|
|
+ }else{
|
|
|
+ $new_data8 = $data8;
|
|
|
+ }
|
|
|
}
|
|
|
+ $data = SystemInfoModel::where('user_id',$user->id)->where('type_id',2)->orderBy('id','desc')->get();
|
|
|
+ SystemInfoModel::where('to_user_id',$user->id)->where('type_id',2)->update(['is_read' => 1]);
|
|
|
return $this->api($data);
|
|
|
}
|
|
|
/**
|