Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nouiWithSpringMVC
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gechengyang
nouiWithSpringMVC
Commits
9073e3a1
Commit
9073e3a1
authored
Aug 23, 2020
by
WeiCong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
屏蔽登陆dn验证
parent
ecfc244e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
13 deletions
+10
-13
DatabaseLoginContextForELCS.java
...com/brilliance/eibs/auth/DatabaseLoginContextForELCS.java
+4
-4
LoginController.java
...org/sss/presentation/noui/controller/LoginController.java
+6
-9
No files found.
src/main/java/cn/com/brilliance/eibs/auth/DatabaseLoginContextForELCS.java
View file @
9073e3a1
...
...
@@ -172,8 +172,8 @@ public class DatabaseLoginContextForELCS extends AbstractLoginContext {
this
.
_userName
=
null
;
String
userName
=
getParameter
(
parameterMap
,
"j_username"
);
String
password
=
getParameter
(
parameterMap
,
"j_password"
);
String
dncode
=
getParameter
(
parameterMap
,
"j_dncode"
);
if
(
userName
==
null
||
password
==
null
||
dncode
==
null
){
//
String dncode = getParameter(parameterMap, "j_dncode");
if
(
userName
==
null
||
password
==
null
/*|| dncode==null*/
){
parameterMap
.
put
(
ERROR
,
ErrorCode
.
LOGIN_PARAMETER_CHECK
);
return
setLogon
(
false
,
userName
,
ERROR_USERNAME_PASSWORD
,
"用户名或密码为空."
,
null
,
null
);
}
...
...
@@ -218,10 +218,10 @@ public class DatabaseLoginContextForELCS extends AbstractLoginContext {
}
else
if
(!
STATUS_NORMAL
.
equals
(
userState
)){
//非0:正常;1:注销;2:锁定,不可登录,
parameterMap
.
put
(
ERROR
,
ErrorCode
.
LOGIN_STATE_ABNORMAL_ERROR
);
return
setLogon
(
false
,
userName
,
ErrorCode
.
LOGIN_STATE_ABNORMAL_ERROR
.
getCode
(),
ErrorCode
.
LOGIN_STATE_ABNORMAL_ERROR
.
getMessage
(),
stmt
,
rs
);
}
else
if
(!
Objects
.
equals
(
ukey
,
dncode
))
{
//dn码错误
}
/*
else if (!Objects.equals(ukey,dncode)) {//dn码错误
parameterMap.put(ERROR, ErrorCode.LOGIN_DN_ERROR);
return setLogon(false, userName, ErrorCode.LOGIN_DN_ERROR.getCode(), ErrorCode.LOGIN_DN_ERROR.getMessage(), stmt, rs);
}
else
if
(
Objects
.
nonNull
(
errorStr
))
{
}
*/
else
if
(
Objects
.
nonNull
(
errorStr
))
{
// 校验密码
sql
=
"UPDATE usr SET fltcnt=?,sta=?,lstfltdattim=? WHERE inr=?"
;
stmt
=
conn
.
prepareStatement
(
sql
);
...
...
src/main/java/org/sss/presentation/noui/controller/LoginController.java
View file @
9073e3a1
package
org
.
sss
.
presentation
.
noui
.
controller
;
import
java.util.*
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpSession
;
import
log.Log
;
import
log.LogFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.RequestBody
;
...
...
@@ -16,7 +10,6 @@ import org.springframework.web.bind.annotation.RequestMethod;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
org.sss.common.model.ILoginContext
;
import
org.sss.common.model.IMenuItem
;
import
org.sss.presentation.noui.api.exception.NoUiException
;
import
org.sss.presentation.noui.api.model.Menu
;
import
org.sss.presentation.noui.api.request.NoUiRequest
;
import
org.sss.presentation.noui.api.response.ErrorCode
;
...
...
@@ -35,6 +28,10 @@ import org.sss.presentation.noui.util.NumericUtil;
import
org.sss.presentation.noui.util.RedisUtil
;
import
org.sss.presentation.noui.util.StringUtil
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpSession
;
import
java.util.*
;
@Controller
public
class
LoginController
{
private
static
final
Log
log
=
LogFactory
.
getLog
(
LoginController
.
class
);
...
...
@@ -53,10 +50,10 @@ public class LoginController {
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
//此map会存储返回错误码
String
userId
=
noUiRequest
.
getDataMap
().
get
(
Constants
.
USERNAME
).
toString
();
String
password
=
noUiRequest
.
getDataMap
().
get
(
Constants
.
PASSWORD
).
toString
();
String
dncode
=
noUiRequest
.
getDataMap
().
get
(
Constants
.
DNCODE
).
toString
();
//
String dncode = noUiRequest.getDataMap().get(Constants.DNCODE).toString();
map
.
put
(
"j_username"
,
userId
);
map
.
put
(
"j_password"
,
password
);
map
.
put
(
"j_dncode"
,
dncode
);
//
map.put("j_dncode", dncode);
NoUiContext
context
=
NoUiContextManager
.
createNoUiContext
(
noUiRequest
);
try
{
if
(
context
.
getSession
().
login
(
map
))
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment