/* 测试文件 */ package main import ( "git.ouxuan.net/hasaki-service/hasaki-sdk/hskdb" "xorm.io/xorm" ) type MyTestr struct { Id int } type MyTestr2 struct { Id int } type MyTestr3 struct { Id int Mi int } //wherePrimaryKey func (myTestr3 *MyTestr3) wherePrimaryKey() (q interface{}, args []interface{}) { //todo 根据需求修改 return "`id`=?", []interface{}{ myTestr3.Id, } } func (myTestr3 *MyTestr3) getXorm() *xorm.Engine { return hskdb.GetXormAuto() }