package models import "rdluck_tools/orm" type Admin struct { AdminId int AdminName string RealName string Mobile string } func GetAdminByAdminId(adminId int) (item *Admin, err error) { sql := `SELECT * FROM admin WHERE admin_id=? ` err = orm.NewOrm().Raw(sql, adminId).QueryRow(&item) return }