master
huanghai 5 years ago
parent 49dbcc5797
commit 0c4266925a

@ -38,10 +38,12 @@ func Login(username string, password string, ip string) (bool, string, string, s
return false, "", "", "" return false, "", "", ""
} }
} }
//根据person_id换取统一的登录名 if len(personId) > 0 {
username, err = DaoSysLoginPerson.GetLoginNameByPersonId(personId) //根据person_id换取统一的登录名
if err != nil || len(username) == 0 { username, err = DaoSysLoginPerson.GetLoginNameByPersonId(personId)
return false, "", "", "" if err != nil || len(username) == 0 {
return false, "", "", ""
}
} }
//调用dao层的方法,组合成service方法层 //调用dao层的方法,组合成service方法层
result, identityId, personId, personName := DaoSysLoginPerson.Login(username, password, ip) result, identityId, personId, personName := DaoSysLoginPerson.Login(username, password, ip)

@ -613,7 +613,7 @@ type swaggerInfo struct {
// SwaggerInfo holds exported Swagger Info so clients can modify it // SwaggerInfo holds exported Swagger Info so clients can modify it
var SwaggerInfo = swaggerInfo{ var SwaggerInfo = swaggerInfo{
Version: "2.0", Version: "2.0",
Host: "127.0.0.1:8000", Host: "10.10.14.187:8000",
BasePath: "", BasePath: "",
Schemes: []string{}, Schemes: []string{},
Title: "东师理想统一认证中心(OAuth2+Sso)", Title: "东师理想统一认证中心(OAuth2+Sso)",

@ -7,7 +7,7 @@
"license": {}, "license": {},
"version": "2.0" "version": "2.0"
}, },
"host": "127.0.0.1:8000", "host": "10.10.14.187:8000",
"paths": { "paths": {
"/oauth2/access_token": { "/oauth2/access_token": {
"post": { "post": {

@ -32,7 +32,7 @@ definitions:
description: 个数 description: 个数
type: object type: object
type: object type: object
host: 127.0.0.1:8000 host: 10.10.14.187:8000
info: info:
contact: {} contact: {}
description: 参考自xxl-sso description: 参考自xxl-sso

@ -67,7 +67,7 @@ func startOAuth2Server() {
// @title 东师理想统一认证中心(OAuth2+Sso) // @title 东师理想统一认证中心(OAuth2+Sso)
// @version 2.0 // @version 2.0
// @description 参考自xxl-sso // @description 参考自xxl-sso
// @host 127.0.0.1:8000 // @host 10.10.14.187:8000
func main() { func main() {
// 发布模式 // 发布模式
//gin.SetMode(gin.ReleaseMode) //gin.SetMode(gin.ReleaseMode)

Loading…
Cancel
Save