|
@@ -731,16 +731,35 @@ where bid in (%s) and is_on_shelf =2 ORDER by field(book_configs.bid,%s)',$bids
|
|
|
$uv = Redis::scard(strtolower($group).'_guide_personal_uv');
|
|
|
if(!$max_uv) $max_uv = 100;
|
|
|
if($uv >= $max_uv) {
|
|
|
+ //名额不足
|
|
|
$data = ['code'=>-1,'read_url'=>'/continue'];
|
|
|
return view('',$data);
|
|
|
}
|
|
|
- $get_info = UserBindHkWelfareService::isHasGet($this->uid);
|
|
|
- if($get_info) {
|
|
|
- $data = ['code'=>-2,'read_url'=>'/continue'];
|
|
|
- return view('',$data);
|
|
|
+ $sql = 'SELECT friend_link_uid_bind.uid FROM friend_link_uid_bind where openid = (SELECT openid FROM users WHERE id = %s) ORDER by id desc limit 1';
|
|
|
+ $friend_link_uid_bind = DB::select(sprintf($sql,$this->uid));
|
|
|
+ //$get_info = UserBindHkWelfareService::isHasGet($this->uid);
|
|
|
+ if($friend_link_uid_bind) {
|
|
|
+ $info = DB::table('ad_pdd')->where('uid',$friend_link_uid_bind[0]->uid)->orderBy('id','desc')->first();
|
|
|
+ if($info){
|
|
|
+ $personal_account_id = preg_replace('/\D+/','',$info->img);
|
|
|
+ if($info){
|
|
|
+ $personal_info = DB::table('personal_account_list')
|
|
|
+ ->where('id',$personal_account_id)
|
|
|
+ ->where('is_enable',1)
|
|
|
+ ->select('name','url','status','is_enable')->first();
|
|
|
+ $user_info = UserService::getById($friend_link_uid_bind[0]->uid);
|
|
|
+ $link = sprintf('https://site%s.leyuee.com',encodeDistributionChannelId($user_info->distribution_channel_id));
|
|
|
+ if($personal_info){
|
|
|
+ $data = ['code'=>-2,'name'=>$personal_info->name,'read_url'=>$link.'/guidestrem?uid='.$this->uid.'&name='.$personal_info->name.'&img='.urlencode($personal_info->url)];
|
|
|
+ return view('crm.crmPush',$data);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ $data = ['code'=>-3,'read_url'=>'/guidestrem?uid='.$this->uid.'&fee=500','name'=>''];
|
|
|
+ return view('crm.crmPush',$data);
|
|
|
}else{
|
|
|
- $data = ['code'=>-3,'read_url'=>'/continue'];
|
|
|
- return view('',$data);
|
|
|
+ $data = ['code'=>0,'read_url'=>'/guidestrem?uid='.$this->uid.'&fee=500','name'=>''];
|
|
|
+ return view('crm.crmPush',$data);
|
|
|
}
|
|
|
}
|
|
|
|