package db import ( "code.fnuoos.com/go_rely_warehouse/zyos_go_third_party_api.git/db/model" "xorm.io/xorm" ) func UserFindByID(Db *xorm.Engine, id interface{}) (*model.User, error) { var m model.User if has, err := Db.Where("uid = ?", id). Get(&m); err != nil || has == false { return nil, err } return &m, nil } func UserProfileFindByID(Db *xorm.Engine, id interface{}) (*model.UserProfile, error) { var m model.UserProfile if has, err := Db.Where("uid = ?", id).Get(&m); err != nil || has == false { return nil, err } return &m, nil }