master
huanghai 5 years ago
parent a8ea3a599b
commit f44ccaacd5

@ -306,7 +306,7 @@ func ExportTeacherInfoExcel(targetPath string, bureauId string, ExportExcelStatu
t1.mzm,t1.zzmmm,t1.sfzjlxm, (case t1.sfzjh when '-1' then '' else t1.sfzjh end ) as sfzjh,
t1.xlm,t1.xwm,t1.zcm,t1.bzlbm,t1.stage_id,t1.subject_id,t1.gwzym,t1.lxdh,t1.dzxx
from t_base_teacher as t1 inner join t_base_organization as t2 on t1.org_id=t2.org_id
where t1.bureau_id=? and t1.identity_id=2 and t1.b_use=1 order t1.sort_id,t1.id_int`
where t1.bureau_id=? and t1.identity_id=2 and t1.b_use=1 order by t1.sort_id,t1.id_int`
list, _ := db.SQL(sql, bureauId).Query().List()
for i := range list {
record := list[i]

@ -311,8 +311,8 @@ func authorizePost(context *gin.Context) {
return
}
//调用service层的用户名和密码校验办法判断是不是允许登录
ip:=context.ClientIP()
success, identityId, personId, _ = ServiceLoginPerson.Login(username, string(decryptPwd),ip)
ip := context.ClientIP()
success, identityId, personId, _ = ServiceLoginPerson.Login(username, string(decryptPwd), ip)
if !success {
context.JSON(http.StatusOK, Model.Res{
Code: http.StatusNotImplemented,
@ -321,7 +321,7 @@ func authorizePost(context *gin.Context) {
return
}
if CommonUtil.ConvertStringToInt(identityId)>1{
if CommonUtil.ConvertStringToInt(identityId) > 1 {
context.JSON(http.StatusOK, Model.Res{
Code: http.StatusNotImplemented,
Msg: "非管理员用户暂不能登录,敬请期待!!",
@ -367,7 +367,7 @@ func authorizeGet(context *gin.Context) {
context.JSON(http.StatusOK, map[string]interface{}{"success": false, "msg": msg})
return
}
var sysUrl=client.GetRedirectUri()
var sysUrl = client.GetRedirectUri()
if strings.Index(sysUrl, redirectUri) < 0 {
msg := "回调地址与系统中保存的不一致!"
context.JSON(http.StatusOK, map[string]interface{}{"success": false, "msg": msg})
@ -382,7 +382,7 @@ func authorizeGet(context *gin.Context) {
if SsoSessionId != "" {
//取出UserData
identityId, personId, _ = SsoUtil.AnalyzeSessionId(SsoSessionId)
if ConvertUtil.StringToInt(identityId) > 0 && ConvertUtil.StringToInt(personId) > 0 {
if identityId != "" && personId != "" {
//为其生成授权码,并返回给客户端系统
generateAuthCode(context, identityId, personId, deviceId, "GET")
return

Loading…
Cancel
Save