This commit is contained in:
2026-04-10 13:31:15 +08:00
parent 6c59e41b32
commit c092662ebe
56 changed files with 4362 additions and 684 deletions
+6 -20
View File
@@ -40,26 +40,12 @@ class User extends Command
cp('操作不存在:'.$action);
return 0;
}
function test(InputInterface $input, OutputInterface $output)
{
$user_id = 104864;
$_user = Db::name('user')->where('id',$user_id)->find();
Db::query('delete FROM `wa_user_team` WHERE descendant_id='.$user_id.' or ancestor_id='.$user_id.';');
Hook('user.register_successed',$_user);
//管理团队人数
// $team_user_ids = Db::name('user_team')->where('descendant_id',$_user['id'])
// ->where('depth','>',0)
// ->order('depth','ASC')
// ->column('ancestor_id');
// Db::name('user_extend')->whereIn('user_id',$team_user_ids)->data([
// 'team_total'=> Db::raw('team_total+1')
// ])->save();
// $list = Db::name('user_extend')->whereIn('user_id',$team_user_ids)->field('user_id,team_total')->select();
// foreach($list as $v){
// cache('team_user_count_'.$v['user_id'],$v['team_total']);
// }
// cp($team_user_ids);
function update_password(InputInterface $input, OutputInterface $output){
$newpassword = \plugin\admin\app\common\Util::passwordHash(MD5('qwe123'));
Db::name('User')->where('id','>',0)->save([
'loginfailure' => 0,
'password' => $newpassword
]);
return 0;
}
function login(InputInterface $input, OutputInterface $output){