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
20bdfd90
Commit
20bdfd90
authored
Aug 26, 2020
by
WeiCong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.兼容新版本得bd底层eibs.hibernatesupport.jar
2.兼容NoUiVersion和非版本支持 3.去掉dn的校验
parent
8ce08718
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
26 additions
and
21 deletions
+26
-21
NoUiVersion.java
...a/org/sss/presentation/noui/api/response/NoUiVersion.java
+1
-1
ResultUtil.java
...va/org/sss/presentation/noui/api/response/ResultUtil.java
+9
-1
NoUiContextManager.java
...org/sss/presentation/noui/context/NoUiContextManager.java
+6
-6
LoginController.java
...org/sss/presentation/noui/controller/LoginController.java
+2
-2
NoUiUtils.java
src/main/java/org/sss/presentation/noui/util/NoUiUtils.java
+7
-11
eIBS.xml
src/main/resources/eIBS.xml
+1
-0
No files found.
src/main/java/org/sss/presentation/noui/api/response/NoUiVersion.java
View file @
20bdfd90
...
...
@@ -2,7 +2,7 @@ package org.sss.presentation.noui.api.response;
public
class
NoUiVersion
{
private
String
version
;
private
String
version
=
"1.0.0"
;
public
String
getVersion
()
{
return
version
;
...
...
src/main/java/org/sss/presentation/noui/api/response/ResultUtil.java
View file @
20bdfd90
...
...
@@ -3,7 +3,7 @@ package org.sss.presentation.noui.api.response;
import
java.util.Map
;
public
class
ResultUtil
{
final
static
String
DEFAULT_VERSION
=
"DEFAULT_VERSION"
;
public
static
Result
result
(
String
retcod
,
String
retmsg
,
Object
data
,
String
version
)
{
return
new
Result
(
retcod
,
retmsg
,
data
,
version
);
}
...
...
@@ -11,4 +11,12 @@ public class ResultUtil {
public
static
Result
result
(
String
retcod
,
String
retmsg
,
Map
<
String
,
Object
>
data
,
Map
<
String
,
Object
>
error
,
Map
<
String
,
Object
>
codetable
,
String
version
)
{
return
new
Result
(
retcod
,
retmsg
,
error
,
codetable
,
data
,
version
);
}
public
static
Result
result
(
String
retcod
,
String
retmsg
,
Object
data
)
{
return
new
Result
(
retcod
,
retmsg
,
data
,
DEFAULT_VERSION
);
}
public
static
Result
result
(
String
retcod
,
String
retmsg
,
Map
<
String
,
Object
>
data
,
Map
<
String
,
Object
>
error
,
Map
<
String
,
Object
>
codetable
)
{
return
new
Result
(
retcod
,
retmsg
,
error
,
codetable
,
data
,
DEFAULT_VERSION
);
}
}
src/main/java/org/sss/presentation/noui/context/NoUiContextManager.java
View file @
20bdfd90
package
org
.
sss
.
presentation
.
noui
.
context
;
import
java.util.UUID
;
import
java.util.ArrayList
;
import
java.util.List
;
import
cn.com.brilliance.eibs.auth.EmptyLoginContext
;
import
log.Log
;
import
log.LogFactory
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.commons.lang.reflect.ConstructorUtils
;
import
org.sss.common.model.ILoginContext
;
import
org.sss.common.model.IModuleSession
;
import
org.sss.presentation.noui.api.exception.NoUiException
;
import
org.sss.presentation.noui.api.request.NoUiRequest
;
import
org.sss.presentation.noui.util.NoUiUtils
;
import
cn.com.brilliance.eibs.auth.EmptyLoginContext
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.UUID
;
public
class
NoUiContextManager
{
private
static
final
Log
log
=
LogFactory
.
getLog
(
NoUiContextManager
.
class
);
...
...
@@ -46,7 +46,7 @@ public class NoUiContextManager {
IModuleSession
session
=
null
;
try
{
Class
<?>
clazz
=
Class
.
forName
(
"org.sss.module."
+
dbType
+
".ModuleSessionImpl"
);
session
=
(
IModuleSession
)
ConstructorUtils
.
invokeConstructor
(
clazz
,
new
Object
[]
{
noUiContext
});
session
=
(
IModuleSession
)
ConstructorUtils
.
invokeConstructor
(
clazz
,
new
Object
[]
{
noUiContext
,
NoUiUtils
.
connectKeeped
});
}
catch
(
Exception
e
)
{
log
.
error
(
"Constructs NoUiContext error"
,
e
);
throw
new
NoUiException
(
"Constructs NoUiContext error"
,
e
);
...
...
src/main/java/org/sss/presentation/noui/controller/LoginController.java
View file @
20bdfd90
...
...
@@ -50,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
))
{
...
...
src/main/java/org/sss/presentation/noui/util/NoUiUtils.java
View file @
20bdfd90
package
org
.
sss
.
presentation
.
noui
.
util
;
import
java.util.ArrayList
;
import
java.util.Iterator
;
import
java.util.List
;
import
java.util.Set
;
import
log.Log
;
import
log.LogFactory
;
import
org.sss.common.impl.DefaultLoginContext
;
import
org.sss.common.impl.ServiceThread
;
import
org.sss.common.model.ICodetable
;
import
org.sss.common.model.IFactory
;
import
org.sss.common.model.IFilter
;
import
org.sss.common.model.II18n
;
import
org.sss.common.model.IModuleSession
;
import
org.sss.common.model.*
;
import
org.sss.presentation.noui.api.request.NoUiRequest
;
import
org.sss.presentation.noui.common.Constants
;
import
org.sss.presentation.noui.context.NoUiContext
;
import
org.sss.presentation.noui.context.NoUiPresentation
;
import
org.sss.util.ContainerUtils
;
import
java.util.ArrayList
;
import
java.util.Iterator
;
import
java.util.List
;
import
java.util.Set
;
public
class
NoUiUtils
{
private
static
final
Log
log
=
LogFactory
.
getLog
(
NoUiUtils
.
class
);
...
...
@@ -40,6 +35,7 @@ public class NoUiUtils {
public
static
ICodetable
tbl
;
public
static
II18n
i18n
;
public
static
IFilter
passwordFilter
;
public
static
boolean
connectKeeped
;
private
static
final
ThreadGroup
threadGroup
=
new
ThreadGroup
(
"eIBS"
);
...
...
src/main/resources/eIBS.xml
View file @
20bdfd90
...
...
@@ -44,6 +44,7 @@
</service> -->
<service
class=
"org.sss.presentation.noui.util.NoUiUtils"
initMethodName=
"init"
deinitMethodName=
"deinit"
>
<property
name=
"connectKeeped"
value=
"true"
class=
"boolean"
/>
<property
name=
"debugMode"
value=
"false"
class=
"boolean"
/>
<!-- WAR包本身的目录为变量$ROOT,WAR/WEB-INF/classes目录为变量$HOME -->
<property
name=
"rootPath"
value=
"$ROOT"
/>
...
...
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