|
@@ -468,7 +468,7 @@ class Timedtask
|
|
|
|
|
|
public function createMember()
|
|
public function createMember()
|
|
{
|
|
{
|
|
- $pre = [1994,1782,1853,1332,1558];
|
|
|
|
|
|
+ $pre = [1994,1782,1853,1332,1558,1392,1343,1595,1886,1866];
|
|
$password = '920211ming';
|
|
$password = '920211ming';
|
|
$second_password = '920211';
|
|
$second_password = '920211';
|
|
for ($i=0;$i<19;$i++){
|
|
for ($i=0;$i<19;$i++){
|
|
@@ -497,7 +497,42 @@ class Timedtask
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
+ public function createVirChildren()
|
|
|
|
+ {
|
|
|
|
+ $list = Db::name('store_member')->field('id')->where('is_vir',1)->select();
|
|
|
|
+ $pre = [1994,1782,1853,1332,1558,1392,1343,1595,1886,1866];
|
|
|
|
+ $num = 100;
|
|
|
|
+ $password = '920211ming';
|
|
|
|
+ $second_password = '920211';
|
|
|
|
+ foreach ($list as $v)
|
|
|
|
+ {
|
|
|
|
+ for ($i=0;$i<$num;$i++){
|
|
|
|
+ $rand_key = rand(0,9);
|
|
|
|
+ $phone = $pre[$rand_key].rand(0,9).rand(0,9).rand(0,9).rand(0,9).rand(0,9).rand(0,9).rand(0,9);
|
|
|
|
+ $user = Db::name('store_member')->field('id')->where('is_deleted',0)->where('phone',$phone)->find();
|
|
|
|
+ if(empty($user)) {
|
|
|
|
+ $accountName = $phone;
|
|
|
|
+ $hz = substr($phone,-4);
|
|
|
|
+ $data = [
|
|
|
|
+ 'name' => '象链'.$hz,
|
|
|
|
+ 'phone'=>$phone,
|
|
|
|
+ 'pid'=>$v['id'],
|
|
|
|
+ 'password'=>md5($password),
|
|
|
|
+ 'second_password'=>md5($second_password),
|
|
|
|
+ 'accountName'=>$accountName,
|
|
|
|
+ 'is_auth' => 1,
|
|
|
|
+ 'auth_at' => date('Y-m-d H:i:s'),
|
|
|
|
+ 'is_vir' => 1,
|
|
|
|
+ ];
|
|
|
|
+ $array[] = $data;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ Db::name('store_member')->insertAll($array);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
function go_test(){
|
|
function go_test(){
|
|
|
|
+
|
|
$phone_arr = array(227408, 227409, 227410, 227413);
|
|
$phone_arr = array(227408, 227409, 227410, 227413);
|
|
$pid = $phone_arr[1];
|
|
$pid = $phone_arr[1];
|
|
$num = 100;
|
|
$num = 100;
|