Browse Source

实名认证

master
huangjiajun 1 month ago
parent
commit
e9cbd65b0b
2 changed files with 12 additions and 0 deletions
  1. +1
    -0
      src/dao/user_real_name_auth_dao.go
  2. +11
    -0
      src/implement/user_real_name_auth_implement.go

+ 1
- 0
src/dao/user_real_name_auth_dao.go View File

@@ -6,6 +6,7 @@ import (

type UserRealNameAuthDao interface {
GetRealNameAuthByUid(uid string) (m *model.UserRealNameAuth, err error)
GetRealNameAuthById(id string) (m *model.UserRealNameAuth, err error)
GetRealNameAuthByUidWithState(uid, state string) (m *model.UserRealNameAuth, err error)
GetRealNameAuthCount(uid int, cardNo string) (int64, error)
GetRealNameAuthByOid(oid string) (*model.UserRealNameAuth, error)


+ 11
- 0
src/implement/user_real_name_auth_implement.go View File

@@ -27,6 +27,17 @@ func (u UserRealNameAuthDb) GetRealNameAuthByUid(uid string) (m *model.UserRealN
}
return m, nil
}
func (u UserRealNameAuthDb) GetRealNameAuthById(id string) (m *model.UserRealNameAuth, err error) {
m = new(model.UserRealNameAuth)
has, err := u.Db.Where("id=?", id).Get(m)
if err != nil {
return nil, zhios_order_relate_logx.Error(err)
}
if has == false {
return nil, nil
}
return m, nil
}
func (u UserRealNameAuthDb) GetRealNameAuthByUidWithState(uid, state string) (m *model.UserRealNameAuth, err error) {
m = new(model.UserRealNameAuth)
has, err := u.Db.Where("uid = ? and state=?", uid, state).Get(m)


Loading…
Cancel
Save