sys_user.go 475 B

1234567891011121314151617
  1. package models
  2. import "github.com/beego/beego/v2/client/orm"
  3. type SysUser struct {
  4. SysUserId int `description:"系统用户id"`
  5. SysRealName string `description:"系统用户姓名"`
  6. Phone string `description:"手机号"`
  7. AreaCode string `description:"区号"`
  8. }
  9. func GetSellerById(sysUserId int) (items *SysUser, err error) {
  10. o := orm.NewOrm()
  11. sql := `SELECT * FROM sys_user WHERE sys_user_id=?`
  12. err = o.Raw(sql, sysUserId).QueryRow(&items)
  13. return
  14. }