作者 王智

baoxiu

... ... @@ -174,4 +174,30 @@ class Common extends Api
$this->error('失败', 0);
}
}
public function AddUser()
{
// $osn = rand(100000, 999999);
$is_user = Db::name('user')->order('id desc')->limit(1)->value('username');
if (empty($is_user)) {
$params['username'] = '100000';
$params['password'] = 123456;
} else {
$params['username'] = $is_user + 1;
$params['password'] = 123456;
}
for ($i = 1; $i < 30; $i++) {
$data = [
'username' => $params['username'],
'password' => $params['password'],
'zhandian_id' => 16,
'level' => 4,
'name' => '维修成员' . $i,
'createtime' => time(),
'updatetime' => time()
];
Db::name('user')->insert($data);
}
}
}
... ...