第三方api接口
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.

24 lines
557 B

  1. package db
  2. import (
  3. "code.fnuoos.com/go_rely_warehouse/zyos_go_third_party_api.git/db/model"
  4. "xorm.io/xorm"
  5. )
  6. func UserFindByID(Db *xorm.Engine, id interface{}) (*model.User, error) {
  7. var m model.User
  8. if has, err := Db.Where("uid = ?", id).
  9. Get(&m); err != nil || has == false {
  10. return nil, err
  11. }
  12. return &m, nil
  13. }
  14. func UserProfileFindByID(Db *xorm.Engine, id interface{}) (*model.UserProfile, error) {
  15. var m model.UserProfile
  16. if has, err := Db.Where("uid = ?", id).Get(&m); err != nil || has == false {
  17. return nil, err
  18. }
  19. return &m, nil
  20. }