| xqd
@@ -24,14 +24,14 @@ class NoticeService
|
|
|
$query = UserLikeModel::query();
|
|
|
if($param['type']==1){
|
|
|
//我喜欢
|
|
|
- $query = $query->with(['like_users'=>function($query){
|
|
|
+ $query = $query->with(['like_user'=>function($query){
|
|
|
$query->select('id','sex','is_vip','tencent_im_user_id');
|
|
|
- },'like_users_info'])->where('user_id',$param['user_id']);
|
|
|
+ },'like_user_info'])->where('user_id',$param['user_id']);
|
|
|
}else{
|
|
|
//喜欢我
|
|
|
- $query = $query->with(['users'=>function($query){
|
|
|
+ $query = $query->with(['user'=>function($query){
|
|
|
$query->select('id','sex','is_vip','tencent_im_user_id');
|
|
|
- },'users_info'])->where('like_id',$param['user_id']);
|
|
|
+ },'user_info'])->where('like_id',$param['user_id']);
|
|
|
|
|
|
//清除喜欢我未读状态
|
|
|
UserLikeModel::query()->where(['like_id'=>$param['user_id'],'status'=>0])->update(['status'=>1]);
|
| xqd
@@ -56,9 +56,9 @@ class NoticeService
|
|
|
//我赞了他
|
|
|
$query = $query->with(['dynamic'=>function($query){
|
|
|
$query->select('id','content','img_url');
|
|
|
- },'dynamic.users'=>function($querty){
|
|
|
+ },'dynamic.user'=>function($querty){
|
|
|
$querty->select('id','sex','is_vip','tencent_im_user_id');
|
|
|
- },'dynamic.users_info'])
|
|
|
+ },'dynamic.user_info'])
|
|
|
->where('user_id',$param['user_id']);
|
|
|
}else{
|
|
|
//他赞了我
|