update check randcode & query api