test_game_robot.go 416 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
package main

import (
	"github.com/hilo-common/model"
	"github.com/hilo-common/mysql"
)

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)
	}
}