|
@@ -312,9 +312,14 @@ class CoflController extends Controller
|
|
|
$inner_channels = Channel::join('channel_users','channel_users.id','=','distribution_channels.channel_user_id')
|
|
|
->select('distribution_channels.id')
|
|
|
->whereIn('channel_users.id',explode(',',redisEnv('PROMOTION_GROUP_CHANNEL_USER_ID')))
|
|
|
- ->get()
|
|
|
- ->pluck('id')
|
|
|
- ->toArray();
|
|
|
+ ->get();
|
|
|
+ \Log::info('$inner_channels:'.json_encode($inner_channels));
|
|
|
+ if(!$inner_channels->isEmpty()){
|
|
|
+ $inner_channels=$inner_channels->pluck('id')->toArray();
|
|
|
+ }else{
|
|
|
+ $inner_channels=[];
|
|
|
+ }
|
|
|
+
|
|
|
//\Log::info($inner_channels);
|
|
|
$users = User::where('openid',$openid)->select('id','distribution_channel_id')->get();
|
|
|
\Log::info('users:openid:'.$openid);
|