Commit 45105c35 authored by 734642908@qq.com's avatar 734642908@qq.com

测试激活码

parent a84f8a14
......@@ -384,37 +384,53 @@ class FlushController extends BaseController
}
public function alal() {
$cache = S(C('REDIS'));
// $cache = S(C('REDIS'));
// $userInfo = $cache->get("huanlenongchangzhu-weixin:upData:159404922:upKey");
// var_dump(json_decode($userInfo,true));
// var_dump($userInfo['superTotalNum']);
// var_dump($userInfo);
// var_dump(json_decode($userInfo,true));
$re = M("game_config","",C("LEWAN_HEZI"))->query("delete FROM `game_config` WHERE game_code='fengkuangguaishouche-weixin' and sysid=567");
// $reArr = array();
// $total = 0;
// $setCacheKey = "game_login_live:2019-04-03";
// $hashArr = $cache->HGETALL($setCacheKey);
// foreach($hashArr as $key=>$val) {
// $shareInfo = json_decode($val,true);
// $shareInfo['total_register'] = $cache->PFCOUNT('{total}:total_register:'.$key.':2019-04-03');
// $cache->HMSET('game_login_live_temp:2019-04-03',array($key=>json_encode($shareInfo)));
// $re = M("game_config","",C("LEWAN_HEZI"))->query("delete FROM `game_config` WHERE game_code='fengkuangguaishouche-weixin' and sysid=567");
// $listKey = $gameCode.':rankingList:'.$gameSort;
// if(strstr($key,'yiqiqieshuiguo-weixin') !== false) {
// $keyArr = explode(':',$key);
// $reArr[$keyArr[1]] += $cache->PFCOUNT('{total}:total_register:'.$key.':2019-04-03');
// $total += $cache->PFCOUNT('{total}:total_register:'.$key.':2019-04-03');
// $cache->set('huanlenongchangzhu:giftOrder',json_encode([23434,43546]),86400);
set_time_limit(0);
//返回随机数
function cdkey($mylen=6){
$array="123456789";
$arrayen="abcdefghijklmnopqrstuvwxyz";
$arrayEn="ABCDEFGHIJKLMNOPQRSTUVWXYZ";
$authnum = '';
for($i=0;$i<$mylen;$i++){
// $authnum .= substr($array,mt_rand(0,8),1).substr($arrayen,mt_rand(0,25),1).substr($arrayEn,mt_rand(0,25),1);
$authnum .= $array[mt_rand(0,8)].$arrayen[mt_rand(0,25)].$arrayEn[mt_rand(0,25)];
}
return $authnum;
}
// }
// }
// var_dump($total);echo '<br>';
var_dump($re);
$model = M("game_redeem_code","",C("LEWAN_HEZI"));
$data = array(
'type'=>1
,'create_time'=>date('Y-m-d H:i:s')
,'game_code'=>'wowtongyouxi-weixin'
);
for($i=0;$i<100000;$i++) {
// echo cdkey()."<br>";
$data['code'] = cdkey();
$insertArr[] = $data;
if (count($insertArr) > 1000) {
$model->addAll($insertArr);
$insertArr = array();
}
}
if(!empty($insertArr)) {
$model->addAll($insertArr);
}
exit;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment