Merge branch 'master' of 10.10.14.250:huanghai/dsMin

master
wubin 5 years ago
commit ec5f885d6b

@ -40,7 +40,7 @@ var IncrSqlDict = []tableStruct{
{TableName: "t_base_class", PrimaryKey: "class_id", DataSource: "org_class"},
{TableName: "t_base_teacher", PrimaryKey: "teacher_id", DataSource: "user_teacher"},
{TableName: "t_base_student", PrimaryKey: "student_id", DataSource: "user_student"},
{TableName: "t_sys_loginperson_log", PrimaryKey: "id", DataSource: "log_login"},
{TableName: "t_sys_loginperson_log", PrimaryKey: "id_int", DataSource: "log_login"},
}
// 全量数据上报

@ -1,4 +1,4 @@
select t1.id,identity_id,t1.person_id,t1.login_name,t1.ip_address,
select t1.id_int,identity_id,t1.person_id,t1.login_name,t1.ip_address,
DATE_FORMAT(t1.`login_time`,'%Y/%m/%d %H:%i:%s') AS `login_time`,
t1.province_code,
t1.city_code,t1.district_code,t1.bureau_id,

@ -4,6 +4,7 @@ import (
"dsSso/Const"
"dsSso/Const/DefaultConst"
"dsSso/Controller/ControllerRecaptcha"
"dsSso/Dao/DaoBaseGlobal"
"dsSso/Model"
"dsSso/Service/ServiceJoinApp"
"dsSso/Service/ServiceLoginPerson"
@ -404,6 +405,7 @@ func authorizeGet(context *gin.Context) {
// @Description 退出统一认证
// @Tags 登录验证类
// @Accept application/x-www-form-urlencoded
// @Param redirect_uri query string true "redirect_uri"
// @Produce json
// @Success 200 {string} string
// @Router /oauth2/logout [get]
@ -432,6 +434,14 @@ func logout(context *gin.Context) {
}
//清除cookie
SsoUtil.DeleteSsoCookie(context)
msg := "统一认证退出成功!"
context.JSON(http.StatusOK, map[string]interface{}{"success": false, "msg": msg})
//跳转回去,系统默认统一的回调首页
list, err := DaoBaseGlobal.GetGlobalInfoByValue(`defaultIndexUrl`)
if err != nil || len(list) == 0 {
msg := "获取全局变量defaultIndexUrl失败"
context.JSON(http.StatusOK, map[string]interface{}{"success": false, "msg": msg})
return
}
globalValue := list[0]["global_value"].(string)
context.Redirect(302, string(globalValue))
return
}

@ -0,0 +1,16 @@
package DaoBaseGlobal
import "dsSso/Utils/DbUtil"
var db = DbUtil.Engine
/**
value
2020-07-22
*/
func GetGlobalInfoByValue(value string) ([]map[string]interface{}, error) {
sql := `select * from t_base_global where global_code=?`
list, err := db.SQL(sql, value).Query().List()
return list, err
}

@ -273,6 +273,15 @@ var doc = `{
"登录验证类"
],
"summary": "退出统一认证",
"parameters": [
{
"type": "string",
"description": "redirect_uri",
"name": "redirect_uri",
"in": "query",
"required": true
}
],
"responses": {
"200": {
"description": "OK",

@ -257,6 +257,15 @@
"登录验证类"
],
"summary": "退出统一认证",
"parameters": [
{
"type": "string",
"description": "redirect_uri",
"name": "redirect_uri",
"in": "query",
"required": true
}
],
"responses": {
"200": {
"description": "OK",

@ -203,6 +203,12 @@ paths:
consumes:
- application/x-www-form-urlencoded
description: 退出统一认证
parameters:
- description: redirect_uri
in: query
name: redirect_uri
required: true
type: string
produces:
- application/json
responses:

@ -5,7 +5,7 @@ import (
)
type TSysLoginpersonLog struct {
Id int32 `xorm:"not null pk autoincr INT(11)"`
IdInt int32 `xorm:"not null pk autoincr INT(11)"`
IdentityId int32 `xorm:"not null comment('人员身份') INT(11)"`
PersonId string `xorm:"not null comment('人员ID') CHAR(36)"`
LoginName string `xorm:"not null comment('登录名') VARCHAR(255)"`

Loading…
Cancel
Save