|
- package db
-
- import (
- "code.fnuoos.com/go_rely_warehouse/zyos_go_coupon.git/db/model"
- "xorm.io/xorm"
- )
-
- func UserFindByPhoneOrNickname(Db *xorm.Engine, mobile string) (*model.User, error) {
- var m model.User
- if has, err := Db.Where("(phone = ? or nickname=?) AND delete_at = 0", mobile, mobile).
- Get(&m); err != nil || has == false {
- return nil, err
- }
- return &m, nil
- }
|