test_game_robot.go 432 Bytes
Newer Older
1 2 3
package main

import (
hujiebin's avatar
hujiebin committed
4 5
	"git.hilo.cn/hilo-common/script/model"
	"git.hilo.cn/hilo-common/script/mysql"
6 7 8 9 10 11 12 13 14 15 16 17
)

func main() {
	var prodUser []model.UserNoId
	sql := "SELECT *  FROM `user` where id BETWEEN 888888 and 999999 AND avatar <> '' and default_avatar = 0  limit 10000 ;"
	if err := mysql.ProdReadOnlyDB.Raw(sql).Find(&prodUser).Error; err != nil {
		panic(err)
	}
	for _, user := range prodUser {
		mysql.TestDB.Create(user)
	}
}