You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
477 B

4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
  1. /*
  2. 测试文件
  3. */
  4. package main
  5. import (
  6. "git.ouxuan.net/hasaki-service/hasaki-sdk/hskdb"
  7. "xorm.io/xorm"
  8. )
  9. type MyTestr struct {
  10. Id int
  11. }
  12. //wherePrimaryKey
  13. func (myTestr *MyTestr) wherePrimaryKey() (q interface{}, args []interface{}) {
  14. //todo 根据需求修改
  15. return "`id`=?", []interface{}{
  16. myTestr.Id,
  17. }
  18. }
  19. func (myTestr *MyTestr) getXorm() *xorm.Engine {
  20. return hskdb.GetXormAuto()
  21. }
  22. type MyTestr2 struct {
  23. Id int
  24. }
  25. type MyTestr3 struct {
  26. Id int
  27. Mi int
  28. }