public_host 4 years ago
parent
commit
21a21cfc66
  1. 21
      main.go

21
main.go

@ -3,11 +3,6 @@
*/ */
package main package main
import (
"git.ouxuan.net/hasaki-service/hasaki-sdk/hskdb"
"xorm.io/xorm"
)
type MyTestr struct { type MyTestr struct {
Id int Id int
} }
@ -21,20 +16,6 @@ type MyTestr3 struct {
Mi 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()
}
func main() { func main() {
t := &MyTestr3{}
InitializationHttpCrudAdminMyTestr3()
t.Data()
} }
Loading…
Cancel
Save