setName('test')->setDescription('Here is the remark '); } protected function execute(Input $input, Output $output) { $starttime = "2021-10-1 00:00:00"; $expiretime = "2022-9-30 23:59:59"; $username=1745210000; // $uid = 1; // while ($uid<=10000){ // $data=[ // "accountid"=>$uid, // "stock_total"=>300, // "stock_used"=>0, // "stock_balance"=>300, // "stock_delivery"=>0, // "status"=>1, // "is_del"=>0, // "addtime"=>date("Y-m-d H:i:s"), // "updatetime"=>date("Y-m-d H:i:s") // ]; // Db::name("account_stock")->insert($data); // $uid++; // } while ($username<=1745219999){ // Db::startTrans(); $pasword = randomkeys(2).rand(1000,9999); $salt = makeSalt(); $pas = sha1($pasword.$salt); $data=[ "username"=>"CJ".$username, "password"=>$pas, "pwd"=>$pasword, "salt"=>$salt, "status"=>0, "is_del"=>0, "starttime"=>$starttime, "expiretime"=>$expiretime, "addtime"=>date("Y-m-d H:i:s"), "updatetime"=>date("Y-m-d H:i:s") ]; $acccount = Db::name("account")->insert($data,false,true); $username++; // if($acccount>0){ // $user=[ // "nickname"=>$username, // "mobile"=>"", // "avatar"=>"", // "remark"=>"", // "sex"=>"", // "addtime"=>date("Y-m-d H:i:s"), // "updatetime"=>date("Y-m-d H:i:s") // ]; // $info = Db::name("account_info")->insert($user,false,true); // if($info>0){ // $rela=["accountid"=>$acccount,"account_info"=>$info]; // $rela_acc=Db::name("rela_account")->insert($rela); // if($rela_acc){ // write_log("账户{$username}新建成功","","account","add"); // Db::commit(); // $username++; // continue; // } // // } // } // Db::rollback(); // break; } } }