public_host 4 years ago
parent
commit
a496dca96e
  1. 34
      main.go
  2. 17
      test.go

34
main.go

@ -0,0 +1,34 @@
/*
测试文件
*/
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()
}

17
test.go

@ -1,17 +0,0 @@
/*
测试文件
*/
package main
type MyTestr struct {
Id int
}
type MyTestr2 struct {
Id int
}
type MyTestr3 struct {
Id int
Mi int
}
Loading…
Cancel
Save