浏览代码

实名认证

master
huangjiajun 1 个月前
父节点
当前提交
e9cbd65b0b
共有 2 个文件被更改,包括 12 次插入0 次删除
  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 查看文件

@@ -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 查看文件

@@ -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)


正在加载...
取消
保存