master
huanghai 5 years ago
parent 296aaf8057
commit 43519af107

@ -356,7 +356,14 @@ func GetIdentityIdByPersonId(personId string) int64 {
}
/*解除绑定第三方授权*/
func UnbindAuthorization(personId string){
sql:=`update t_sys_loginperson set wx_open_id='' where person_id=?`
db.SQL(sql,personId).Execute()
func UnbindAuthorization(personId string) {
sql := `update t_sys_loginperson set wx_open_id='' where person_id=?`
db.SQL(sql, personId).Execute()
}
//获取已绑定的第三方授权
func GetBindAuthorization(personId string) ([]map[string]interface{}, error) {
sql := `select wx_open_id from t_sys_loginperson where person_id=?`
list, err := db.SQL(sql, personId).Query().List()
return list, err
}

@ -357,7 +357,7 @@ func (s *Rpc) GetBindAuthorization(ctx context.Context, in *SysLoginpersonProto.
var reply SysLoginpersonProto.Reply
//通用获取单条
list := SqlKit.QueryByIds([]string{in.PersonId}, "t_sys_loginperson")
list, _ := SysLoginpersonDao.GetBindAuthorization(in.PersonId)
if len(list) == 0 {
reply.List = "[]"
reply.Message = "没有找到相应的人员信息"

Loading…
Cancel
Save