|
@@ -102,17 +102,23 @@ class CoflController extends Controller
|
|
|
}elseif($uri == 'wfreecurrency'){
|
|
|
$fee = 200;
|
|
|
$type = 'WCRM';
|
|
|
+ }elseif ($uri == 'frocefreethrhcurrency'){
|
|
|
+ $fee = 200;
|
|
|
+ $type = 'CRM_FORCE';
|
|
|
}
|
|
|
else{
|
|
|
$this->stats('reward_200',$crm);
|
|
|
$fee = $this->freeCurrencyFee($token,$rfee);
|
|
|
}
|
|
|
+
|
|
|
$user = $this->getUsers($openid);
|
|
|
if(!$user || !$user[0] || !$user[1]) return redirect()->to($this->getLink().'?'.http_build_query($params));
|
|
|
|
|
|
if($type == 'CRM'){
|
|
|
$this->statsDetail($user[0],'reward',0);
|
|
|
- }else{
|
|
|
+ }elseif ($type == 'CRM_FORCE'){
|
|
|
+ $this->statsDetail($user[0],'forcereward',0);
|
|
|
+ } else{
|
|
|
$this->statsDetail($user[0],'wreward',0);
|
|
|
}
|
|
|
$get_free_currency = UserBindHkWelfareService::isHasGet($user[0]);
|
|
@@ -532,12 +538,14 @@ class CoflController extends Controller
|
|
|
public function guidePersonalAccount(Request $request,$channel_id){
|
|
|
$uid = $request->get('uid',0);
|
|
|
|
|
|
- $env_config = redisEnvMulti('GUIDE_PERSONAL_ACCOUNT_OURS_QRCODE','GUIDE_PERSONAL_ACCOUNT_MAX_USER','GUIDE_PERSONAL_ACCOUNT_ID','GUIDE_PERSONAL_ACCOUNT_ONE_LOOP_MAX_USER');
|
|
|
+ $env_config = redisEnvMulti('ACTIVE_GUIDE_PERSONAL_ACCOUNT_OURS_QRCODE',
|
|
|
+ 'ACTIVE_GUIDE_PERSONAL_ACCOUNT_MAX_UV','ACTIVE_GUIDE_PERSONAL_ACCOUNT_ID',
|
|
|
+ 'ACTIVE_GUIDE_PERSONAL_ACCOUNT_MAX_EVERY_UV');
|
|
|
$img = empty($env_config[0])?'https://cdn-novel.iycdm.com/h5/personal_account/chenchen.jpg':$env_config[0];
|
|
|
$max = empty($env_config[1])?100:$env_config[1];
|
|
|
$one_loop_max = empty($env_config[3])?10:$env_config[3];
|
|
|
$now_id = (int)$env_config[2];
|
|
|
- $uv = Redis::scard('guide_personal_uv');
|
|
|
+ $uv = Redis::scard('active_guide_personal_uv');
|
|
|
$personal_info = DB::table('personal_account_list')->where('id',$now_id)->select('count')->first();
|
|
|
$total_max = $personal_info->count+$uv;
|
|
|
//Log::info('$total_max is: '.);
|
|
@@ -558,11 +566,12 @@ class CoflController extends Controller
|
|
|
->where('is_enable',1)
|
|
|
->whereIn('status',[1,0])
|
|
|
->select('id','url')
|
|
|
+ ->where('group','ACTIVE')
|
|
|
->where('count','<',$max)
|
|
|
->orderBy('count','asc')
|
|
|
->orderBy('id')
|
|
|
->first();
|
|
|
- Redis::del('guide_personal_uv');
|
|
|
+ Redis::del('active_guide_personal_uv');
|
|
|
if($account){
|
|
|
DB::table('personal_account_list')->where('id',$account->id)->update([
|
|
|
'status'=>1,
|
|
@@ -570,13 +579,13 @@ class CoflController extends Controller
|
|
|
]);
|
|
|
$img = $account->url;
|
|
|
$now_id = $account->id;
|
|
|
- Redis::Hmset('env','GUIDE_PERSONAL_ACCOUNT_OURS_QRCODE',$account->url,'GUIDE_PERSONAL_ACCOUNT_ID',$account->id);
|
|
|
+ Redis::Hmset('env','ACTIVE_GUIDE_PERSONAL_ACCOUNT_OURS_QRCODE',$account->url,'ACTIVE_GUIDE_PERSONAL_ACCOUNT_ID',$account->id);
|
|
|
}else{
|
|
|
- Redis::Hmset('env','GUIDE_PERSONAL_ACCOUNT_OURS_QRCODE','','GUIDE_PERSONAL_ACCOUNT_ID','');
|
|
|
+ Redis::Hmset('env','ACTIVE_GUIDE_PERSONAL_ACCOUNT_OURS_QRCODE','','ACTIVE_GUIDE_PERSONAL_ACCOUNT_ID','');
|
|
|
return back();
|
|
|
}
|
|
|
}
|
|
|
- Redis::sadd('guide_personal_uv',$uid);
|
|
|
+ Redis::sadd('active_guide_personal_uv',$uid);
|
|
|
|
|
|
if($uid){
|
|
|
DB::table('ad_pdd')->insert([
|