mirror of
https://gitee.com/dromara/MaxKey.git
synced 2025-12-07 17:38:32 +08:00
init spring
This commit is contained in:
parent
84eb786d27
commit
f2005bf4f8
@ -2,5 +2,5 @@
|
||||
<classpath>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8/"/>
|
||||
<classpathentry kind="con" path="org.eclipse.buildship.core.gradleclasspathcontainer"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
<classpathentry kind="output" path="bin/default"/>
|
||||
</classpath>
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
.gradle/5.4.1/executionHistory/executionHistory.bin
Normal file
BIN
.gradle/5.4.1/executionHistory/executionHistory.bin
Normal file
Binary file not shown.
BIN
.gradle/5.4.1/executionHistory/executionHistory.lock
Normal file
BIN
.gradle/5.4.1/executionHistory/executionHistory.lock
Normal file
Binary file not shown.
BIN
.gradle/5.4.1/fileHashes/fileHashes.bin
Normal file
BIN
.gradle/5.4.1/fileHashes/fileHashes.bin
Normal file
Binary file not shown.
BIN
.gradle/5.4.1/fileHashes/fileHashes.lock
Normal file
BIN
.gradle/5.4.1/fileHashes/fileHashes.lock
Normal file
Binary file not shown.
Binary file not shown.
@ -1,2 +1,2 @@
|
||||
#Tue Mar 05 21:21:11 GMT+08:00 2019
|
||||
gradle.version=4.8
|
||||
#Tue May 21 22:14:03 GMT+08:00 2019
|
||||
gradle.version=5.4.1
|
||||
|
||||
Binary file not shown.
2
.project
2
.project
@ -17,7 +17,7 @@
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.buildship.core.gradleprojectnature</nature>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
<nature>org.eclipse.buildship.core.gradleprojectnature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
||||
|
||||
@ -1,4 +0,0 @@
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
|
||||
org.eclipse.jdt.core.compiler.compliance=1.8
|
||||
org.eclipse.jdt.core.compiler.source=1.8
|
||||
46
build.gradle
46
build.gradle
@ -4,9 +4,17 @@
|
||||
|
||||
defaultTasks "clean", "build"
|
||||
|
||||
|
||||
ext {
|
||||
jackson2Version = "2.9.8"
|
||||
log4jVersion = "2.11.2"
|
||||
springVersion = "5.1.6.RELEASE"
|
||||
springSecurityVersion= "5.1.5.RELEASE"
|
||||
hibernateVersion = "5.4.2.Final"
|
||||
}
|
||||
|
||||
// Apply the java plugin to add support for Java
|
||||
//apply plugin: 'java'
|
||||
|
||||
allprojects {
|
||||
apply plugin: "java"
|
||||
apply plugin: "eclipse"
|
||||
@ -36,6 +44,8 @@ allprojects {
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -46,12 +56,21 @@ repositories {
|
||||
mavenCentral()
|
||||
jcenter()
|
||||
|
||||
|
||||
}
|
||||
subprojects {
|
||||
apply plugin: 'java'
|
||||
|
||||
repositories {
|
||||
subprojects {
|
||||
|
||||
sourceSets {
|
||||
main {
|
||||
java {
|
||||
srcDir 'src/main/java' // 指定源码目录
|
||||
}
|
||||
resources {
|
||||
srcDir 'src/main/resources' //资源目录
|
||||
}
|
||||
}
|
||||
}
|
||||
repositories {
|
||||
mavenLocal()
|
||||
mavenCentral()
|
||||
jcenter()
|
||||
@ -62,16 +81,13 @@ subprojects {
|
||||
maven { url "https://repo.spring.io/snapshot" }
|
||||
}
|
||||
|
||||
|
||||
|
||||
dependencies {
|
||||
testCompile 'junit:junit:4.11'
|
||||
dependencies {
|
||||
testCompile 'junit:junit:4.11'
|
||||
compileOnly 'junit:junit:4.11'
|
||||
testCompile group: 'javax.servlet', name: 'javax.servlet-api', version: '3.0.1'
|
||||
compileOnly group: 'javax.servlet', name: 'javax.servlet-api', version: '3.0.1'
|
||||
compileOnly group: 'javax.servlet', name: 'jstl', version: '1.2'
|
||||
compileOnly group: 'javax.servlet', name: 'jsp-api', version: '2.0'
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -86,7 +102,7 @@ subprojects {
|
||||
"Implementation-Version": project.version)
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
task checkenv<<{
|
||||
//项目名
|
||||
println project.name
|
||||
@ -104,7 +120,7 @@ subprojects {
|
||||
println project.version
|
||||
//项目的ant对象
|
||||
println project.ant
|
||||
}
|
||||
}*/
|
||||
|
||||
task copyjar2Release(type: Copy) {
|
||||
into "$rootDir/build/jars/"
|
||||
@ -132,9 +148,9 @@ subprojects {
|
||||
}
|
||||
|
||||
//task buildRelease(dependsOn:['build','war','copyjar2Release','copyWar2Release','copyotherWar2Release','copydemoWar2Release']) << {
|
||||
task buildRelease(dependsOn:['copyjar2Release','copyWar2Release','copyotherWar2Release','copydemoWar2Release']) << {
|
||||
println 'Build MaxKey '+project.name +' complete .'
|
||||
}
|
||||
//task buildRelease(dependsOn:['copyjar2Release','copyWar2Release','copyotherWar2Release','copydemoWar2Release']) << {
|
||||
// println 'Build MaxKey '+project.name +' complete .'
|
||||
//}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -1,3 +1,3 @@
|
||||
group=com.connsec.maxkey
|
||||
version=3.0.0.RELEASE
|
||||
group=org.maxkey
|
||||
version=1.0.0.RELEASE
|
||||
vendor=http://www.connsec.com
|
||||
@ -1,7 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="src" path="src/main/java"/>
|
||||
<classpathentry kind="src" output="bin/main" path="src/main/java">
|
||||
<attributes>
|
||||
<attribute name="gradle_scope" value="main"/>
|
||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8/"/>
|
||||
<classpathentry kind="con" path="org.eclipse.buildship.core.gradleclasspathcontainer"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
<classpathentry kind="output" path="bin/default"/>
|
||||
</classpath>
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>maxkey-authentications</name>
|
||||
<comment>Project maxkey-authentications created by Buildship.</comment>
|
||||
<comment>maxkey-authentications</comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
@ -20,11 +20,6 @@
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.springframework.ide.eclipse.boot.validation.springbootbuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.wst.validation.validationbuilder</name>
|
||||
<arguments>
|
||||
@ -32,10 +27,9 @@
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
|
||||
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
|
||||
<nature>org.eclipse.buildship.core.gradleprojectnature</nature>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
<nature>org.eclipse.buildship.core.gradleprojectnature</nature>
|
||||
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
|
||||
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
||||
|
||||
@ -1,24 +0,0 @@
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.builder.cleanOutputFolder=clean
|
||||
org.eclipse.jdt.core.builder.duplicateResourceTask=warning
|
||||
org.eclipse.jdt.core.builder.invalidClasspath=abort
|
||||
org.eclipse.jdt.core.builder.recreateModifiedClassFileInOutputFolder=ignore
|
||||
org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=
|
||||
org.eclipse.jdt.core.circularClasspath=warning
|
||||
org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
|
||||
org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
|
||||
org.eclipse.jdt.core.classpath.outputOverlappingAnotherSource=error
|
||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
|
||||
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
|
||||
org.eclipse.jdt.core.compiler.compliance=1.8
|
||||
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
|
||||
org.eclipse.jdt.core.compiler.debug.localVariable=generate
|
||||
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
|
||||
org.eclipse.jdt.core.compiler.maxProblemPerUnit=100
|
||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.source=1.8
|
||||
org.eclipse.jdt.core.incompatibleJDKLevel=ignore
|
||||
org.eclipse.jdt.core.incompleteClasspath=error
|
||||
@ -4,18 +4,7 @@ description = "maxkey-authentications"
|
||||
|
||||
dependencies {
|
||||
//local jars
|
||||
compile fileTree(dir: '../maxkey-lib/spring/', include: '*.jar')
|
||||
compile fileTree(dir: '../maxkey-lib/spring-security/', include: '*.jar')
|
||||
compile fileTree(dir: '../maxkey-lib/apache/', include: '*.jar')
|
||||
compile fileTree(dir: '../maxkey-lib/db/', include: '*.jar')
|
||||
compile fileTree(dir: '../maxkey-lib/tiles/', include: '*.jar')
|
||||
compile fileTree(dir: '../maxkey-lib/common/', include: '*.jar')
|
||||
compile fileTree(dir: '../maxkey-lib/opensaml/', include: '*.jar')
|
||||
compile fileTree(dir: '../maxkey-lib/xml/', include: '*.jar')
|
||||
compile fileTree(dir: '../maxkey-lib/json/', include: '*.jar')
|
||||
compile fileTree(dir: '../maxkey-lib/log/', include: '*.jar')
|
||||
compile fileTree(dir: '../maxkey-lib/java/', include: '*.jar')
|
||||
compile fileTree(dir: '../maxkey-lib/other/', include: '*.jar')
|
||||
compile fileTree(dir: '../maxkey-lib/', include: '*/*.jar')
|
||||
|
||||
|
||||
|
||||
|
||||
@ -1,8 +1,18 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="src" path="src/main/java"/>
|
||||
<classpathentry kind="src" path="src/test/java"/>
|
||||
<classpathentry kind="src" output="bin/main" path="src/main/java">
|
||||
<attributes>
|
||||
<attribute name="gradle_scope" value="main"/>
|
||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="src" output="bin/test" path="src/test/java">
|
||||
<attributes>
|
||||
<attribute name="gradle_scope" value="test"/>
|
||||
<attribute name="gradle_used_by_scope" value="test"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8/"/>
|
||||
<classpathentry kind="con" path="org.eclipse.buildship.core.gradleclasspathcontainer"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
<classpathentry kind="output" path="bin/default"/>
|
||||
</classpath>
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>maxkey-client-sdk</name>
|
||||
<comment>Project maxkey-client-sdk created by Buildship.</comment>
|
||||
<comment>maxkey-client-sdk</comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
@ -27,10 +27,9 @@
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
|
||||
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
|
||||
<nature>org.eclipse.buildship.core.gradleprojectnature</nature>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
<nature>org.eclipse.buildship.core.gradleprojectnature</nature>
|
||||
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
|
||||
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
||||
|
||||
@ -1,7 +0,0 @@
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
|
||||
org.eclipse.jdt.core.compiler.compliance=1.8
|
||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.source=1.8
|
||||
@ -7,5 +7,4 @@ dependencies {
|
||||
compile fileTree(dir: '../maxkey-lib/apache/', include: 'commons-codec*.jar')
|
||||
compile fileTree(dir: '../maxkey-lib/json/', include: 'gson*.jar')
|
||||
compile fileTree(dir: '../maxkey-lib/java/', include: '*.jar')
|
||||
|
||||
}
|
||||
@ -1,8 +1,18 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="src" path="src/main/java"/>
|
||||
<classpathentry kind="src" path="src/test/java"/>
|
||||
<classpathentry kind="src" output="bin/main" path="src/main/java">
|
||||
<attributes>
|
||||
<attribute name="gradle_scope" value="main"/>
|
||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="src" output="bin/test" path="src/test/java">
|
||||
<attributes>
|
||||
<attribute name="gradle_scope" value="test"/>
|
||||
<attribute name="gradle_used_by_scope" value="test"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8/"/>
|
||||
<classpathentry kind="con" path="org.eclipse.buildship.core.gradleclasspathcontainer"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
<classpathentry kind="output" path="bin/default"/>
|
||||
</classpath>
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>maxkey-core</name>
|
||||
<comment>Project maxkey-core created by Buildship.</comment>
|
||||
<comment>maxkey-core</comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
@ -20,11 +20,6 @@
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.springframework.ide.eclipse.boot.validation.springbootbuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.wst.validation.validationbuilder</name>
|
||||
<arguments>
|
||||
@ -32,10 +27,9 @@
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
|
||||
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
|
||||
<nature>org.eclipse.buildship.core.gradleprojectnature</nature>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
<nature>org.eclipse.buildship.core.gradleprojectnature</nature>
|
||||
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
|
||||
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
||||
|
||||
@ -1,12 +0,0 @@
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
|
||||
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
|
||||
org.eclipse.jdt.core.compiler.compliance=1.8
|
||||
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
|
||||
org.eclipse.jdt.core.compiler.debug.localVariable=generate
|
||||
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
|
||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.source=1.8
|
||||
@ -2,18 +2,7 @@ description = "maxkey-core"
|
||||
|
||||
dependencies {
|
||||
//local jars
|
||||
compile fileTree(dir: '../maxkey-lib/spring/', include: '*.jar')
|
||||
compile fileTree(dir: '../maxkey-lib/spring-security/', include: '*.jar')
|
||||
compile fileTree(dir: '../maxkey-lib/apache/', include: '*.jar')
|
||||
compile fileTree(dir: '../maxkey-lib/db/', include: '*.jar')
|
||||
compile fileTree(dir: '../maxkey-lib/tiles/', include: '*.jar')
|
||||
compile fileTree(dir: '../maxkey-lib/common/', include: '*.jar')
|
||||
compile fileTree(dir: '../maxkey-lib/opensaml/', include: '*.jar')
|
||||
compile fileTree(dir: '../maxkey-lib/xml/', include: '*.jar')
|
||||
compile fileTree(dir: '../maxkey-lib/json/', include: '*.jar')
|
||||
compile fileTree(dir: '../maxkey-lib/log/', include: '*.jar')
|
||||
compile fileTree(dir: '../maxkey-lib/java/', include: '*.jar')
|
||||
compile fileTree(dir: '../maxkey-lib/other/', include: '*.jar')
|
||||
compile fileTree(dir: '../maxkey-lib/', include: '*/*.jar')
|
||||
|
||||
compile project(":maxkey-jose-jwt")
|
||||
}
|
||||
@ -42,10 +42,10 @@ public abstract class AbstractAuthenticationProvider{
|
||||
@Qualifier("tfaOTPAuthn")
|
||||
protected AbstractOTPAuthn tfaOTPAuthn;
|
||||
|
||||
@Autowired
|
||||
/* @Autowired
|
||||
@Qualifier("jwtLoginService")
|
||||
JwtLoginService jwtLoginService;
|
||||
|
||||
*/
|
||||
protected abstract String getProviderName();
|
||||
|
||||
protected abstract Authentication doInternalAuthenticate(Authentication authentication);
|
||||
@ -61,14 +61,13 @@ public abstract class AbstractAuthenticationProvider{
|
||||
* @see org.springframework.security.authentication.AuthenticationProvider#authenticate(org.springframework.security.core.Authentication)
|
||||
*/
|
||||
public Authentication authenticate(Authentication authentication) throws AuthenticationException {
|
||||
String username = authentication.getName();
|
||||
_logger.debug("Trying to authenticate user '{}' via {}", username, getProviderName());
|
||||
_logger.debug("Trying to authenticate user '{}' via {}", authentication.getPrincipal(), getProviderName());
|
||||
|
||||
try {
|
||||
authentication = doInternalAuthenticate(authentication);
|
||||
} catch (AuthenticationException e) {
|
||||
e.printStackTrace();
|
||||
_logger.error("Failed to authenticate user {} via {}: {}", new Object[]{username, getProviderName(), e.getMessage()});
|
||||
_logger.error("Failed to authenticate user {} via {}: {}", new Object[]{authentication.getPrincipal(), getProviderName(), e.getMessage()});
|
||||
throw e;
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
@ -81,7 +80,7 @@ public abstract class AbstractAuthenticationProvider{
|
||||
}
|
||||
|
||||
// user authenticated
|
||||
_logger.debug("'{}' authenticated successfully by {}.", username, getProviderName());
|
||||
_logger.debug("'{0}' authenticated successfully by {}.", authentication.getPrincipal(), getProviderName());
|
||||
|
||||
UserInfo userInfo=WebContext.getUserInfo();
|
||||
WebContext.setAttribute(WebConstants.CURRENT_USER_SESSION_ID, WebContext.getSession().getId());
|
||||
@ -115,11 +114,11 @@ public abstract class AbstractAuthenticationProvider{
|
||||
* @param sessionId
|
||||
*/
|
||||
protected void jwtTokenValid(String j_jwtToken){
|
||||
if(j_jwtToken!=null && ! j_jwtToken.equals("")){
|
||||
/*if(j_jwtToken!=null && ! j_jwtToken.equals("")){
|
||||
if(jwtLoginService.jwtTokenValidation(j_jwtToken)){
|
||||
return;
|
||||
}
|
||||
}
|
||||
}*/
|
||||
String message=WebContext.getI18nValue("login.error.session");
|
||||
_logger.debug("login session valid error.");
|
||||
throw new BadCredentialsException(message);
|
||||
|
||||
@ -0,0 +1,135 @@
|
||||
package org.maxkey.authn;
|
||||
|
||||
import java.util.Collection;
|
||||
import org.springframework.security.core.Authentication;
|
||||
import org.springframework.security.core.GrantedAuthority;
|
||||
|
||||
public class BasicAuthentication implements Authentication{
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = -110742975439268030L;
|
||||
String j_username ;
|
||||
String j_password ;
|
||||
String j_sessionid;
|
||||
String j_captcha;
|
||||
String j_otp_captcha;
|
||||
String j_remeberme;
|
||||
String j_auth_type;
|
||||
String j_jwt_token;
|
||||
|
||||
boolean authenticated;
|
||||
|
||||
public BasicAuthentication() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return "Basic Authentication";
|
||||
}
|
||||
|
||||
@Override
|
||||
public Collection<? extends GrantedAuthority> getAuthorities() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getCredentials() {
|
||||
return this.getJ_password();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getDetails() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getPrincipal() {
|
||||
return this.getJ_username();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isAuthenticated() {
|
||||
return authenticated;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setAuthenticated(boolean authenticated) throws IllegalArgumentException {
|
||||
this.authenticated=authenticated;
|
||||
|
||||
}
|
||||
|
||||
public String getJ_username() {
|
||||
return j_username;
|
||||
}
|
||||
|
||||
public void setJ_username(String j_username) {
|
||||
this.j_username = j_username;
|
||||
}
|
||||
|
||||
public String getJ_password() {
|
||||
return j_password;
|
||||
}
|
||||
|
||||
public void setJ_password(String j_password) {
|
||||
this.j_password = j_password;
|
||||
}
|
||||
|
||||
public String getJ_sessionid() {
|
||||
return j_sessionid;
|
||||
}
|
||||
|
||||
public void setJ_sessionid(String j_sessionid) {
|
||||
this.j_sessionid = j_sessionid;
|
||||
}
|
||||
|
||||
public String getJ_captcha() {
|
||||
return j_captcha;
|
||||
}
|
||||
|
||||
public void setJ_captcha(String j_captcha) {
|
||||
this.j_captcha = j_captcha;
|
||||
}
|
||||
|
||||
public String getJ_otp_captcha() {
|
||||
return j_otp_captcha;
|
||||
}
|
||||
|
||||
public void setJ_otp_captcha(String j_otp_captcha) {
|
||||
this.j_otp_captcha = j_otp_captcha;
|
||||
}
|
||||
|
||||
public String getJ_remeberme() {
|
||||
return j_remeberme;
|
||||
}
|
||||
|
||||
public void setJ_remeberme(String j_remeberme) {
|
||||
this.j_remeberme = j_remeberme;
|
||||
}
|
||||
|
||||
public String getJ_auth_type() {
|
||||
return j_auth_type;
|
||||
}
|
||||
|
||||
public void setJ_auth_type(String j_auth_type) {
|
||||
this.j_auth_type = j_auth_type;
|
||||
}
|
||||
|
||||
public String getJ_jwt_token() {
|
||||
return j_jwt_token;
|
||||
}
|
||||
|
||||
public void setJ_jwt_token(String j_jwt_token) {
|
||||
this.j_jwt_token = j_jwt_token;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "BasicAuthentication [j_username=" + j_username + ", j_sessionId=" + j_sessionid + ", j_captcha="
|
||||
+ j_captcha + ", j_otp_captcha=" + j_otp_captcha + ", j_remeberMe=" + j_remeberme + ", j_auth_type="
|
||||
+ j_auth_type + ", j_jwtToken=" + j_jwt_token + ", authenticated=" + authenticated + "]";
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -1,7 +1,5 @@
|
||||
package org.maxkey.authn;
|
||||
|
||||
import javax.servlet.http.HttpSession;
|
||||
|
||||
import org.maxkey.domain.UserInfo;
|
||||
import org.maxkey.web.WebConstants;
|
||||
import org.maxkey.web.WebContext;
|
||||
@ -22,68 +20,52 @@ public class RealmAuthenticationProvider extends AbstractAuthenticationProvider
|
||||
private static final Logger _logger = LoggerFactory.getLogger(RealmAuthenticationProvider.class);
|
||||
|
||||
protected String getProviderName() {
|
||||
return "UserInfo";
|
||||
return "RealmAuthenticationProvider";
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Authentication doInternalAuthenticate(Authentication authentication) {
|
||||
HttpSession session = WebContext.getSession();
|
||||
// All your user authentication needs
|
||||
String j_username = (String) authentication.getPrincipal();
|
||||
String j_password = (String) authentication.getCredentials();
|
||||
String j_sessionId=WebContext.getRequest().getParameter("j_sessionid");
|
||||
String j_captcha=WebContext.getRequest().getParameter("j_captcha");
|
||||
String j_otp_captcha=WebContext.getRequest().getParameter("j_otp_captcha");
|
||||
String j_remeberMe=WebContext.getRequest().getParameter("j_remeberMe");
|
||||
String j_auth_type=WebContext.getRequest().getParameter("j_auth_type");
|
||||
String j_jwtToken=WebContext.getRequest().getParameter("j_jwttoken");
|
||||
BasicAuthentication auth =(BasicAuthentication)authentication;
|
||||
|
||||
_logger.info("principal : "+j_username);
|
||||
_logger.info("credentials : PROTECTED");
|
||||
_logger.info("j_auth_type input : "+j_auth_type);
|
||||
_logger.info("captcha input : "+j_captcha);
|
||||
_logger.info("j_otp_captcha input : "+j_otp_captcha);
|
||||
_logger.info("sessionId : "+j_sessionId);
|
||||
_logger.info("session getId() : "+session.getId());
|
||||
_logger.info("Authentication principal :"+authentication.getName()+" , credentials : ********");
|
||||
_logger.debug("authentication "+auth);
|
||||
|
||||
sessionValid(j_sessionId);
|
||||
sessionValid(auth.getJ_sessionid());
|
||||
|
||||
jwtTokenValid(j_jwtToken);
|
||||
//jwtTokenValid(j_jwtToken);
|
||||
|
||||
authTypeValid(j_auth_type);
|
||||
authTypeValid(auth.getJ_auth_type());
|
||||
|
||||
captchaValid(j_captcha,j_auth_type);
|
||||
captchaValid(auth.getJ_captcha(),auth.getJ_auth_type());
|
||||
|
||||
emptyPasswordValid(j_password);
|
||||
emptyPasswordValid(auth.getJ_password());
|
||||
|
||||
UserInfo userInfo = null;
|
||||
|
||||
emptyUsernameValid(j_username);
|
||||
emptyUsernameValid(auth.getJ_username());
|
||||
|
||||
userInfo= loadUserInfo(j_username,j_password);
|
||||
userInfo= loadUserInfo(auth.getJ_username(),auth.getJ_password());
|
||||
|
||||
userinfoValid(userInfo, j_username);
|
||||
userinfoValid(userInfo, auth.getJ_password());
|
||||
|
||||
tftcaptchaValid(j_otp_captcha,j_auth_type,userInfo);
|
||||
tftcaptchaValid(auth.getJ_otp_captcha(),auth.getJ_auth_type(),userInfo);
|
||||
|
||||
authenticationRealm.passwordPolicyValid(userInfo);
|
||||
|
||||
authenticationRealm.passwordMatches(userInfo, j_password);
|
||||
authenticationRealm.passwordMatches(userInfo, auth.getJ_password());
|
||||
/**
|
||||
* put userInfo to current session context
|
||||
*/
|
||||
WebContext.setUserInfo(userInfo);
|
||||
|
||||
if(applicationConfig.getLoginConfig().isRemeberMe()){
|
||||
if(j_remeberMe!=null&&j_remeberMe.equals("remeberMe")){
|
||||
WebContext.getSession().setAttribute(WebConstants.REMEBER_ME_SESSION,j_username);
|
||||
if(auth.getJ_remeberme()!=null&&auth.getJ_remeberme().equals("remeberMe")){
|
||||
WebContext.getSession().setAttribute(WebConstants.REMEBER_ME_SESSION,auth.getJ_username());
|
||||
_logger.debug("do Remeber Me");
|
||||
}
|
||||
}
|
||||
UsernamePasswordAuthenticationToken usernamePasswordAuthenticationToken =new UsernamePasswordAuthenticationToken(
|
||||
userInfo,
|
||||
j_password,
|
||||
auth.getJ_password(),
|
||||
authenticationRealm.grantAuthorityAndNavs(userInfo));
|
||||
usernamePasswordAuthenticationToken.setDetails(new WebAuthenticationDetails(WebContext.getRequest()));
|
||||
|
||||
|
||||
@ -143,7 +143,7 @@ public abstract class AbstractAuthenticationRealm{
|
||||
return true;
|
||||
}
|
||||
|
||||
public UserInfo loadUserInfo(String username,String j_password) {
|
||||
public UserInfo loadUserInfo(String username,String password) {
|
||||
List<UserInfo> listUserInfo=jdbcTemplate.query(
|
||||
DEFAULT_USERINFO_SELECT_STATEMENT,
|
||||
new UserInfoRowMapper(),
|
||||
@ -156,7 +156,7 @@ public abstract class AbstractAuthenticationRealm{
|
||||
return userInfo;
|
||||
}
|
||||
|
||||
public abstract boolean passwordMatches(UserInfo userInfo,String j_password);
|
||||
public abstract boolean passwordMatches(UserInfo userInfo,String password);
|
||||
|
||||
|
||||
public static boolean isAuthenticated(){
|
||||
|
||||
@ -3,7 +3,7 @@ package org.maxkey.config;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.apache.mybatis.jpa.dialect.Dialect;
|
||||
import org.maxkey.crypto.Base64Utils;
|
||||
import org.maxkey.crypto.ReciprocalUtils;
|
||||
import org.maxkey.crypto.password.PasswordReciprocal;
|
||||
|
||||
/**
|
||||
* 数据源配置
|
||||
@ -82,13 +82,14 @@ public class DataSoruceConfig {
|
||||
String decodePassword="";
|
||||
LogFactory.getLog(DataSoruceConfig.class).debug("password is "+password);
|
||||
if(encrypt){
|
||||
decodePassword = ReciprocalUtils.decoder(password);
|
||||
decodePassword = PasswordReciprocal.getInstance().decoder(password);
|
||||
}else{
|
||||
decodePassword= password;
|
||||
}
|
||||
LogFactory.getLog(DataSoruceConfig.class).debug("password is "+password+" , decodePassword is "+Base64Utils.encode(decodePassword));
|
||||
LogFactory.getLog(DataSoruceConfig.class).debug("password is "+password+" , decodePassword is "+decodePassword);
|
||||
return decodePassword;
|
||||
}
|
||||
|
||||
public void setPassword(String password) {
|
||||
this.password = password;
|
||||
}
|
||||
|
||||
@ -24,9 +24,9 @@ import com.nimbusds.jose.jwk.JWKSet;
|
||||
public class RecipientJwtEncryptionAndDecryptionServiceBuilder {
|
||||
final static Logger logger = Logger.getLogger(RecipientJwtEncryptionAndDecryptionServiceBuilder.class);
|
||||
|
||||
private HttpClient httpClient = HttpClientBuilder.create().useSystemProperties().build();
|
||||
private HttpComponentsClientHttpRequestFactory httpFactory = new HttpComponentsClientHttpRequestFactory(httpClient);
|
||||
private RestTemplate restTemplate = new RestTemplate(httpFactory);
|
||||
//private HttpClient httpClient = HttpClientBuilder.create().useSystemProperties().build();
|
||||
//private HttpComponentsClientHttpRequestFactory httpFactory = new HttpComponentsClientHttpRequestFactory(httpClient);
|
||||
//private RestTemplate restTemplate = new RestTemplate(httpFactory);
|
||||
|
||||
/**
|
||||
*
|
||||
@ -39,7 +39,7 @@ public class RecipientJwtEncryptionAndDecryptionServiceBuilder {
|
||||
|
||||
logger.debug("jwksUri : "+jwksUri);
|
||||
|
||||
String jsonString = restTemplate.getForObject(jwksUri, String.class);
|
||||
String jsonString ="";//= restTemplate.getForObject(jwksUri, String.class);
|
||||
|
||||
logger.debug("jwks json String : "+jsonString);
|
||||
JwtEncryptionAndDecryptionService recipientJwtEncryptionAndDecryptionService;
|
||||
|
||||
@ -0,0 +1,18 @@
|
||||
package org.maxkey.domain;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import org.apache.mybatis.jpa.persistence.JpaBaseDomain;
|
||||
|
||||
public class Organizations extends JpaBaseDomain implements Serializable{
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 5085413816404119803L;
|
||||
|
||||
public Organizations() {
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
}
|
||||
@ -95,7 +95,8 @@ public class RedisConnectionFactory {
|
||||
}
|
||||
|
||||
public void close(Jedis conn){
|
||||
jedisPool.returnResource(conn);
|
||||
//jedisPool.returnResource(conn);
|
||||
conn.close();
|
||||
}
|
||||
|
||||
public String getHostname() {
|
||||
|
||||
@ -41,7 +41,8 @@ public class PathUtils {
|
||||
classPath=classPath.substring(5, classPath.length());
|
||||
}
|
||||
|
||||
classPath=classPath.substring(0,classPath.indexOf("/com/connsec/util/PathUtils.properties"));
|
||||
_logger.info("PathUtils Class Path : " + classPath);
|
||||
classPath=classPath.substring(0,classPath.indexOf("/org/maxkey/util/PathUtils.properties"));
|
||||
if(classPath.indexOf(WEB_INFO)==-1) {
|
||||
appPath=classPath.substring(0,classPath.lastIndexOf("/"));
|
||||
}else {
|
||||
|
||||
@ -1,69 +1,422 @@
|
||||
/*
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.maxkey.web.tag;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import javax.servlet.jsp.JspException;
|
||||
import javax.servlet.jsp.PageContext;
|
||||
import javax.servlet.jsp.tagext.TagSupport;
|
||||
|
||||
import org.maxkey.web.WebContext;
|
||||
import javax.servlet.jsp.JspTagException;
|
||||
|
||||
import org.springframework.context.MessageSource;
|
||||
import org.springframework.context.MessageSourceResolvable;
|
||||
import org.springframework.context.NoSuchMessageException;
|
||||
import org.springframework.lang.Nullable;
|
||||
import org.springframework.util.ObjectUtils;
|
||||
import org.springframework.util.StringUtils;
|
||||
import org.springframework.web.servlet.tags.ArgumentAware;
|
||||
import org.springframework.web.servlet.tags.HtmlEscapingAwareTag;
|
||||
import org.springframework.web.util.JavaScriptUtils;
|
||||
import org.springframework.web.util.TagUtils;
|
||||
|
||||
/**
|
||||
* 本地语言标签
|
||||
* 国际化使用
|
||||
* @author Crystal.Sea
|
||||
* The {@code <message>} tag looks up a message in the scope of this page.
|
||||
* Messages are resolved using the ApplicationContext and thus support
|
||||
* internationalization.
|
||||
*
|
||||
* <p>Detects an HTML escaping setting, either on this tag instance, the page level,
|
||||
* or the {@code web.xml} level. Can also apply JavaScript escaping.
|
||||
*
|
||||
* <p>If "code" isn't set or cannot be resolved, "text" will be used as default
|
||||
* message. Thus, this tag can also be used for HTML escaping of any texts.
|
||||
*
|
||||
* <p>Message arguments can be specified via the {@link #setArguments(Object) arguments}
|
||||
* attribute or by using nested {@code <spring:argument>} tags.
|
||||
*
|
||||
* <table>
|
||||
* <caption>Attribute Summary</caption>
|
||||
* <thead>
|
||||
* <tr>
|
||||
* <th>Attribute</th>
|
||||
* <th>Required?</th>
|
||||
* <th>Runtime Expression?</th>
|
||||
* <th>Description</th>
|
||||
* </tr>
|
||||
* </thead>
|
||||
* <tbody>
|
||||
* <tr>
|
||||
* <td>arguments</td>
|
||||
* <td>false</td>
|
||||
* <td>true</td>
|
||||
* <td>Set optional message arguments for this tag, as a (comma-)delimited
|
||||
* String (each String argument can contain JSP EL), an Object array (used as
|
||||
* argument array), or a single Object (used as single argument).</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td>argumentSeparator</td>
|
||||
* <td>false</td>
|
||||
* <td>true</td>
|
||||
* <td>The separator character to be used for splitting the arguments string
|
||||
* value; defaults to a 'comma' (',').</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td>code</td>
|
||||
* <td>false</td>
|
||||
* <td>true</td>
|
||||
* <td>The code (key) to use when looking up the message.
|
||||
* If code is not provided, the text attribute will be used.</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td>htmlEscape</td>
|
||||
* <td>false</td>
|
||||
* <td>true</td>
|
||||
* <td>Set HTML escaping for this tag, as boolean value.
|
||||
* Overrides the default HTML escaping setting for the current page.</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td>javaScriptEscape</td>
|
||||
* <td>false</td>
|
||||
* <td>true</td>
|
||||
* <td>Set JavaScript escaping for this tag, as boolean value.
|
||||
* Default is false.</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td>message</td>
|
||||
* <td>false</td>
|
||||
* <td>true</td>
|
||||
* <td>A MessageSourceResolvable argument (direct or through JSP EL).
|
||||
* Fits nicely when used in conjunction with Spring’s own validation error
|
||||
* classes which all implement the MessageSourceResolvable interface.
|
||||
* For example, this allows you to iterate over all of the errors in a form,
|
||||
* passing each error (using a runtime expression) as the value of this
|
||||
* 'message' attribute, thus effecting the easy display of such error
|
||||
* messages.</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td>scope</td>
|
||||
* <td>false</td>
|
||||
* <td>true</td>
|
||||
* <td>The scope to use when exporting the result to a variable. This attribute
|
||||
* is only used when var is also set. Possible values are page, request, session
|
||||
* and application.</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td>text</td>
|
||||
* <td>false</td>
|
||||
* <td>true</td>
|
||||
* <td>Default text to output when a message for the given code could not be
|
||||
* found. If both text and code are not set, the tag will output null.</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td>var</td>
|
||||
* <td>false</td>
|
||||
* <td>true</td>
|
||||
* <td>The string to use when binding the result to the page, request, session
|
||||
* or application scope. If not specified, the result gets outputted to the writer
|
||||
* (i.e. typically directly to the JSP).</td>
|
||||
* </tr>
|
||||
* </tbody>
|
||||
* </table>
|
||||
*
|
||||
* @author Rod Johnson
|
||||
* @author Juergen Hoeller
|
||||
* @author Nicholas Williams
|
||||
* @see #setCode
|
||||
* @see #setText
|
||||
* @see #setHtmlEscape
|
||||
* @see #setJavaScriptEscape
|
||||
* @see HtmlEscapeTag#setDefaultHtmlEscape
|
||||
* @see org.springframework.web.util.WebUtils#HTML_ESCAPE_CONTEXT_PARAM
|
||||
* @see ArgumentTag
|
||||
*/
|
||||
public class LocaleTag extends TagSupport{
|
||||
@SuppressWarnings("serial")
|
||||
public class LocaleTag extends HtmlEscapingAwareTag implements ArgumentAware {
|
||||
|
||||
/**
|
||||
*
|
||||
* Default separator for splitting an arguments String: a comma (",").
|
||||
*/
|
||||
private static final long serialVersionUID = -3906613920420893358L;
|
||||
public static final String DEFAULT_ARGUMENT_SEPARATOR = ",";
|
||||
|
||||
private PageContext pageContext;
|
||||
|
||||
@Nullable
|
||||
private MessageSourceResolvable message;
|
||||
|
||||
@Nullable
|
||||
private String code;
|
||||
|
||||
@Nullable
|
||||
private Object arguments;
|
||||
|
||||
private String argumentSeparator = DEFAULT_ARGUMENT_SEPARATOR;
|
||||
|
||||
private List<Object> nestedArguments = Collections.emptyList();
|
||||
|
||||
@Nullable
|
||||
private String text;
|
||||
|
||||
@Nullable
|
||||
private String var;
|
||||
|
||||
private String scope = TagUtils.SCOPE_PAGE;
|
||||
|
||||
private boolean javaScriptEscape = false;
|
||||
|
||||
|
||||
/**
|
||||
* @param code the code to set
|
||||
* Set the MessageSourceResolvable for this tag.
|
||||
* <p>If a MessageSourceResolvable is specified, it effectively overrides
|
||||
* any code, arguments or text specified on this tag.
|
||||
*/
|
||||
public void setMessage(MessageSourceResolvable message) {
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the message code for this tag.
|
||||
*/
|
||||
public void setCode(String code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public void setPageContext(PageContext pageContext) {
|
||||
this.pageContext = pageContext;
|
||||
/**
|
||||
* Set optional message arguments for this tag, as a comma-delimited
|
||||
* String (each String argument can contain JSP EL), an Object array
|
||||
* (used as argument array), or a single Object (used as single argument).
|
||||
*/
|
||||
public void setArguments(Object arguments) {
|
||||
this.arguments = arguments;
|
||||
}
|
||||
|
||||
public final int doStartTag() throws JspException{
|
||||
return SKIP_BODY;
|
||||
/**
|
||||
* Set the separator to use for splitting an arguments String.
|
||||
* Default is a comma (",").
|
||||
* @see #setArguments
|
||||
*/
|
||||
public void setArgumentSeparator(String argumentSeparator) {
|
||||
this.argumentSeparator = argumentSeparator;
|
||||
}
|
||||
|
||||
public final int doEndTag() throws JspException{
|
||||
int tagReturn=EVAL_PAGE;
|
||||
try{
|
||||
if(null==code){
|
||||
pageContext.getOut().print(WebContext.getRequestLocale());
|
||||
}else{
|
||||
String localeText=WebContext.getI18nValue(code);
|
||||
if(localeText==null||localeText.equals("")){
|
||||
String []localPath=code.split("\\.");
|
||||
localeText=localPath[(localPath.length>1?localPath.length-1:0)];
|
||||
localeText=localeText.toUpperCase().charAt(0)+localeText.substring(1);
|
||||
@Override
|
||||
public void addArgument(@Nullable Object argument) throws JspTagException {
|
||||
this.nestedArguments.add(argument);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the message text for this tag.
|
||||
*/
|
||||
public void setText(String text) {
|
||||
this.text = text;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set PageContext attribute name under which to expose
|
||||
* a variable that contains the resolved message.
|
||||
* @see #setScope
|
||||
* @see javax.servlet.jsp.PageContext#setAttribute
|
||||
*/
|
||||
public void setVar(String var) {
|
||||
this.var = var;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the scope to export the variable to.
|
||||
* Default is SCOPE_PAGE ("page").
|
||||
* @see #setVar
|
||||
* @see org.springframework.web.util.TagUtils#SCOPE_PAGE
|
||||
* @see javax.servlet.jsp.PageContext#setAttribute
|
||||
*/
|
||||
public void setScope(String scope) {
|
||||
this.scope = scope;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set JavaScript escaping for this tag, as boolean value.
|
||||
* Default is "false".
|
||||
*/
|
||||
public void setJavaScriptEscape(boolean javaScriptEscape) throws JspException {
|
||||
this.javaScriptEscape = javaScriptEscape;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected final int doStartTagInternal() throws JspException, IOException {
|
||||
this.nestedArguments = new LinkedList<>();
|
||||
return EVAL_BODY_INCLUDE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Resolves the message, escapes it if demanded,
|
||||
* and writes it to the page (or exposes it as variable).
|
||||
* @see #resolveMessage()
|
||||
* @see org.springframework.web.util.HtmlUtils#htmlEscape(String)
|
||||
* @see org.springframework.web.util.JavaScriptUtils#javaScriptEscape(String)
|
||||
* @see #writeMessage(String)
|
||||
*/
|
||||
@Override
|
||||
public int doEndTag() throws JspException {
|
||||
try {
|
||||
if(code==null) {
|
||||
pageContext.getOut().print(getRequestContext().getLocale());
|
||||
}else {
|
||||
// Resolve the unescaped message.
|
||||
String msg = resolveMessage();
|
||||
|
||||
// HTML and/or JavaScript escape, if demanded.
|
||||
msg = htmlEscape(msg);
|
||||
msg = this.javaScriptEscape ? JavaScriptUtils.javaScriptEscape(msg) : msg;
|
||||
|
||||
// Expose as variable, if demanded, else write to the page.
|
||||
if (this.var != null) {
|
||||
this.pageContext.setAttribute(this.var, msg, TagUtils.getScope(this.scope));
|
||||
}
|
||||
pageContext.getOut().print(localeText);
|
||||
else {
|
||||
writeMessage(msg);
|
||||
}
|
||||
}
|
||||
return EVAL_PAGE;
|
||||
}
|
||||
catch (IOException ex) {
|
||||
System.out.println("IOException code "+code);
|
||||
throw new JspTagException(ex.getMessage(), ex);
|
||||
}
|
||||
catch (NoSuchMessageException ex) {
|
||||
System.out.println("IOException code "+code);
|
||||
throw new JspTagException(getNoSuchMessageExceptionDescription(ex));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void release() {
|
||||
super.release();
|
||||
this.arguments = null;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Resolve the specified message into a concrete message String.
|
||||
* The returned message String should be unescaped.
|
||||
*/
|
||||
protected String resolveMessage() throws JspException, NoSuchMessageException {
|
||||
MessageSource messageSource = getMessageSource();
|
||||
|
||||
// Evaluate the specified MessageSourceResolvable, if any.
|
||||
if (this.message != null) {
|
||||
// We have a given MessageSourceResolvable.
|
||||
return messageSource.getMessage(this.message, getRequestContext().getLocale());
|
||||
}
|
||||
|
||||
if (this.code != null || this.text != null) {
|
||||
// We have a code or default text that we need to resolve.
|
||||
Object[] argumentsArray = resolveArguments(this.arguments);
|
||||
if (!this.nestedArguments.isEmpty()) {
|
||||
argumentsArray = appendArguments(argumentsArray, this.nestedArguments.toArray());
|
||||
}
|
||||
|
||||
pageContext.getOut().flush();
|
||||
} catch (IOException e){
|
||||
throw new JspException("exception="+e.getMessage());
|
||||
if (this.text != null) {
|
||||
// We have a fallback text to consider.
|
||||
String msg = messageSource.getMessage(
|
||||
this.code, argumentsArray, this.text, getRequestContext().getLocale());
|
||||
return (msg != null ? msg : "");
|
||||
}
|
||||
else {
|
||||
// We have no fallback text to consider.
|
||||
return messageSource.getMessage(
|
||||
this.code, argumentsArray, getRequestContext().getLocale());
|
||||
}
|
||||
}
|
||||
return tagReturn;
|
||||
|
||||
System.out.println("No resolvable message for code "+code);
|
||||
return argumentSeparator;
|
||||
}
|
||||
|
||||
private Object[] appendArguments(@Nullable Object[] sourceArguments, Object[] additionalArguments) {
|
||||
if (ObjectUtils.isEmpty(sourceArguments)) {
|
||||
return additionalArguments;
|
||||
}
|
||||
Object[] arguments = new Object[sourceArguments.length + additionalArguments.length];
|
||||
System.arraycopy(sourceArguments, 0, arguments, 0, sourceArguments.length);
|
||||
System.arraycopy(additionalArguments, 0, arguments, sourceArguments.length, additionalArguments.length);
|
||||
return arguments;
|
||||
}
|
||||
|
||||
/**
|
||||
* Resolve the given arguments Object into an arguments array.
|
||||
* @param arguments the specified arguments Object
|
||||
* @return the resolved arguments as array
|
||||
* @throws JspException if argument conversion failed
|
||||
* @see #setArguments
|
||||
*/
|
||||
@Nullable
|
||||
protected Object[] resolveArguments(@Nullable Object arguments) throws JspException {
|
||||
if (arguments instanceof String) {
|
||||
String[] stringArray =
|
||||
StringUtils.delimitedListToStringArray((String) arguments, this.argumentSeparator);
|
||||
if (stringArray.length == 1) {
|
||||
Object argument = stringArray[0];
|
||||
if (argument != null && argument.getClass().isArray()) {
|
||||
return ObjectUtils.toObjectArray(argument);
|
||||
}
|
||||
else {
|
||||
return new Object[] {argument};
|
||||
}
|
||||
}
|
||||
else {
|
||||
return stringArray;
|
||||
}
|
||||
}
|
||||
else if (arguments instanceof Object[]) {
|
||||
return (Object[]) arguments;
|
||||
}
|
||||
else if (arguments instanceof Collection) {
|
||||
return ((Collection<?>) arguments).toArray();
|
||||
}
|
||||
else if (arguments != null) {
|
||||
// Assume a single argument object.
|
||||
return new Object[] {arguments};
|
||||
}
|
||||
else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Write the message to the page.
|
||||
* <p>Can be overridden in subclasses, e.g. for testing purposes.
|
||||
* @param msg the message to write
|
||||
* @throws IOException if writing failed
|
||||
*/
|
||||
protected void writeMessage(String msg) throws IOException {
|
||||
this.pageContext.getOut().write(String.valueOf(msg));
|
||||
}
|
||||
|
||||
/**
|
||||
* Use the current RequestContext's application context as MessageSource.
|
||||
*/
|
||||
protected MessageSource getMessageSource() {
|
||||
return getRequestContext().getMessageSource();
|
||||
}
|
||||
|
||||
/**
|
||||
* Return default exception message.
|
||||
*/
|
||||
protected String getNoSuchMessageExceptionDescription(NoSuchMessageException ex) {
|
||||
return ex.getMessage();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -0,0 +1,21 @@
|
||||
package org.maxkey.crypto.password;
|
||||
|
||||
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
|
||||
|
||||
public class PasswordReciprocalTest {
|
||||
|
||||
public PasswordReciprocalTest() {
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
// TODO Auto-generated method stub
|
||||
BCryptPasswordEncoder spe= new BCryptPasswordEncoder();
|
||||
String pass=PasswordReciprocal.getInstance().rawPassword("admin", "admin");
|
||||
String epass=spe.encode(pass);
|
||||
System.out.println("PasswordEncoder "+epass);
|
||||
|
||||
System.out.println(PasswordReciprocal.getInstance().decoder("bb2002b9f55b05d3e0e6f34ec5321051"));
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,8 +1,18 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="src" path="src/main/java"/>
|
||||
<classpathentry kind="src" path="src/main/resources"/>
|
||||
<classpathentry kind="src" output="bin/main" path="src/main/java">
|
||||
<attributes>
|
||||
<attribute name="gradle_scope" value="main"/>
|
||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="src" output="bin/main" path="src/main/resources">
|
||||
<attributes>
|
||||
<attribute name="gradle_scope" value="main"/>
|
||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8/"/>
|
||||
<classpathentry kind="con" path="org.eclipse.buildship.core.gradleclasspathcontainer"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
<classpathentry kind="output" path="bin/default"/>
|
||||
</classpath>
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>maxkey-dao</name>
|
||||
<comment>Project maxkey-dao created by Buildship.</comment>
|
||||
<comment>maxkey-dao</comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
@ -20,11 +20,6 @@
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.springframework.ide.eclipse.boot.validation.springbootbuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.wst.validation.validationbuilder</name>
|
||||
<arguments>
|
||||
@ -32,10 +27,9 @@
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
|
||||
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
|
||||
<nature>org.eclipse.buildship.core.gradleprojectnature</nature>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
<nature>org.eclipse.buildship.core.gradleprojectnature</nature>
|
||||
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
|
||||
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
||||
|
||||
@ -1,7 +0,0 @@
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
|
||||
org.eclipse.jdt.core.compiler.compliance=1.8
|
||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.source=1.8
|
||||
@ -2,18 +2,7 @@ description = "maxkey-dao"
|
||||
|
||||
dependencies {
|
||||
//local jars
|
||||
compile fileTree(dir: '../maxkey-lib/spring/', include: '*.jar')
|
||||
compile fileTree(dir: '../maxkey-lib/spring-security/', include: '*.jar')
|
||||
compile fileTree(dir: '../maxkey-lib/apache/', include: '*.jar')
|
||||
compile fileTree(dir: '../maxkey-lib/db/', include: '*.jar')
|
||||
compile fileTree(dir: '../maxkey-lib/tiles/', include: '*.jar')
|
||||
compile fileTree(dir: '../maxkey-lib/common/', include: '*.jar')
|
||||
compile fileTree(dir: '../maxkey-lib/opensaml/', include: '*.jar')
|
||||
compile fileTree(dir: '../maxkey-lib/xml/', include: '*.jar')
|
||||
compile fileTree(dir: '../maxkey-lib/json/', include: '*.jar')
|
||||
compile fileTree(dir: '../maxkey-lib/log/', include: '*.jar')
|
||||
compile fileTree(dir: '../maxkey-lib/java/', include: '*.jar')
|
||||
compile fileTree(dir: '../maxkey-lib/other/', include: '*.jar')
|
||||
compile fileTree(dir: '../maxkey-lib/*/', include: '*.jar')
|
||||
|
||||
compile project(":maxkey-core")
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.connsec.dao.persistence.AppAccountsMapper">
|
||||
<mapper namespace="org.maxkey.dao.persistence.AccountsMapper">
|
||||
|
||||
<sql id="where_statement">
|
||||
<if test="id != null and id != ''">
|
||||
@ -17,29 +17,9 @@
|
||||
</if>
|
||||
</sql>
|
||||
|
||||
<insert id="insert" parameterType="AppAccounts">
|
||||
INSERT INTO APP_ACCOUNTS(
|
||||
ID,
|
||||
UID,
|
||||
USERNAME,
|
||||
DISPLAYNAME,
|
||||
APPID,
|
||||
APPNAME,
|
||||
RELATEDUSERNAME,
|
||||
RELATEDPASSWORD
|
||||
)VALUES(
|
||||
#{id},
|
||||
#{uid},
|
||||
#{username},
|
||||
#{displayName},
|
||||
#{appId},
|
||||
#{appName},
|
||||
#{relatedUsername},
|
||||
#{relatedPassword}
|
||||
)
|
||||
</insert>
|
||||
|
||||
<select id="grid" parameterType="AppAccounts" resultType="AppAccounts">
|
||||
|
||||
<select id="grid" parameterType="Accounts" resultType="Accounts">
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
@ -49,7 +29,7 @@
|
||||
<include refid="where_statement"/>
|
||||
</select>
|
||||
|
||||
<select id="count" parameterType="AppAccounts" resultType="java.lang.Integer">
|
||||
<select id="count" parameterType="Accounts" resultType="java.lang.Integer">
|
||||
SELECT
|
||||
COUNT(*)
|
||||
FROM
|
||||
@ -59,36 +39,4 @@
|
||||
<include refid="where_statement"/>
|
||||
</select>
|
||||
|
||||
<update id="update" parameterType="AppAccounts" >
|
||||
UPDATE APP_ACCOUNTS SET
|
||||
RELATEDUSERNAME = #{relatedUsername},
|
||||
RELATEDPASSWORD = #{relatedPassword},
|
||||
MODIFIEDDATE = current_timestamp()
|
||||
WHERE
|
||||
UID = #{uid}
|
||||
AND APPID = #{appId}
|
||||
</update>
|
||||
|
||||
<select id="load" parameterType="AppAccounts" resultType="AppAccounts">
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
APP_ACCOUNTS
|
||||
WHERE
|
||||
UID = #{uid}
|
||||
AND APPID = #{appId}
|
||||
</select>
|
||||
|
||||
<select id="get" parameterType="string" resultType="AppAccounts">
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
APP_ACCOUNTS
|
||||
WHERE
|
||||
ID = #{id}
|
||||
</select>
|
||||
|
||||
<delete id="remove" parameterType="string" >
|
||||
DELETE FROM APP_ACCOUNTS WHERE ID=#{value}
|
||||
</delete>
|
||||
</mapper>
|
||||
@ -1,135 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.connsec.dao.persistence.AppCategorysMapper">
|
||||
|
||||
<sql id="where_statement">
|
||||
<if test="id != null and id != ''">
|
||||
AND ID = #{id}
|
||||
</if>
|
||||
<if test="name != null and name != ''">
|
||||
AND NAME LIKE '%${name}%'
|
||||
</if>
|
||||
</sql>
|
||||
|
||||
<insert id="insert" parameterType="AppCategorys">
|
||||
INSERT INTO APP_CATEGORY(
|
||||
ID,
|
||||
NAME,
|
||||
SORTORDER,
|
||||
DESCRIPTION,
|
||||
|
||||
CREATEDBY,
|
||||
CREATEDDATE,
|
||||
MODIFIEDBY,
|
||||
MODIFIEDDATE,
|
||||
|
||||
STATUS
|
||||
)VALUES(
|
||||
#{id},
|
||||
#{name},
|
||||
#{sortOrder},
|
||||
#{description},
|
||||
|
||||
#{createdBy},
|
||||
#{createdDate} ,
|
||||
#{modifiedBy},
|
||||
#{modifiedDate},
|
||||
|
||||
#{status}
|
||||
)
|
||||
</insert>
|
||||
|
||||
<select id="query" parameterType="AppCategorys" resultType="AppCategorys">
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
APP_CATEGORY
|
||||
WHERE
|
||||
(1=1)
|
||||
<include refid="where_statement"/>
|
||||
ORDER BY SORTORDER
|
||||
</select>
|
||||
|
||||
<select id="grid" parameterType="AppCategorys" resultType="AppCategorys">
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
APP_CATEGORY
|
||||
WHERE
|
||||
(1=1)
|
||||
<include refid="where_statement"/>
|
||||
ORDER BY SORTORDER
|
||||
</select>
|
||||
|
||||
<select id="count" parameterType="AppCategorys" resultType="java.lang.Integer">
|
||||
SELECT
|
||||
COUNT(*)
|
||||
FROM
|
||||
APP_CATEGORY
|
||||
WHERE
|
||||
(1=1)
|
||||
<include refid="where_statement"/>
|
||||
</select>
|
||||
|
||||
<select id="get" parameterType="string" resultType="AppCategorys">
|
||||
SELECT
|
||||
*
|
||||
FROM APP_CATEGORY
|
||||
WHERE
|
||||
ID = #{value}
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
<select id="load" parameterType="AppCategorys" resultType="AppCategorys">
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
APP_CATEGORY
|
||||
WHERE
|
||||
(1=1)
|
||||
<include refid="where_statement"/>
|
||||
</select>
|
||||
|
||||
<update id="update" parameterType="AppCategorys" >
|
||||
UPDATE APP_CATEGORY SET
|
||||
NAME = #{name},
|
||||
SORTORDER = #{sortOrder},
|
||||
DESCRIPTION = #{description},
|
||||
STATUS = #{status},
|
||||
MODIFIEDBY = #{modifiedBy},
|
||||
MODIFIEDDATE = #{modifiedDate}
|
||||
WHERE ID = #{id}
|
||||
</update>
|
||||
|
||||
|
||||
<update id="logisticDelete" parameterType="AppCategorys" >
|
||||
UPDATE APP_CATEGORY SET
|
||||
STATUS = '2'
|
||||
WHERE 1 = 1
|
||||
<if test="id != null">
|
||||
AND ID = #{id}
|
||||
</if>
|
||||
<if test="name != name">
|
||||
ADN NAME = #{name}
|
||||
</if>
|
||||
</update>
|
||||
|
||||
<delete id="delete" parameterType="AppCategorys" >
|
||||
DELETE FROM APP_CATEGORY WHERE ID=#{id}
|
||||
</delete>
|
||||
|
||||
<update id="logisticBatchDelete" parameterType="java.util.List">
|
||||
UPDATE APP_CATEGORY SET STATUS='2' WHERE ID IN
|
||||
<foreach item="item" collection="list" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
<delete id="batchDelete" parameterType="java.util.List">
|
||||
DELETE FROM APP_CATEGORY WHERE ID IN
|
||||
<foreach item="item" collection="list" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.connsec.dao.persistence.ApplicationsMapper">
|
||||
<mapper namespace="org.maxkey.dao.persistence.ApplicationsMapper">
|
||||
|
||||
<sql id="where_statement">
|
||||
<if test="id != null and id != ''">
|
||||
@ -23,143 +23,6 @@
|
||||
</if>
|
||||
</sql>
|
||||
|
||||
<insert id="insert" parameterType="Applications">
|
||||
INSERT INTO APPLICATIONS(
|
||||
ID,
|
||||
NAME,
|
||||
ICON,
|
||||
LOGINURL,
|
||||
PROTOCOL,
|
||||
CATEGORY,
|
||||
SECRET,
|
||||
DESCRIPTION,
|
||||
VENDOR,
|
||||
VENDORURL,
|
||||
|
||||
CREDENTIAL,
|
||||
SHAREDUSERNAME,
|
||||
SHAREDPASSWORD,
|
||||
SYSTEMUSERATTR,
|
||||
|
||||
ISEXTENDATTR,
|
||||
EXTENDATTR,
|
||||
|
||||
ISSIGNATURE,
|
||||
|
||||
ISADAPTER,
|
||||
ADAPTER,
|
||||
|
||||
PRINCIPAL,
|
||||
CREDENTIALS,
|
||||
|
||||
VISIBLE,
|
||||
|
||||
SORTORDER,
|
||||
|
||||
CREATEDBY,
|
||||
CREATEDDATE,
|
||||
|
||||
STATUS
|
||||
)VALUES(
|
||||
#{id},
|
||||
#{name},
|
||||
#{icon},
|
||||
#{loginUrl},
|
||||
#{protocol},
|
||||
#{category},
|
||||
#{secret},
|
||||
#{description},
|
||||
#{vendor} ,
|
||||
#{vendorUrl},
|
||||
|
||||
#{credential},
|
||||
#{sharedUsername},
|
||||
#{sharedPassword},
|
||||
#{systemUserAttr},
|
||||
|
||||
#{isExtendAttr},
|
||||
#{extendAttr},
|
||||
|
||||
#{isSignature},
|
||||
|
||||
#{isAdapter},
|
||||
#{adapter},
|
||||
|
||||
#{principal},
|
||||
#{credentials},
|
||||
|
||||
#{visible},
|
||||
|
||||
#{sortOrder},
|
||||
|
||||
#{createdBy},
|
||||
#{createdDate} ,
|
||||
|
||||
#{status}
|
||||
)
|
||||
</insert>
|
||||
|
||||
<update id="update" parameterType="Applications" >
|
||||
UPDATE APPLICATIONS SET
|
||||
NAME = #{name},
|
||||
<if test="icon != null">
|
||||
ICON = #{icon},
|
||||
</if>
|
||||
LOGINURL = #{loginUrl},
|
||||
PROTOCOL = #{protocol},
|
||||
CATEGORY = #{category},
|
||||
SECRET = #{secret},
|
||||
DESCRIPTION = #{description},
|
||||
VENDOR = #{vendor},
|
||||
VENDORURL = #{vendorUrl},
|
||||
|
||||
CREDENTIAL = #{credential},
|
||||
SHAREDUSERNAME = #{sharedUsername},
|
||||
SHAREDPASSWORD = #{sharedPassword},
|
||||
SYSTEMUSERATTR = #{systemUserAttr},
|
||||
|
||||
ISEXTENDATTR = #{isExtendAttr},
|
||||
EXTENDATTR = #{extendAttr},
|
||||
|
||||
ISSIGNATURE = #{isSignature},
|
||||
|
||||
<if test="adapter != null">
|
||||
ISADAPTER = #{isAdapter},
|
||||
ADAPTER = #{adapter},
|
||||
</if>
|
||||
PRINCIPAL = #{principal},
|
||||
CREDENTIALS = #{credentials},
|
||||
VISIBLE = #{visible},
|
||||
SORTORDER = #{sortOrder},
|
||||
|
||||
MODIFIEDBY = #{modifiedBy},
|
||||
MODIFIEDDATE = #{modifiedDate},
|
||||
|
||||
STATUS = #{status}
|
||||
WHERE
|
||||
ID = #{id}
|
||||
</update>
|
||||
|
||||
<select id="query" parameterType="Applications" resultType="Applications">
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
APPLICATIONS
|
||||
WHERE
|
||||
(1=1)
|
||||
<include refid="where_statement"/>
|
||||
ORDER BY SORTORDER
|
||||
|
||||
</select>
|
||||
|
||||
<select id="get" parameterType="string" resultType="Applications">
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
APPLICATIONS
|
||||
WHERE
|
||||
ID = #{value}
|
||||
</select>
|
||||
|
||||
<select id="grid" parameterType="Applications" resultType="Applications">
|
||||
SELECT
|
||||
@ -183,18 +46,5 @@
|
||||
|
||||
</select>
|
||||
|
||||
<select id="load" parameterType="Applications" resultType="Applications">
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
APPLICATIONS
|
||||
WHERE
|
||||
(1=1)
|
||||
<include refid="where_statement"/>
|
||||
</select>
|
||||
|
||||
<delete id="remove" parameterType="string" >
|
||||
DELETE FROM APPLICATIONS WHERE ID=#{value}
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
@ -1,61 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.connsec.dao.persistence.CasDetailsMapper">
|
||||
<mapper namespace="org.maxkey.dao.persistence.CasDetailsMapper">
|
||||
|
||||
<insert id="insert" parameterType="CasDetails">
|
||||
INSERT INTO CAS_DETAILS(
|
||||
ID,
|
||||
SERVICE,
|
||||
VALIDATION
|
||||
)VALUES(
|
||||
#{id},
|
||||
#{service},
|
||||
#{validation}
|
||||
)
|
||||
</insert>
|
||||
|
||||
<update id="update" parameterType="CasDetails" >
|
||||
UPDATE CAS_DETAILS SET
|
||||
SERVICE = #{service},
|
||||
VALIDATION = #{validation}
|
||||
|
||||
WHERE
|
||||
ID = #{id}
|
||||
</update>
|
||||
|
||||
<select id="get" parameterType="string" resultType="CasDetails">
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
CAS_DETAILS CD,
|
||||
APPLICATIONS APP
|
||||
WHERE
|
||||
APP.ID = #{value}
|
||||
AND CD.ID = #{value}
|
||||
AND CD.ID = APP.ID
|
||||
AND STATUS = 1
|
||||
</select>
|
||||
|
||||
<select id="query" parameterType="CasDetails" resultType="CasDetails">
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
CAS_DETAILS CD,
|
||||
APPLICATIONS APP
|
||||
WHERE
|
||||
1 = 1
|
||||
<if test="id != null and id != ''">
|
||||
AND APP.ID = #{value}
|
||||
AND CD.ID = #{value}
|
||||
</if>
|
||||
<if test="service != null and service != ''">
|
||||
AND CD.SERVICE = #{service}
|
||||
</if>
|
||||
AND CD.ID = APP.ID
|
||||
AND STATUS = 1
|
||||
</select>
|
||||
|
||||
<delete id="remove" parameterType="string" >
|
||||
DELETE FROM CAS_DETAILS WHERE ID=#{value}
|
||||
</delete>
|
||||
</mapper>
|
||||
@ -1,159 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.connsec.dao.persistence.CompanysMapper">
|
||||
|
||||
<insert id="insert" parameterType="Companys">
|
||||
INSERT INTO COMPANYS(
|
||||
ID,
|
||||
SHORTNAME,
|
||||
FULLNAME,
|
||||
DIVISION ,
|
||||
|
||||
REPRESENTATIVE,
|
||||
CATEGORY,
|
||||
WEBSITE,
|
||||
PHONE ,
|
||||
EMAIL ,
|
||||
FAX,
|
||||
POSTALCODE,
|
||||
LICENSE,
|
||||
CREATIONDATE,
|
||||
|
||||
|
||||
COUNTRY ,
|
||||
REGION ,
|
||||
LOCALITY ,
|
||||
STREET ,
|
||||
|
||||
DESCRIPTION,
|
||||
|
||||
CREATEDBY,
|
||||
CREATEDDATE,
|
||||
|
||||
STATUS
|
||||
)VALUES(
|
||||
#{id},
|
||||
#{shortName},
|
||||
#{fullName},
|
||||
#{division} ,
|
||||
#{representative},
|
||||
#{category} ,
|
||||
#{webSite} ,
|
||||
#{phone},
|
||||
#{email},
|
||||
#{fax},
|
||||
#{postalCode},
|
||||
#{license},
|
||||
#{creationDate},
|
||||
|
||||
#{country} ,
|
||||
#{region} ,
|
||||
#{locality} ,
|
||||
#{street},
|
||||
|
||||
#{description},
|
||||
|
||||
#{createdBy},
|
||||
#{createdDate} ,
|
||||
|
||||
#{status}
|
||||
)
|
||||
</insert>
|
||||
|
||||
<update id="update" parameterType="Companys" >
|
||||
UPDATE COMPANYS SET
|
||||
SHORTNAME = #{shortName},
|
||||
FULLNAME = #{fullName},
|
||||
DIVISION = #{division},
|
||||
|
||||
REPRESENTATIVE = #{representative},
|
||||
CATEGORY = #{category},
|
||||
WEBSITE = #{webSite},
|
||||
PHONE = #{phone},
|
||||
EMAIL = #{email},
|
||||
FAX = #{fax},
|
||||
POSTALCODE = #{postalCode},
|
||||
LICENSE = #{license},
|
||||
CREATIONDATE = #{creationDate},
|
||||
|
||||
|
||||
COUNTRY = #{country},
|
||||
REGION = #{region},
|
||||
LOCALITY = #{locality},
|
||||
STREET = #{street},
|
||||
|
||||
DESCRIPTION = #{description},
|
||||
|
||||
MODIFIEDBY = #{modifiedBy},
|
||||
MODIFIEDDATE = current_timestamp,
|
||||
|
||||
STATUS = #{status}
|
||||
|
||||
WHERE 1 = 1
|
||||
<if test="id != null and id != ''">
|
||||
AND ID = #{id}
|
||||
</if>
|
||||
</update>
|
||||
|
||||
<select id="query" parameterType="Companys" resultType="Companys">
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
COMPANYS
|
||||
WHERE
|
||||
(1=1)
|
||||
<if test="shortName != null and shortName != ''">
|
||||
AND SHORTNAME = #{shortName}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="grid" parameterType="Companys" resultType="Companys">
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
COMPANYS
|
||||
WHERE
|
||||
(1=1)
|
||||
<if test="shortName != null and shortName != ''">
|
||||
AND SHORTNAME = #{shortName}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="count" parameterType="Companys" resultType="java.lang.Integer">
|
||||
SELECT
|
||||
COUNT(*)
|
||||
FROM
|
||||
COMPANYS
|
||||
WHERE
|
||||
(1=1)
|
||||
<if test="shortName != null and shortName != ''">
|
||||
AND SHORTNAME = #{shortName}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
<select id="load" parameterType="Companys" resultType="Companys">
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
COMPANYS
|
||||
WHERE
|
||||
(1=1)
|
||||
<if test="shortName != null and shortName != ''">
|
||||
AND SHORTNAME = #{shortName}
|
||||
</if>
|
||||
<if test="id != null and id != ''">
|
||||
AND ID = #{id}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="get" parameterType="string" resultType="Companys">
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
COMPANYS
|
||||
WHERE
|
||||
ID = #{value}
|
||||
</select>
|
||||
</mapper>
|
||||
@ -2,76 +2,5 @@
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.connsec.dao.persistence.DesktopDetailsMapper">
|
||||
|
||||
<insert id="insert" parameterType="DesktopDetails">
|
||||
INSERT INTO DESKTOP_DETAILS(
|
||||
ID,
|
||||
PROGRAMPATH,
|
||||
PARAMETER,
|
||||
|
||||
USERNAMETYPE,
|
||||
PREUSERNAME,
|
||||
USERNAMEPARAMETER,
|
||||
|
||||
PASSWORDTYPE,
|
||||
PREPASSWORD,
|
||||
PASSWORDPARAMETER,
|
||||
|
||||
SUBMITTYPE,
|
||||
SUBMITKEY,
|
||||
PRESUBMIT
|
||||
)VALUES(
|
||||
#{id},
|
||||
#{programPath},
|
||||
#{parameter},
|
||||
|
||||
#{usernameType},
|
||||
#{preUsername},
|
||||
#{usernameParameter},
|
||||
|
||||
#{passwordType} ,
|
||||
#{prePassword} ,
|
||||
#{passwordParameter},
|
||||
|
||||
#{submitType},
|
||||
#{submitKey},
|
||||
#{preSubmit}
|
||||
)
|
||||
</insert>
|
||||
|
||||
<update id="update" parameterType="DesktopDetails" >
|
||||
UPDATE DESKTOP_DETAILS SET
|
||||
PROGRAMPATH = #{programPath},
|
||||
PARAMETER = #{parameter},
|
||||
|
||||
USERNAMETYPE = #{usernameType},
|
||||
PREUSERNAME = #{preUsername},
|
||||
USERNAMEPARAMETER = #{usernameParameter},
|
||||
|
||||
PASSWORDTYPE = #{passwordType},
|
||||
PREPASSWORD = #{prePassword},
|
||||
PASSWORDPARAMETER = #{passwordParameter},
|
||||
|
||||
SUBMITTYPE = #{submitType},
|
||||
SUBMITKEY = #{submitKey},
|
||||
PRESUBMIT = #{preSubmit}
|
||||
WHERE
|
||||
ID = #{id}
|
||||
</update>
|
||||
|
||||
<select id="get" parameterType="string" resultType="DesktopDetails">
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
DESKTOP_DETAILS DD,
|
||||
APPLICATIONS APP
|
||||
WHERE
|
||||
APP.ID = #{value}
|
||||
AND DD.ID = #{value}
|
||||
AND DD.ID = APP.ID
|
||||
AND STATUS = 1
|
||||
</select>
|
||||
|
||||
<delete id="remove" parameterType="string" >
|
||||
DELETE FROM DESKTOP_DETAILS WHERE ID=#{value}
|
||||
</delete>
|
||||
</mapper>
|
||||
@ -11,40 +11,6 @@
|
||||
EMAIL = #{value}
|
||||
</select>
|
||||
|
||||
<insert id="insert" parameterType="ForgotPassword">
|
||||
INSERT INTO FORGOT_PASSWORD(
|
||||
ID,
|
||||
UID,
|
||||
USERNAME,
|
||||
EMAIL,
|
||||
|
||||
CREATEDDATE,
|
||||
STATUS
|
||||
)VALUES(
|
||||
#{id},
|
||||
#{uid},
|
||||
#{username},
|
||||
#{email},
|
||||
|
||||
current_timestamp(),
|
||||
1
|
||||
)
|
||||
</insert>
|
||||
|
||||
<update id="remove" parameterType="ForgotPassword" >
|
||||
DELETE FROM
|
||||
FORGOT_PASSWORD
|
||||
WHERE
|
||||
ID = #{id}
|
||||
</update>
|
||||
|
||||
<select id="get" parameterType="string" resultType="ForgotPassword">
|
||||
SELECT
|
||||
*
|
||||
FROM FORGOT_PASSWORD
|
||||
WHERE
|
||||
ID = #{value}
|
||||
AND STATUS = 1
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@ -2,61 +2,5 @@
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.connsec.dao.persistence.FormBasedDetailsMapper">
|
||||
|
||||
<insert id="insert" parameterType="FormBasedDetails">
|
||||
INSERT INTO FORM_BASED_DETAILS(
|
||||
ID,
|
||||
REDIRECTURI,
|
||||
USERNAMEMAPPING,
|
||||
PASSWORDMAPPING,
|
||||
AUTHORIZEVIEW
|
||||
|
||||
)VALUES(
|
||||
#{id},
|
||||
#{redirectUri},
|
||||
#{usernameMapping},
|
||||
#{passwordMapping},
|
||||
#{authorizeView}
|
||||
)
|
||||
</insert>
|
||||
|
||||
<update id="update" parameterType="FormBasedDetails" >
|
||||
UPDATE FORM_BASED_DETAILS SET
|
||||
REDIRECTURI = #{redirectUri},
|
||||
USERNAMEMAPPING = #{usernameMapping},
|
||||
PASSWORDMAPPING = #{passwordMapping},
|
||||
AUTHORIZEVIEW = #{authorizeView}
|
||||
|
||||
WHERE
|
||||
ID = #{id}
|
||||
</update>
|
||||
|
||||
<select id="get" parameterType="string" resultType="FormBasedDetails">
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
FORM_BASED_DETAILS FBD,
|
||||
APPLICATIONS APP
|
||||
WHERE
|
||||
APP.ID = #{value}
|
||||
AND FBD.ID = #{value}
|
||||
AND FBD.ID = APP.ID
|
||||
AND STATUS = 1
|
||||
</select>
|
||||
|
||||
<select id="getSassTemplet" parameterType="string" resultType="FormBasedDetails">
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
FORM_BASED_DETAILS FBD,
|
||||
SAAS_APP_TEMPLET APP
|
||||
WHERE
|
||||
APP.ID = #{value}
|
||||
AND FBD.ID = #{value}
|
||||
AND FBD.ID = APP.ID
|
||||
AND STATUS = 1
|
||||
</select>
|
||||
|
||||
<delete id="remove" parameterType="string" >
|
||||
DELETE FROM FORM_BASED_DETAILS WHERE ID=#{value}
|
||||
</delete>
|
||||
</mapper>
|
||||
@ -1,117 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.connsec.dao.persistence.GroupAppMapper">
|
||||
|
||||
<sql id="where_statement">
|
||||
<if test="id != null and id != ''">
|
||||
AND ID = #{id}
|
||||
</if>
|
||||
<if test="name != null and name != ''">
|
||||
AND NAME LIKE '%${name}%'
|
||||
</if>
|
||||
<if test="protocol != null and protocol != ''">
|
||||
AND PROTOCOL = #{protocol}
|
||||
</if>
|
||||
<if test="category != null and category != ''">
|
||||
AND CATEGORY = #{category}
|
||||
</if>
|
||||
</sql>
|
||||
|
||||
<!-- AppGroup -->
|
||||
<select id="gridAppsInGroup" parameterType="GroupApp" resultType="Applications">
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
APPLICATIONS
|
||||
WHERE
|
||||
1 = 1
|
||||
AND ID IN(
|
||||
SELECT
|
||||
APPID
|
||||
FROM
|
||||
GROUP_APP
|
||||
WHERE
|
||||
GROUPID = #{groupId}
|
||||
|
||||
)
|
||||
<include refid="where_statement"/>
|
||||
</select>
|
||||
|
||||
<select id="countAppsInGroup" parameterType="GroupApp" resultType="java.lang.Integer">
|
||||
SELECT
|
||||
COUNT(*)
|
||||
FROM
|
||||
APPLICATIONS
|
||||
WHERE
|
||||
1 = 1
|
||||
AND ID IN(
|
||||
SELECT
|
||||
APPID
|
||||
FROM
|
||||
GROUP_APP
|
||||
WHERE
|
||||
GROUPID = #{groupId}
|
||||
|
||||
)
|
||||
<include refid="where_statement"/>
|
||||
</select>
|
||||
|
||||
<select id="gridAppsNotInGroup" parameterType="GroupApp" resultType="Applications">
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
APPLICATIONS
|
||||
WHERE
|
||||
1 = 1
|
||||
AND ID NOT IN(
|
||||
SELECT
|
||||
APPID
|
||||
FROM
|
||||
GROUP_APP
|
||||
WHERE
|
||||
GROUPID = #{groupId}
|
||||
|
||||
)
|
||||
<include refid="where_statement"/>
|
||||
</select>
|
||||
|
||||
<select id="countAppsNotInGroup" parameterType="GroupApp" resultType="java.lang.Integer">
|
||||
SELECT
|
||||
COUNT(*)
|
||||
FROM
|
||||
APPLICATIONS
|
||||
WHERE
|
||||
1 = 1
|
||||
AND ID NOT IN(
|
||||
SELECT
|
||||
APPID
|
||||
FROM
|
||||
GROUP_APP
|
||||
WHERE
|
||||
GROUPID = #{groupId}
|
||||
|
||||
)
|
||||
<include refid="where_statement"/>
|
||||
</select>
|
||||
|
||||
<insert id="insert" parameterType="GroupApp">
|
||||
INSERT INTO
|
||||
GROUP_APP
|
||||
(
|
||||
ID,
|
||||
GROUPID,
|
||||
APPID
|
||||
)
|
||||
VALUES
|
||||
(
|
||||
#{id},
|
||||
#{groupId},
|
||||
#{appId}
|
||||
)
|
||||
</insert>
|
||||
|
||||
<delete id="delete" parameterType="GroupApp">
|
||||
DELETE FROM GROUP_APP WHERE GROUPID = #{groupId} AND APPID = #{appId}
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
@ -265,25 +265,5 @@
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<insert id="insert" parameterType="GroupMember">
|
||||
INSERT INTO
|
||||
GROUP_MEMBER
|
||||
(
|
||||
ID,
|
||||
GROUPID,
|
||||
MEMBERID,
|
||||
TYPE
|
||||
)
|
||||
VALUES
|
||||
(
|
||||
#{id},
|
||||
#{groupId},
|
||||
#{memberId},
|
||||
#{type}
|
||||
)
|
||||
</insert>
|
||||
|
||||
<delete id="delete" parameterType="GroupMember">
|
||||
DELETE FROM GROUP_MEMBER WHERE GROUPID = #{groupId} AND MEMBERID = #{memberId}
|
||||
</delete>
|
||||
</mapper>
|
||||
@ -1,52 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.connsec.dao.persistence.GroupPrivilegesMapper" >
|
||||
<sql id="sql_condition">
|
||||
WHERE 1 = 1
|
||||
<if test="id != null">
|
||||
AND ID = #{id}
|
||||
</if>
|
||||
<if test="groupId != null and groupId != '' ">
|
||||
AND GROUPID like '#${groupId}#'
|
||||
</if>
|
||||
<if test="resourceId != null and resourceId != '' ">
|
||||
AND RESOURCEID like '#${resourceId}#'
|
||||
</if>
|
||||
<if test="status != null and status != '' ">
|
||||
AND STATUS = #{status}
|
||||
</if>
|
||||
</sql>
|
||||
|
||||
<delete id="deletePrivileges" parameterType="string">
|
||||
DELETE FROM PRIVILEGES WHERE GROUPID = #{value}
|
||||
</delete>
|
||||
|
||||
<insert id="insertPrivileges" parameterType="java.util.List">
|
||||
INSERT INTO
|
||||
PRIVILEGES
|
||||
(
|
||||
ID,
|
||||
GROUPID,
|
||||
RESOURCEID
|
||||
)
|
||||
VALUES
|
||||
<foreach collection="list" item="item" index="index" separator=",">
|
||||
(
|
||||
#{item.id},
|
||||
#{item.groupId},
|
||||
#{item.resourceId}
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
|
||||
<select id="queryPrivileges" parameterType="string" resultType="Privileges">
|
||||
SELECT DISTINCT R.* FROM PRIVILEGES P,RESOURCES R
|
||||
WHERE P.RESOURCEID = R.ID
|
||||
AND R.STATUS = 1
|
||||
AND P.GROUPID = #{value}
|
||||
ORDER BY PID, SORTORDER
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
@ -11,55 +11,7 @@
|
||||
</if>
|
||||
</sql>
|
||||
|
||||
<insert id="insert" parameterType="Groups">
|
||||
INSERT INTO GROUPS(
|
||||
ID,
|
||||
NAME,
|
||||
ISDEFAULT,
|
||||
|
||||
CREATEDBY,
|
||||
CREATEDDATE,
|
||||
MODIFIEDBY,
|
||||
MODIFIEDDATE,
|
||||
|
||||
STATUS
|
||||
)VALUES(
|
||||
#{id},
|
||||
#{name},
|
||||
#{isdefault},
|
||||
|
||||
#{createdBy},
|
||||
#{createdDate} ,
|
||||
#{modifiedBy},
|
||||
#{modifiedDate},
|
||||
|
||||
#{status}
|
||||
)
|
||||
</insert>
|
||||
|
||||
<update id="update" parameterType="Groups" >
|
||||
UPDATE GROUPS SET
|
||||
NAME = #{name},
|
||||
ISDEFAULT = #{isdefault}
|
||||
WHERE 1 = 1
|
||||
<if test="id != null">
|
||||
AND ID = #{id}
|
||||
</if>
|
||||
<if test="name != name">
|
||||
ADN NAME = #{name}
|
||||
</if>
|
||||
</update>
|
||||
|
||||
<select id="query" parameterType="Groups" resultType="Groups">
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
GROUPS
|
||||
WHERE
|
||||
(1=1)
|
||||
<include refid="where_statement"/>
|
||||
|
||||
</select>
|
||||
|
||||
<select id="grid" parameterType="Groups" resultType="Groups">
|
||||
SELECT
|
||||
@ -81,23 +33,7 @@
|
||||
<include refid="where_statement"/>
|
||||
</select>
|
||||
|
||||
<select id="get" parameterType="string" resultType="Groups">
|
||||
SELECT
|
||||
*
|
||||
FROM GROUPS
|
||||
WHERE
|
||||
ID = #{value}
|
||||
</select>
|
||||
|
||||
<select id="load" parameterType="Groups" resultType="Groups">
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
GROUPS
|
||||
WHERE
|
||||
(1=1)
|
||||
<include refid="where_statement"/>
|
||||
</select>
|
||||
|
||||
<update id="logisticDelete" parameterType="Groups" >
|
||||
UPDATE GROUPS SET
|
||||
@ -111,9 +47,6 @@
|
||||
</if>
|
||||
</update>
|
||||
|
||||
<delete id="delete" parameterType="Groups" >
|
||||
DELETE FROM GROUPS WHERE ID=#{id}
|
||||
</delete>
|
||||
|
||||
<update id="logisticBatchDelete" parameterType="java.util.List">
|
||||
UPDATE GROUPS SET STATUS='2' WHERE ID IN
|
||||
@ -122,10 +55,5 @@
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
<delete id="batchDelete" parameterType="java.util.List">
|
||||
DELETE FROM GROUPS WHERE ID IN
|
||||
<foreach item="item" collection="list" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
@ -13,50 +13,7 @@
|
||||
</if>
|
||||
</sql>
|
||||
|
||||
<insert id="insert" parameterType="IpAddrFilter">
|
||||
INSERT INTO IPADDRFILTER(
|
||||
ID,
|
||||
IPADDR,
|
||||
FILTER,
|
||||
CREATEDBY,
|
||||
CREATEDDATE,
|
||||
|
||||
STATUS
|
||||
)VALUES(
|
||||
#{id},
|
||||
#{ipAddr},
|
||||
#{filter},
|
||||
|
||||
#{createdBy},
|
||||
#{createdDate} ,
|
||||
|
||||
#{status}
|
||||
)
|
||||
</insert>
|
||||
|
||||
<update id="update" parameterType="IpAddrFilter" >
|
||||
UPDATE IPADDRFILTER SET
|
||||
IPADDR = #{ipAddr},
|
||||
FILTER = #{filter},
|
||||
|
||||
MODIFIEDBY = #{modifiedBy},
|
||||
MODIFIEDDATE = #{modifiedDate},
|
||||
|
||||
STATUS = #{status}
|
||||
WHERE
|
||||
ID = #{id}
|
||||
</update>
|
||||
|
||||
<select id="query" parameterType="IpAddrFilter" resultType="IpAddrFilter">
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
IPADDRFILTER
|
||||
WHERE
|
||||
(1=1)
|
||||
<include refid="where_statement"/>
|
||||
|
||||
</select>
|
||||
|
||||
<select id="grid" parameterType="IpAddrFilter" resultType="IpAddrFilter">
|
||||
SELECT
|
||||
@ -78,24 +35,5 @@
|
||||
<include refid="where_statement"/>
|
||||
</select>
|
||||
|
||||
<select id="get" parameterType="string" resultType="IpAddrFilter">
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
IPADDRFILTER
|
||||
WHERE
|
||||
ID = #{value}
|
||||
AND STATUS = 1
|
||||
</select>
|
||||
|
||||
<delete id="delete" parameterType="IpAddrFilter" >
|
||||
DELETE FROM IPADDRFILTER WHERE ID=#{id}
|
||||
</delete>
|
||||
|
||||
<delete id="batchDelete" parameterType="java.util.List">
|
||||
DELETE FROM IPADDRFILTER WHERE ID IN
|
||||
<foreach item="item" collection="list" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@ -59,27 +59,5 @@
|
||||
<include refid="dao_where_statement"/>
|
||||
</select>
|
||||
|
||||
<insert id="insert" parameterType="LoginAppsHistory">
|
||||
INSERT INTO
|
||||
LOGIN_APPS_HISTORY
|
||||
(
|
||||
ID,
|
||||
SESSIONID,
|
||||
APPID,
|
||||
APPNAME,
|
||||
UID,
|
||||
USERNAME,
|
||||
DISPLAYNAME
|
||||
)
|
||||
VALUES
|
||||
(
|
||||
#{id},
|
||||
#{sessionId},
|
||||
#{appId},
|
||||
#{appName},
|
||||
#{uid},
|
||||
#{username},
|
||||
#{displayName}
|
||||
)
|
||||
</insert>
|
||||
|
||||
</mapper>
|
||||
@ -36,27 +36,7 @@
|
||||
</if>
|
||||
</sql>
|
||||
|
||||
<select id="query" parameterType="LoginHistory" resultType="LoginHistory">
|
||||
SELECT
|
||||
ID,
|
||||
SESSIONID,
|
||||
UID,
|
||||
USERNAME,
|
||||
DISPLAYNAME,
|
||||
LOGINTYPE,
|
||||
MESSAGE,
|
||||
CODE,
|
||||
PROVIDER,
|
||||
SOURCEIP,
|
||||
BROWSER,
|
||||
PLATFORM,
|
||||
APPLICATION,
|
||||
LOGINURL,
|
||||
DATE_FORMAT(LOGINTIME, '%Y-%m-%d %H:%i:%s') AS LOGINTIME
|
||||
FROM LOGIN_HISTORY
|
||||
WHERE 1 = 1
|
||||
<include refid="dao_where_statement"/>
|
||||
</select>
|
||||
|
||||
|
||||
<select id="grid" parameterType="LoginHistory" resultType="LoginHistory">
|
||||
SELECT
|
||||
@ -83,43 +63,7 @@
|
||||
ORDER BY LOGINTIME DESC
|
||||
</select>
|
||||
|
||||
<insert id="insert" parameterType="LoginHistory">
|
||||
INSERT INTO
|
||||
LOGIN_HISTORY
|
||||
(
|
||||
ID,
|
||||
SESSIONID,
|
||||
UID,
|
||||
USERNAME,
|
||||
DISPLAYNAME,
|
||||
LOGINTYPE,
|
||||
MESSAGE,
|
||||
CODE,
|
||||
PROVIDER,
|
||||
SOURCEIP,
|
||||
BROWSER,
|
||||
PLATFORM,
|
||||
APPLICATION,
|
||||
LOGINURL
|
||||
)
|
||||
VALUES
|
||||
(
|
||||
#{id},
|
||||
#{sessionId},
|
||||
#{uid},
|
||||
#{username},
|
||||
#{displayName},
|
||||
#{loginType},
|
||||
#{message},
|
||||
#{code},
|
||||
#{provider},
|
||||
#{sourceIp},
|
||||
#{browser},
|
||||
#{platform},
|
||||
#{application},
|
||||
#{loginUrl}
|
||||
)
|
||||
</insert>
|
||||
|
||||
|
||||
<select id="count" resultType="java.lang.Integer">
|
||||
SELECT COUNT(*) FROM LOGIN_HISTORY
|
||||
|
||||
@ -30,26 +30,7 @@
|
||||
</if>
|
||||
</sql>
|
||||
|
||||
<select id="query" parameterType="Logs" resultType="Logs">
|
||||
SELECT
|
||||
ID,
|
||||
TID,
|
||||
TNAME,
|
||||
SERVICENAME ,
|
||||
CODE,
|
||||
MESSAGE ,
|
||||
CONTENT,
|
||||
OPERATETYPE,
|
||||
MESSAGETYPE,
|
||||
USERNAME,
|
||||
CREATEDDATE,
|
||||
CREATEDBY
|
||||
FROM LOGS
|
||||
WHERE 1 = 1
|
||||
<include refid="where_statement"/>
|
||||
|
||||
ORDER BY CREATEDDATE DESC
|
||||
</select>
|
||||
|
||||
<select id="grid" parameterType="Logs" resultType="Logs">
|
||||
SELECT
|
||||
@ -72,37 +53,6 @@
|
||||
ORDER BY CREATEDDATE DESC
|
||||
</select>
|
||||
|
||||
<insert id="insert" parameterType="Logs">
|
||||
INSERT INTO
|
||||
LOGS
|
||||
(
|
||||
ID,
|
||||
TID,
|
||||
TNAME,
|
||||
SERVICENAME ,
|
||||
CODE,
|
||||
MESSAGE ,
|
||||
CONTENT,
|
||||
OPERATETYPE,
|
||||
MESSAGETYPE,
|
||||
USERNAME,
|
||||
CREATEDBY
|
||||
)
|
||||
VALUES
|
||||
(
|
||||
#{id},
|
||||
#{tid},
|
||||
#{tname},
|
||||
#{serviceName},
|
||||
#{code },
|
||||
#{message },
|
||||
#{content},
|
||||
#{operateType},
|
||||
#{messageType},
|
||||
#{username},
|
||||
#{createdBy}
|
||||
)
|
||||
</insert>
|
||||
|
||||
<select id="count" resultType="java.lang.Integer">
|
||||
SELECT COUNT(*) FROM LOGS
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.connsec.dao.persistence.MyAppsListMapper">
|
||||
<mapper namespace="org.maxkey.dao.persistence.MyAppsListMapper">
|
||||
|
||||
<select id="query" parameterType="UserApplications" resultType="UserApplications">
|
||||
SELECT DISTINCT
|
||||
|
||||
@ -17,26 +17,7 @@
|
||||
</if>
|
||||
</sql>
|
||||
|
||||
<select id="query" parameterType="Navigations" resultType="Navigations">
|
||||
SELECT
|
||||
ID,
|
||||
NAME ,
|
||||
URL ,
|
||||
TARGET,
|
||||
TYPE,
|
||||
PID,
|
||||
PNAME,
|
||||
SORTORDER,
|
||||
VISIBLE,
|
||||
XPATH,
|
||||
STATUS,
|
||||
HASCHILD,
|
||||
DESCRIPTION
|
||||
FROM NAVIGATIONS
|
||||
WHERE 1 = 1
|
||||
<include refid="dao_where_statement"/>
|
||||
ORDER BY PID, SORTORDER
|
||||
</select>
|
||||
|
||||
|
||||
<select id="grid" parameterType="Navigations" resultType="Navigations">
|
||||
SELECT
|
||||
@ -58,41 +39,7 @@
|
||||
<include refid="dao_where_statement"/>
|
||||
</select>
|
||||
|
||||
<insert id="insert" parameterType="Navigations">
|
||||
INSERT INTO
|
||||
NAVIGATIONS
|
||||
(
|
||||
ID,
|
||||
NAME ,
|
||||
URL ,
|
||||
TARGET,
|
||||
TYPE,
|
||||
PID,
|
||||
PNAME,
|
||||
SORTORDER,
|
||||
VISIBLE,
|
||||
XPATH,
|
||||
STATUS,
|
||||
HASCHILD,
|
||||
DESCRIPTION
|
||||
)
|
||||
VALUES
|
||||
(
|
||||
#{id},
|
||||
#{name},
|
||||
#{url},
|
||||
#{target},
|
||||
#{type},
|
||||
#{pId},
|
||||
#{pName},
|
||||
#{sortOrder},
|
||||
#{visible},
|
||||
#{xPath},
|
||||
#{status},
|
||||
#{hasChild},
|
||||
#{description}
|
||||
)
|
||||
</insert>
|
||||
|
||||
|
||||
<select id="count" resultType="java.lang.Integer">
|
||||
SELECT COUNT(*) FROM NAVIGATIONS
|
||||
@ -100,25 +47,7 @@
|
||||
<include refid="dao_where_statement"/>
|
||||
</select>
|
||||
|
||||
<update id="update" parameterType="Navigations" >
|
||||
UPDATE NAVIGATIONS SET
|
||||
NAME = #{name},
|
||||
URL = #{url},
|
||||
TARGET = #{target},
|
||||
TYPE = #{type},
|
||||
PID = #{pId},
|
||||
PNAME = #{pName},
|
||||
SORTORDER = #{sortOrder},
|
||||
VISIBLE = #{visible},
|
||||
XPATH = #{xPath},
|
||||
STATUS = #{status},
|
||||
HASCHILD = #{hasChild},
|
||||
DESCRIPTION = #{description}
|
||||
WHERE 1 = 1
|
||||
<if test="id != null and id != ''">
|
||||
AND ID = #{id}
|
||||
</if>
|
||||
</update>
|
||||
|
||||
|
||||
<update id="logisticDelete" parameterType="Navigations" >
|
||||
UPDATE NAVIGATIONS SET STATUS = '2'
|
||||
@ -145,21 +74,7 @@
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
<delete id="delete" parameterType="Navigations" >
|
||||
DELETE FROM NAVIGATIONS WHERE 1 = 1 AND
|
||||
(
|
||||
ID = #{id}
|
||||
OR PID = #{id}
|
||||
OR XPATH LIKE '%${id}%'
|
||||
)
|
||||
</delete>
|
||||
|
||||
<delete id="batchDelete" parameterType="java.util.List">
|
||||
DELETE FROM NAVIGATIONS WHERE ID IN
|
||||
<foreach collection="ids" item="selectId" open="(" separator="," close=")">
|
||||
#{selectId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
|
||||
</mapper>
|
||||
@ -2,59 +2,4 @@
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.connsec.dao.persistence.Oauth10aDetailsMapper">
|
||||
|
||||
<insert id="insert" parameterType="OAuth10aDetails">
|
||||
INSERT INTO OAUTH10A_CLIENT_DETAILS(
|
||||
CLIENT_ID,
|
||||
CLIENT_SECRET,
|
||||
SCOPE,
|
||||
AUTHORIZED_GRANT_TYPES,
|
||||
WEB_SERVER_REDIRECT_URI,
|
||||
AUTHORITIES,
|
||||
APPROVALPROMPT
|
||||
)VALUES(
|
||||
#{clientId},
|
||||
#{clientSecret},
|
||||
#{scope},
|
||||
#{authorizedGrantTypes},
|
||||
#{registeredRedirectUris},
|
||||
#{authorities},
|
||||
#{approvalPrompt}
|
||||
)
|
||||
</insert>
|
||||
|
||||
<update id="update" parameterType="OAuth10aDetails" >
|
||||
UPDATE OAUTH10A_CLIENT_DETAILS SET
|
||||
CLIENT_SECRET = #{clientSecret},
|
||||
SCOPE = #{scope},
|
||||
AUTHORIZED_GRANT_TYPES = #{authorizedGrantTypes},
|
||||
WEB_SERVER_REDIRECT_URI = #{registeredRedirectUris},
|
||||
AUTHORITIES = #{authorities},
|
||||
APPROVALPROMPT = #{approvalPrompt}
|
||||
WHERE
|
||||
CLIENT_ID = #{clientId}
|
||||
</update>
|
||||
|
||||
<select id="get" parameterType="string" resultType="OAuth10aDetails">
|
||||
SELECT
|
||||
OCD.CLIENT_ID AS CLIENTID,
|
||||
OCD.CLIENT_SECRET AS CLIENTSECRET,
|
||||
OCD.SCOPE,
|
||||
OCD.AUTHORIZED_GRANT_TYPES AS AUTHORIZEDGRANTTYPES,
|
||||
OCD.WEB_SERVER_REDIRECT_URI AS REGISTEREDREDIRECTURIS,
|
||||
OCD.AUTHORITIES,
|
||||
OCD.APPROVALPROMPT,
|
||||
APP.*
|
||||
FROM
|
||||
OAUTH10A_CLIENT_DETAILS OCD,
|
||||
APPLICATIONS APP
|
||||
WHERE
|
||||
APP.ID = #{value}
|
||||
AND OCD.CLIENT_ID = #{value}
|
||||
AND OCD.CLIENT_ID = APP.ID
|
||||
AND APP.STATUS = 1
|
||||
</select>
|
||||
|
||||
<delete id="remove" parameterType="string" >
|
||||
DELETE FROM OAUTH10A_CLIENT_DETAILS WHERE CLIENT_ID=#{value}
|
||||
</delete>
|
||||
</mapper>
|
||||
@ -18,14 +18,7 @@
|
||||
|
||||
</sql>
|
||||
|
||||
<select id="query" parameterType="Organizations" resultType="Organizations">
|
||||
SELECT
|
||||
*
|
||||
FROM ORGANIZATIONS
|
||||
WHERE 1 = 1
|
||||
<include refid="dao_where_statement"/>
|
||||
ORDER BY PID, SORTORDER
|
||||
</select>
|
||||
|
||||
|
||||
<select id="grid" parameterType="Organizations" resultType="Organizations">
|
||||
SELECT
|
||||
@ -35,73 +28,6 @@
|
||||
<include refid="dao_where_statement"/>
|
||||
</select>
|
||||
|
||||
<insert id="insert" parameterType="Organizations">
|
||||
INSERT INTO
|
||||
ORGANIZATIONS
|
||||
(
|
||||
ID ,
|
||||
CODE,
|
||||
NAME ,
|
||||
FULLNAME,
|
||||
PID ,
|
||||
PNAME ,
|
||||
TYPE ,
|
||||
XPATH ,
|
||||
XNAMEPATH ,
|
||||
LEVEL ,
|
||||
SORTORDER ,
|
||||
HASCHILD,
|
||||
|
||||
DIVISION ,
|
||||
COUNTRY ,
|
||||
REGION,
|
||||
LOCALITY ,
|
||||
STREET,
|
||||
ADDRESS,
|
||||
CONTACT,
|
||||
POSTALCODE,
|
||||
PHONE,
|
||||
FAX ,
|
||||
EMAIL,
|
||||
|
||||
DESCRIPTION ,
|
||||
STATUS ,
|
||||
CREATEDBY,
|
||||
CREATEDDATE
|
||||
)
|
||||
VALUES
|
||||
(
|
||||
#{id},
|
||||
#{code},
|
||||
#{name},
|
||||
#{fullName},
|
||||
#{pId},
|
||||
#{pName},
|
||||
#{type},
|
||||
#{xPath},
|
||||
#{xNamePath},
|
||||
#{level},
|
||||
#{sortOrder},
|
||||
#{hasChild},
|
||||
|
||||
#{division},
|
||||
#{country},
|
||||
#{region},
|
||||
#{locality},
|
||||
#{street},
|
||||
#{address},
|
||||
#{contact},
|
||||
#{postalCode},
|
||||
#{phone},
|
||||
#{fax},
|
||||
#{email},
|
||||
|
||||
#{description},
|
||||
#{status},
|
||||
#{createdBy},
|
||||
current_timestamp
|
||||
)
|
||||
</insert>
|
||||
|
||||
<select id="count" resultType="java.lang.Integer">
|
||||
SELECT COUNT(*) FROM ORGANIZATIONS
|
||||
@ -109,42 +35,6 @@
|
||||
<include refid="dao_where_statement"/>
|
||||
</select>
|
||||
|
||||
<update id="update" parameterType="Organizations" >
|
||||
UPDATE ORGANIZATIONS SET
|
||||
CODE = #{code},
|
||||
NAME = #{name},
|
||||
FULLNAME = #{fullName},
|
||||
PID = #{pId},
|
||||
PNAME = #{pName},
|
||||
TYPE = #{type},
|
||||
XPATH = #{xPath},
|
||||
XNAMEPATH = #{xNamePath},
|
||||
LEVEL = #{level},
|
||||
SORTORDER = #{sortOrder},
|
||||
HASCHILD = #{hasChild},
|
||||
|
||||
DIVISION = #{division},
|
||||
COUNTRY = #{country},
|
||||
REGION = #{region},
|
||||
LOCALITY = #{locality},
|
||||
STREET = #{street},
|
||||
ADDRESS = #{address},
|
||||
CONTACT = #{contact},
|
||||
POSTALCODE = #{postalCode},
|
||||
PHONE = #{phone},
|
||||
FAX = #{fax},
|
||||
EMAIL = #{email},
|
||||
|
||||
DESCRIPTION = #{description},
|
||||
STATUS = #{status},
|
||||
MODIFIEDBY = #{modifiedBy},
|
||||
MODIFIEDDATE = current_timestamp
|
||||
|
||||
WHERE 1 = 1
|
||||
<if test="id != null and id != ''">
|
||||
AND ID = #{id}
|
||||
</if>
|
||||
</update>
|
||||
|
||||
<update id="logisticDelete" parameterType="Organizations" >
|
||||
UPDATE ORGANIZATIONS SET STATUS = '2'
|
||||
@ -171,14 +61,5 @@
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
<delete id="delete" parameterType="Organizations" >
|
||||
DELETE FROM ORGANIZATIONS WHERE 1 = 1 AND
|
||||
(
|
||||
ID = #{id}
|
||||
OR PID = #{id}
|
||||
OR XPATH LIKE '%${id}%'
|
||||
)
|
||||
</delete>
|
||||
|
||||
|
||||
</mapper>
|
||||
@ -2,39 +2,5 @@
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.connsec.dao.persistence.PasswordPolicyMapper" >
|
||||
|
||||
<select id="get" parameterType="PasswordPolicy" resultType="PasswordPolicy">
|
||||
SELECT
|
||||
ID,
|
||||
MINLENGTH,
|
||||
MAXLENGTH,
|
||||
LOWERCASE,
|
||||
UPPERCASE,
|
||||
DIGITS,
|
||||
SPECIALCHAR,
|
||||
ATTEMPTS,
|
||||
DURATION,
|
||||
EXPIRATION,
|
||||
USERNAME,
|
||||
SIMPLEPASSWORDS
|
||||
FROM PASSWORD_POLICY
|
||||
</select>
|
||||
|
||||
<update id="update" parameterType="PasswordPolicy">
|
||||
UPDATE PASSWORD_POLICY
|
||||
SET
|
||||
MINLENGTH = #{minLength},
|
||||
MAXLENGTH = #{maxLength},
|
||||
LOWERCASE = #{lowerCase},
|
||||
UPPERCASE = #{upperCase},
|
||||
DIGITS = #{digits},
|
||||
SPECIALCHAR = #{specialChar},
|
||||
ATTEMPTS = #{attempts},
|
||||
DURATION = #{duration},
|
||||
EXPIRATION = #{expiration},
|
||||
USERNAME = #{username},
|
||||
SIMPLEPASSWORDS = #{simplePasswords}
|
||||
WHERE
|
||||
ID = #{id}
|
||||
</update>
|
||||
|
||||
</mapper>
|
||||
@ -1,57 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.connsec.dao.persistence.ProvisioningEntryMapper">
|
||||
<sql id="sql_condition">
|
||||
WHERE 1 = 1
|
||||
<if test="id != null">
|
||||
AND ID = #{id}
|
||||
</if>
|
||||
<if test="provisioningId != null and provisioningId != '' ">
|
||||
AND PROVISIONINGID = #{provisioningId}
|
||||
</if>
|
||||
<if test="provisioningName != null and provisioningName != '' ">
|
||||
AND PROVISIONINGNAME = #{provisioningName}
|
||||
</if>
|
||||
<if test="entryId != null and entryId != ''">
|
||||
AND ENTRYID = #{entryId}
|
||||
</if>
|
||||
<if test="entryName != null and entryName != '' ">
|
||||
AND ENTRYNAME = #{entryName}
|
||||
</if>
|
||||
<if test="entryType != null and entryType != '' ">
|
||||
AND ENTRYTYPE like '%${entryType}%'
|
||||
</if>
|
||||
|
||||
</sql>
|
||||
|
||||
|
||||
<select id="grid" parameterType="ProvisioningEntry" resultType="ProvisioningEntry">
|
||||
SELECT
|
||||
*
|
||||
FROM PROVISIONING_ENTRY
|
||||
<include refid="sql_condition"/>
|
||||
</select>
|
||||
|
||||
<select id="count" parameterType="ProvisioningEntry" resultType="java.lang.Integer">
|
||||
SELECT COUNT(1) FROM PROVISIONING_ENTRY
|
||||
<include refid="sql_condition"/>
|
||||
</select>
|
||||
|
||||
<select id="query" parameterType="ProvisioningEntry" resultType="ProvisioningEntry">
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
PROVISIONING_ENTRY
|
||||
<include refid="sql_condition"/>
|
||||
</select>
|
||||
|
||||
<select id="get" parameterType="string" resultType="ProvisioningEntry">
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
PROVISIONING_ENTRY
|
||||
WHERE
|
||||
ID = #{value}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@ -1,56 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.connsec.dao.persistence.ProvisioningEventMapper">
|
||||
<sql id="sql_condition">
|
||||
WHERE 1 = 1
|
||||
<if test="id != null">
|
||||
AND ID = #{id}
|
||||
</if>
|
||||
<if test="requestTime != null and requestTime != '' ">
|
||||
AND REQUESTTIME like '%${requestTime}%'
|
||||
</if>
|
||||
<if test="startDate != null and startDate != '' ">
|
||||
AND REQUESTTIME BETWEEN #{startDate} AND #{endDate}
|
||||
</if>
|
||||
<if test="provisioningId != null and provisioningId != '' ">
|
||||
AND provisioningId = #{provisioningId}
|
||||
</if>
|
||||
<if test="entryId != null and entryId != '' ">
|
||||
AND ENTRYID like ${entryId}
|
||||
</if>
|
||||
<if test="entryName != null and entryName != '' ">
|
||||
AND ENTRYNAME like '%${entryName}%'
|
||||
</if>
|
||||
<if test="entryType != 0 and entryType != '' ">
|
||||
AND ENTRYTYPE = ${entryType}
|
||||
</if>
|
||||
<if test="action != 0 and action != '' ">
|
||||
AND ACTION = ${action}
|
||||
</if>
|
||||
</sql>
|
||||
|
||||
|
||||
<select id="grid" parameterType="ProvisioningEvent" resultType="ProvisioningEvent">
|
||||
SELECT
|
||||
*
|
||||
FROM PROVISIONING_EVENT
|
||||
<include refid="sql_condition"/>
|
||||
ORDER BY PROVISIONINGTIME DESC
|
||||
</select>
|
||||
|
||||
<select id="count" parameterType="ProvisioningEvent" resultType="java.lang.Integer">
|
||||
SELECT COUNT(1) FROM PROVISIONING_EVENT
|
||||
<include refid="sql_condition"/>
|
||||
</select>
|
||||
|
||||
|
||||
<select id="get" parameterType="string" resultType="ProvisioningEvent">
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
PROVISIONING_EVENT
|
||||
WHERE
|
||||
ID = #{value}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@ -1,113 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.connsec.dao.persistence.ProvisioningMapper">
|
||||
<sql id="sql_condition">
|
||||
WHERE 1 = 1
|
||||
<if test="id != null">
|
||||
AND ID = #{id}
|
||||
</if>
|
||||
<if test="name != null and name != '' ">
|
||||
AND NAME like '%${name}%'
|
||||
</if>
|
||||
<if test="status != 0 and status != '' ">
|
||||
AND STATUS = #{status}
|
||||
</if>
|
||||
</sql>
|
||||
|
||||
<insert id="insert" parameterType="Provisioning">
|
||||
INSERT INTO PROVISIONING(
|
||||
ID,
|
||||
NAME,
|
||||
SCHEDULE,
|
||||
APPID,
|
||||
APPNAME,
|
||||
USERCONNECTOR,
|
||||
GROUPCONNECTOR,
|
||||
ORGCONNECTOR,
|
||||
PASSWORDCONNECTOR,
|
||||
URL,
|
||||
PRINCIPAL,
|
||||
CREDENTIALS,
|
||||
PROPERTIES,
|
||||
TYPE,
|
||||
SORTORDER,
|
||||
LASTETIME,
|
||||
LASTENDETIME,
|
||||
DESCRIPTION,
|
||||
STATUS
|
||||
)VALUES(
|
||||
#{id},
|
||||
#{name},
|
||||
#{schedule},
|
||||
#{appId},
|
||||
#{appName},
|
||||
#{userConnector},
|
||||
#{groupConnector},
|
||||
#{orgConnector},
|
||||
#{passwordConnector},
|
||||
#{url},
|
||||
#{principal},
|
||||
#{credentials},
|
||||
#{properties},
|
||||
#{sortOrder},
|
||||
#{type},
|
||||
CURRENT_TIMESTAMP,
|
||||
CURRENT_TIMESTAMP,
|
||||
#{description},
|
||||
#{status}
|
||||
)
|
||||
</insert>
|
||||
|
||||
<update id="update" parameterType="Provisioning" >
|
||||
UPDATE PROVISIONING SET
|
||||
NAME = #{name},
|
||||
SCHEDULE = #{schedule},
|
||||
APPID = #{appId},
|
||||
APPNAME = #{appName},
|
||||
USERCONNECTOR = #{userConnector},
|
||||
GROUPCONNECTOR = #{groupConnector},
|
||||
ORGCONNECTOR = #{orgConnector},
|
||||
PASSWORDCONNECTOR = #{passwordConnector},
|
||||
URL = #{url},
|
||||
PRINCIPAL = #{principal},
|
||||
CREDENTIALS = #{credentials},
|
||||
PROPERTIES = #{properties},
|
||||
TYPE = #{type},
|
||||
SORTORDER = #{sortOrder},
|
||||
DESCRIPTION = #{description},
|
||||
STATUS = #{status}
|
||||
WHERE
|
||||
ID = #{id}
|
||||
</update>
|
||||
|
||||
<select id="grid" parameterType="PROVISIONING" resultType="PROVISIONING">
|
||||
SELECT
|
||||
*
|
||||
FROM PROVISIONING
|
||||
<include refid="sql_condition"/>
|
||||
ORDER BY SORTORDER
|
||||
</select>
|
||||
|
||||
<select id="count" parameterType="PROVISIONING" resultType="java.lang.Integer">
|
||||
SELECT COUNT(1) FROM PROVISIONING
|
||||
<include refid="sql_condition"/>
|
||||
</select>
|
||||
|
||||
|
||||
<select id="get" parameterType="string" resultType="Provisioning">
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
PROVISIONING
|
||||
WHERE
|
||||
ID = #{value}
|
||||
</select>
|
||||
|
||||
<delete id="remove" parameterType="string" >
|
||||
DELETE FROM PROVISIONING WHERE ID=#{value}
|
||||
</delete>
|
||||
|
||||
<delete id="delete" parameterType="Provisioning" >
|
||||
DELETE FROM PROVISIONING WHERE ID=#{id}
|
||||
</delete>
|
||||
</mapper>
|
||||
@ -2,72 +2,6 @@
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.connsec.dao.persistence.RegistrationMapper">
|
||||
|
||||
<insert id="insert" parameterType="Registration">
|
||||
INSERT INTO REGISTRATION(
|
||||
ID,
|
||||
WORKEMAIL,
|
||||
WORKPHONE,
|
||||
COMPANY ,
|
||||
USERS,
|
||||
JOBTITLE,
|
||||
LASTNAME,
|
||||
FIRSTNAME,
|
||||
|
||||
CREATEDDATE,
|
||||
|
||||
STATUS
|
||||
)VALUES(
|
||||
#{id},
|
||||
#{workEmail},
|
||||
#{workPhone},
|
||||
#{company} ,
|
||||
#{users},
|
||||
#{jobTitle} ,
|
||||
#{lastName},
|
||||
#{firstName},
|
||||
|
||||
current_timestamp(),
|
||||
|
||||
1
|
||||
)
|
||||
</insert>
|
||||
|
||||
<update id="remove" parameterType="string" >
|
||||
UPDATE REGISTRATION SET
|
||||
STATUS = 13 ,
|
||||
ACTIVATEDATE = current_timestamp()
|
||||
WHERE
|
||||
ID = #{value}
|
||||
</update>
|
||||
|
||||
|
||||
<select id="get" parameterType="string" resultType="Registration">
|
||||
SELECT
|
||||
*
|
||||
FROM REGISTRATION
|
||||
WHERE
|
||||
ID = #{value}
|
||||
AND STATUS = 1
|
||||
</select>
|
||||
|
||||
<select id="queryCompanyByShortName" parameterType="string" resultType="Companys">
|
||||
SELECT
|
||||
ID,
|
||||
SHORTNAME
|
||||
FROM
|
||||
COMPANYS
|
||||
WHERE
|
||||
SHORTNAME = #{value}
|
||||
UNION
|
||||
SELECT
|
||||
ID,
|
||||
COMPANY SHORTNAME
|
||||
FROM
|
||||
REGISTRATION
|
||||
WHERE
|
||||
COMPANY = #{value}
|
||||
</select>
|
||||
|
||||
<select id="queryUserInfoByEmail" parameterType="string" resultType="UserInfo">
|
||||
SELECT
|
||||
ID,
|
||||
|
||||
@ -1,145 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.connsec.dao.persistence.ResourcesMapper" >
|
||||
|
||||
<sql id="dao_where_statement">
|
||||
<if test="id != null and id != ''">
|
||||
AND ID = #{id}
|
||||
</if>
|
||||
<if test="name != null and name != '' ">
|
||||
AND NAME like '%#{name}%'
|
||||
</if>
|
||||
<if test="pId != null and pId != '' ">
|
||||
AND PID = #{pId}
|
||||
</if>
|
||||
<if test="pName != null and pName != ''">
|
||||
AND PNAME like '%#{pName}%'
|
||||
</if>
|
||||
|
||||
</sql>
|
||||
|
||||
<select id="query" parameterType="Resources" resultType="Resources">
|
||||
SELECT
|
||||
*
|
||||
FROM RESOURCES
|
||||
WHERE 1 = 1
|
||||
<include refid="dao_where_statement"/>
|
||||
ORDER BY PID, SORTORDER
|
||||
</select>
|
||||
|
||||
<select id="grid" parameterType="Resources" resultType="Resources">
|
||||
SELECT
|
||||
*
|
||||
FROM RESOURCES
|
||||
WHERE 1 = 1
|
||||
<include refid="dao_where_statement"/>
|
||||
</select>
|
||||
|
||||
<insert id="insert" parameterType="Resources">
|
||||
INSERT INTO
|
||||
RESOURCES
|
||||
(
|
||||
ID ,
|
||||
NAME ,
|
||||
RESTYPE,
|
||||
RESACTION ,
|
||||
RESTARGET ,
|
||||
XPATH ,
|
||||
WIDTH ,
|
||||
HEIGHT ,
|
||||
PID ,
|
||||
PNAME ,
|
||||
SORTORDER,
|
||||
|
||||
DESCRIPTION ,
|
||||
STATUS ,
|
||||
CREATEDBY,
|
||||
CREATEDDATE
|
||||
)
|
||||
VALUES
|
||||
(
|
||||
#{id},
|
||||
#{name},
|
||||
#{resType},
|
||||
#{resAction},
|
||||
#{resTarget},
|
||||
#{xpath},
|
||||
#{width},
|
||||
#{height},
|
||||
#{pId},
|
||||
#{pName},
|
||||
#{sortOrder},
|
||||
|
||||
#{description},
|
||||
#{status},
|
||||
#{createdBy},
|
||||
current_timestamp
|
||||
)
|
||||
</insert>
|
||||
|
||||
<select id="count" resultType="java.lang.Integer">
|
||||
SELECT COUNT(*) FROM RESOURCES
|
||||
WHERE 1 = 1
|
||||
<include refid="dao_where_statement"/>
|
||||
</select>
|
||||
|
||||
<update id="update" parameterType="Resources" >
|
||||
UPDATE RESOURCES SET
|
||||
NAME = #{name},
|
||||
RESTYPE = #{resType},
|
||||
RESACTION = #{resAction},
|
||||
RESTARGET = #{resTarget},
|
||||
XPATH = #{xpath},
|
||||
WIDTH = #{width},
|
||||
HEIGHT = #{height},
|
||||
PID = #{pId},
|
||||
PNAME = #{pName},
|
||||
SORTORDER = #{sortOrder},
|
||||
|
||||
DESCRIPTION = #{description},
|
||||
STATUS = #{status},
|
||||
MODIFIEDBY = #{modifiedBy},
|
||||
MODIFIEDDATE = current_timestamp
|
||||
|
||||
WHERE 1 = 1
|
||||
<if test="id != null and id != ''">
|
||||
AND ID = #{id}
|
||||
</if>
|
||||
</update>
|
||||
|
||||
<update id="logisticDelete" parameterType="Resources" >
|
||||
UPDATE RESOURCES SET STATUS = '2'
|
||||
WHERE 1 = 1
|
||||
<if test="id != null and id != '' ">
|
||||
AND ID = #{id}
|
||||
</if>
|
||||
<if test="name != name">
|
||||
ADN NAME = #{name}
|
||||
</if>
|
||||
<if test="enable != null">
|
||||
ADN STATUS = '1'
|
||||
</if>
|
||||
<if test="xPath != null">
|
||||
ADN XPATH = #{xPath}
|
||||
</if>
|
||||
</update>
|
||||
|
||||
<update id="logisticBatchDelete" parameterType="java.util.List">
|
||||
UPDATE RESOURCES SET STATUS = '2'
|
||||
WHERE ID IN
|
||||
<foreach collection="ids" item="selectId" open="(" separator="," close=")">
|
||||
#{selectId}
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
<delete id="delete" parameterType="Resources" >
|
||||
DELETE FROM RESOURCES WHERE 1 = 1 AND
|
||||
(
|
||||
ID = #{id}
|
||||
OR PID = #{id}
|
||||
OR XPATH LIKE '%${id}%'
|
||||
)
|
||||
</delete>
|
||||
|
||||
|
||||
</mapper>
|
||||
@ -17,25 +17,7 @@
|
||||
</if>
|
||||
</sql>
|
||||
|
||||
<insert id="insert" parameterType="RoleUser">
|
||||
INSERT INTO
|
||||
ROLE_USER
|
||||
(
|
||||
ID,
|
||||
ROLEID,
|
||||
UID
|
||||
)
|
||||
VALUES
|
||||
(
|
||||
#{id},
|
||||
#{roleId},
|
||||
#{uid}
|
||||
)
|
||||
</insert>
|
||||
|
||||
<delete id="delete" parameterType="RoleUser">
|
||||
DELETE FROM ROLE_USER WHERE ROLEID = #{roleId} AND UID = #{uid}
|
||||
</delete>
|
||||
|
||||
<select id="gridAllUserInfoInRole" parameterType="RoleUser" resultType="UserInfo">
|
||||
SELECT
|
||||
|
||||
@ -37,63 +37,7 @@
|
||||
<include refid="sql_condition"/>
|
||||
</select>
|
||||
|
||||
<select id="query" parameterType="Roles" resultType="Roles">
|
||||
SELECT
|
||||
ID,
|
||||
NAME ,
|
||||
STATUS ,
|
||||
|
||||
CREATEDBY,
|
||||
CREATEDDATE,
|
||||
MODIFIEDBY,
|
||||
MODIFIEDDATE
|
||||
FROM ROLES
|
||||
<include refid="sql_condition"/>
|
||||
</select>
|
||||
|
||||
<select id="get" parameterType="string" resultType="Roles">
|
||||
SELECT
|
||||
ID,
|
||||
NAME ,
|
||||
STATUS ,
|
||||
|
||||
CREATEDBY,
|
||||
CREATEDDATE,
|
||||
MODIFIEDBY,
|
||||
MODIFIEDDATE
|
||||
FROM ROLES
|
||||
WHERE
|
||||
ID = #{value}
|
||||
</select>
|
||||
|
||||
<insert id="insert" parameterType="Roles">
|
||||
INSERT INTO
|
||||
ROLES
|
||||
(
|
||||
ID,
|
||||
NAME ,
|
||||
STATUS ,
|
||||
CREATEDBY
|
||||
)
|
||||
VALUES
|
||||
(
|
||||
#{id},
|
||||
#{name },
|
||||
#{status },
|
||||
#{createdBy}
|
||||
)
|
||||
</insert>
|
||||
|
||||
|
||||
|
||||
<update id="update" parameterType="Roles" >
|
||||
UPDATE ROLES SET
|
||||
NAME = #{name},
|
||||
STATUS = #{status},
|
||||
MODIFIEDBY = #{modifiedBy},
|
||||
MODIFIEDDATE = #{modifiedDate}
|
||||
WHERE ID = #{id}
|
||||
</update>
|
||||
|
||||
<update id="logisticDelete" parameterType="Roles" >
|
||||
UPDATE ROLES SET
|
||||
@ -107,9 +51,7 @@
|
||||
</if>
|
||||
</update>
|
||||
|
||||
<delete id="delete" parameterType="Roles" >
|
||||
DELETE FROM ROLES WHERE ID=#{id}
|
||||
</delete>
|
||||
|
||||
|
||||
<update id="logisticBatchDelete" parameterType="java.util.List">
|
||||
UPDATE ROLES SET STATUS='2' WHERE ID IN
|
||||
@ -118,11 +60,5 @@
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
<delete id="batchDelete" parameterType="java.util.List">
|
||||
DELETE FROM ROLES WHERE ID IN
|
||||
<foreach item="item" collection="list" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
@ -1,110 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.connsec.dao.persistence.Saml11DetailsMapper">
|
||||
|
||||
<insert id="insert" parameterType="SAML11Details">
|
||||
INSERT INTO SAML_V11_DETAILS(
|
||||
ID,
|
||||
CERTISSUER,
|
||||
CERTSUBJECT,
|
||||
CERTEXPIRATION,
|
||||
KEYSTORE,
|
||||
SPACSURL,
|
||||
TARGET,
|
||||
ISSUER,
|
||||
ENTITYID,
|
||||
AUDIENCE,
|
||||
VALIDITYINTERVAL,
|
||||
NAMEIDFORMAT,
|
||||
NAMEIDCONVERT
|
||||
)VALUES(
|
||||
#{id},
|
||||
#{certIssuer},
|
||||
#{certSubject},
|
||||
#{certExpiration},
|
||||
#{keyStore},
|
||||
#{spAcsUrl},
|
||||
#{target},
|
||||
#{issuer},
|
||||
#{entityId},
|
||||
#{audience},
|
||||
#{validityInterval},
|
||||
#{nameidFormat},
|
||||
#{nameIdConvert}
|
||||
)
|
||||
</insert>
|
||||
|
||||
<update id="update" parameterType="SAML11Details" >
|
||||
UPDATE SAML_V11_DETAILS SET
|
||||
<if test="keyStore != null">
|
||||
CERTISSUER = #{certIssuer},
|
||||
CERTSUBJECT = #{certSubject},
|
||||
CERTEXPIRATION = #{certExpiration},
|
||||
KEYSTORE = #{keyStore},
|
||||
</if>
|
||||
SPACSURL = #{spAcsUrl},
|
||||
TARGET = #{target},
|
||||
ISSUER = #{issuer},
|
||||
ENTITYID = #{entityId},
|
||||
AUDIENCE = #{audience},
|
||||
VALIDITYINTERVAL = #{validityInterval},
|
||||
NAMEIDFORMAT = #{nameidFormat},
|
||||
NAMEIDCONVERT = #{nameIdConvert}
|
||||
WHERE
|
||||
ID = #{id}
|
||||
</update>
|
||||
|
||||
<select id="get" parameterType="string" resultType="SAML11Details">
|
||||
SELECT
|
||||
SVD.CERTISSUER,
|
||||
SVD.CERTSUBJECT,
|
||||
SVD.CERTEXPIRATION,
|
||||
SVD.KEYSTORE,
|
||||
SVD.SPACSURL,
|
||||
SVD.TARGET,
|
||||
SVD.ISSUER,
|
||||
SVD.ENTITYID,
|
||||
SVD.AUDIENCE,
|
||||
SVD.VALIDITYINTERVAL,
|
||||
SVD.NAMEIDFORMAT,
|
||||
SVD.NAMEIDCONVERT,
|
||||
APP.*
|
||||
FROM
|
||||
SAML_V11_DETAILS SVD,
|
||||
APPLICATIONS APP
|
||||
WHERE
|
||||
APP.ID = #{value}
|
||||
AND SVD.ID = #{value}
|
||||
AND SVD.ID = APP.ID
|
||||
AND APP.STATUS = 1
|
||||
</select>
|
||||
|
||||
<select id="getSassTemplet" parameterType="string" resultType="SAML11Details">
|
||||
SELECT
|
||||
SVD.CERTISSUER,
|
||||
SVD.CERTSUBJECT,
|
||||
SVD.CERTEXPIRATION,
|
||||
SVD.KEYSTORE,
|
||||
SVD.SPACSURL,
|
||||
SVD.TARGET,
|
||||
SVD.ISSUER,
|
||||
SVD.ENTITYID,
|
||||
SVD.AUDIENCE,
|
||||
SVD.VALIDITYINTERVAL,
|
||||
SVD.NAMEIDFORMAT,
|
||||
SVD.NAMEIDCONVERT,
|
||||
APP.*
|
||||
FROM
|
||||
SAML_V11_DETAILS SVD,
|
||||
SAAS_APP_TEMPLET APP
|
||||
WHERE
|
||||
APP.ID = #{value}
|
||||
AND SVD.ID = #{value}
|
||||
AND SVD.ID = APP.ID
|
||||
AND APP.STATUS = 1
|
||||
</select>
|
||||
|
||||
<delete id="remove" parameterType="string" >
|
||||
DELETE FROM SAML_V11_DETAILS WHERE ID=#{value}
|
||||
</delete>
|
||||
</mapper>
|
||||
@ -2,114 +2,6 @@
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.connsec.dao.persistence.Saml20DetailsMapper">
|
||||
|
||||
<insert id="insert" parameterType="SAML20Details">
|
||||
INSERT INTO SAML_V20_DETAILS(
|
||||
ID,
|
||||
CERTISSUER,
|
||||
CERTSUBJECT,
|
||||
CERTEXPIRATION,
|
||||
KEYSTORE,
|
||||
SPACSURL,
|
||||
ISSUER,
|
||||
ENTITYID,
|
||||
AUDIENCE,
|
||||
VALIDITYINTERVAL,
|
||||
NAMEIDFORMAT,
|
||||
ENCRYPTED,
|
||||
BINDING,
|
||||
NAMEIDCONVERT
|
||||
)VALUES(
|
||||
#{id},
|
||||
#{certIssuer},
|
||||
#{certSubject},
|
||||
#{certExpiration},
|
||||
#{keyStore},
|
||||
#{spAcsUrl},
|
||||
#{issuer},
|
||||
#{entityId},
|
||||
#{audience},
|
||||
#{validityInterval},
|
||||
#{nameidFormat},
|
||||
#{encrypted},
|
||||
#{binding},
|
||||
#{nameIdConvert}
|
||||
)
|
||||
</insert>
|
||||
|
||||
<update id="update" parameterType="SAML20Details" >
|
||||
UPDATE SAML_V20_DETAILS SET
|
||||
<if test="keyStore != null">
|
||||
CERTISSUER = #{certIssuer},
|
||||
CERTSUBJECT = #{certSubject},
|
||||
CERTEXPIRATION = #{certExpiration},
|
||||
KEYSTORE = #{keyStore},
|
||||
</if>
|
||||
SPACSURL = #{spAcsUrl},
|
||||
ISSUER = #{issuer},
|
||||
ENTITYID = #{entityId},
|
||||
AUDIENCE = #{audience},
|
||||
VALIDITYINTERVAL = #{validityInterval},
|
||||
NAMEIDFORMAT = #{nameidFormat},
|
||||
ENCRYPTED = #{encrypted},
|
||||
BINDING = #{binding},
|
||||
NAMEIDCONVERT = #{nameIdConvert}
|
||||
WHERE
|
||||
ID = #{id}
|
||||
</update>
|
||||
|
||||
<select id="get" parameterType="string" resultType="SAML20Details">
|
||||
SELECT
|
||||
SVD.CERTISSUER,
|
||||
SVD.CERTSUBJECT,
|
||||
SVD.CERTEXPIRATION,
|
||||
SVD.KEYSTORE,
|
||||
SVD.SPACSURL ,
|
||||
SVD.ISSUER,
|
||||
SVD.ENTITYID,
|
||||
SVD.AUDIENCE,
|
||||
SVD.VALIDITYINTERVAL ,
|
||||
SVD.NAMEIDFORMAT,
|
||||
SVD.ENCRYPTED,
|
||||
SVD.BINDING,
|
||||
SVD.NAMEIDCONVERT,
|
||||
APP.*
|
||||
FROM
|
||||
SAML_V20_DETAILS SVD,
|
||||
APPLICATIONS APP
|
||||
WHERE
|
||||
APP.ID = #{value}
|
||||
AND SVD.ID = #{value}
|
||||
AND SVD.ID = APP.ID
|
||||
AND APP.STATUS = 1
|
||||
</select>
|
||||
|
||||
<select id="getSassTemplet" parameterType="string" resultType="SAML20Details">
|
||||
SELECT
|
||||
SVD.CERTISSUER,
|
||||
SVD.CERTSUBJECT,
|
||||
SVD.CERTEXPIRATION,
|
||||
SVD.KEYSTORE,
|
||||
SVD.SPACSURL ,
|
||||
SVD.ISSUER,
|
||||
SVD.ENTITYID,
|
||||
SVD.AUDIENCE,
|
||||
SVD.VALIDITYINTERVAL ,
|
||||
SVD.NAMEIDFORMAT,
|
||||
SVD.ENCRYPTED,
|
||||
SVD.BINDING,
|
||||
SVD.NAMEIDCONVERT,
|
||||
APP.*
|
||||
FROM
|
||||
SAML_V20_DETAILS SVD,
|
||||
SAAS_APP_TEMPLET APP
|
||||
WHERE
|
||||
APP.ID = #{value}
|
||||
AND SVD.ID = #{value}
|
||||
AND SVD.ID = APP.ID
|
||||
AND APP.STATUS = 1
|
||||
</select>
|
||||
|
||||
<delete id="remove" parameterType="string" >
|
||||
DELETE FROM SAML_V20_DETAILS WHERE ID=#{value}
|
||||
</delete>
|
||||
</mapper>
|
||||
@ -2,57 +2,5 @@
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.connsec.dao.persistence.Saml20MetadataMapper">
|
||||
|
||||
<insert id="insert" parameterType="Saml20Metadata">
|
||||
INSERT INTO SAML_V20_METADATA(
|
||||
ID,
|
||||
ORGNAME,
|
||||
ORGDISPLAYNAME,
|
||||
ORGURL,
|
||||
CONTACTTYPE,
|
||||
COMPANY,
|
||||
GIVENNAME,
|
||||
SURNAME,
|
||||
EMAILADDRESS,
|
||||
TELEPHONENUMBER
|
||||
|
||||
)VALUES(
|
||||
#{id},
|
||||
#{orgName},
|
||||
#{orgDisplayName},
|
||||
#{orgURL},
|
||||
#{contactType},
|
||||
#{company},
|
||||
#{givenName},
|
||||
#{surName},
|
||||
#{emailAddress},
|
||||
#{telephoneNumber}
|
||||
)
|
||||
</insert>
|
||||
|
||||
<update id="update" parameterType="Saml20Metadata" >
|
||||
UPDATE SAML_V20_METADATA SET
|
||||
ORGNAME = #{orgName},
|
||||
ORGDISPLAYNAME = #{orgDisplayName},
|
||||
ORGURL = #{orgURL},
|
||||
CONTACTTYPE = #{contactType},
|
||||
COMPANY = #{company},
|
||||
GIVENNAME = #{givenName},
|
||||
SURNAME = #{surName},
|
||||
EMAILADDRESS = #{emailAddress},
|
||||
TELEPHONENUMBER = #{telephoneNumber}
|
||||
WHERE
|
||||
ID = #{id}
|
||||
</update>
|
||||
|
||||
<select id="get" parameterType="string" resultType="Saml20Metadata">
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
SAML_V20_METADATA
|
||||
|
||||
<if test="value != null and value != ''">
|
||||
WHERE ID = #{value}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@ -2,71 +2,5 @@
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.connsec.dao.persistence.TokenBasedDetailsMapper">
|
||||
|
||||
<insert id="insert" parameterType="TokenBasedDetails">
|
||||
INSERT INTO TOKEN_BASED_DETAILS(
|
||||
ID,
|
||||
REDIRECTURI,
|
||||
COOKIENAME,
|
||||
ALGORITHM,
|
||||
ALGORITHMKEY,
|
||||
EXPIRES,
|
||||
UID,
|
||||
USERNAME,
|
||||
EMAIL,
|
||||
WINDOWSACCOUNT,
|
||||
EMPLOYEENUMBER,
|
||||
DEPARTMENTID,
|
||||
DEPARTMENT
|
||||
)VALUES(
|
||||
#{id},
|
||||
#{redirectUri},
|
||||
#{cookieName},
|
||||
#{algorithm},
|
||||
#{algorithmKey},
|
||||
#{expires},
|
||||
#{uid},
|
||||
#{username} ,
|
||||
#{email} ,
|
||||
#{windowsAccount},
|
||||
#{employeeNumber},
|
||||
#{departmentId},
|
||||
#{department}
|
||||
)
|
||||
</insert>
|
||||
|
||||
<update id="update" parameterType="TokenBasedDetails" >
|
||||
UPDATE TOKEN_BASED_DETAILS SET
|
||||
REDIRECTURI = #{redirectUri},
|
||||
COOKIENAME = #{cookieName},
|
||||
ALGORITHM = #{algorithm},
|
||||
ALGORITHMKEY = #{algorithmKey},
|
||||
EXPIRES = #{expires},
|
||||
UID = #{uid},
|
||||
USERNAME = #{username},
|
||||
EMAIL = #{email},
|
||||
WINDOWSACCOUNT = #{windowsAccount},
|
||||
EMPLOYEENUMBER = #{employeeNumber},
|
||||
DEPARTMENTID = #{departmentId},
|
||||
DEPARTMENT = #{department}
|
||||
|
||||
WHERE
|
||||
ID = #{id}
|
||||
</update>
|
||||
|
||||
<select id="get" parameterType="string" resultType="TokenBasedDetails">
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
TOKEN_BASED_DETAILS TBD,
|
||||
APPLICATIONS APP
|
||||
WHERE
|
||||
APP.ID = #{value}
|
||||
AND TBD.ID = #{value}
|
||||
AND TBD.ID = APP.ID
|
||||
AND STATUS = 1
|
||||
</select>
|
||||
|
||||
<delete id="remove" parameterType="string" >
|
||||
DELETE FROM TOKEN_BASED_DETAILS WHERE ID=#{value}
|
||||
</delete>
|
||||
</mapper>
|
||||
@ -1,120 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.connsec.dao.persistence.UserExtraMapper">
|
||||
|
||||
<sql id="where_statement">
|
||||
<if test="id != null and id != ''">
|
||||
AND id = #{id}
|
||||
</if>
|
||||
<if test="attribute != null and attribute != ''">
|
||||
AND ATTRIBUTE LIKE '%${name}%'
|
||||
</if>
|
||||
<if test="userTypeId != null and userTypeId != ''">
|
||||
AND USERTYPEID = #{userTypeId}
|
||||
</if>
|
||||
</sql>
|
||||
|
||||
<insert id="insert" parameterType="UserExtra">
|
||||
INSERT INTO USEREXTRA(
|
||||
ID,
|
||||
USERTYPEID,
|
||||
USERTYPENAME,
|
||||
ATTRIBUTENAME,
|
||||
ATTRIBUTE,
|
||||
ATTRIBUTETYPE,
|
||||
DEFAULTVALUE,
|
||||
SORTORDER,
|
||||
DESCRIPTION,
|
||||
STATUS
|
||||
)VALUES(
|
||||
#{id},
|
||||
#{userTypeId},
|
||||
#{userTypeName},
|
||||
#{attributeName},
|
||||
#{attribute},
|
||||
#{attributeType},
|
||||
#{defaultValue},
|
||||
#{sortOrder},
|
||||
#{description},
|
||||
#{status}
|
||||
)
|
||||
</insert>
|
||||
|
||||
<update id="update" parameterType="UserExtra" >
|
||||
UPDATE USEREXTRA SET
|
||||
ATTRIBUTENAME = #{attributeName},
|
||||
ATTRIBUTE = #{attribute},
|
||||
ATTRIBUTETYPE = #{attributeType},
|
||||
DEFAULTVALUE = #{defaultValue},
|
||||
SORTORDER = #{sortOrder},
|
||||
DESCRIPTION = #{description},
|
||||
STATUS = #{status}
|
||||
|
||||
WHERE
|
||||
ID = #{id}
|
||||
</update>
|
||||
|
||||
<select id="query" parameterType="UserExtra" resultType="UserExtra">
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
USEREXTRA
|
||||
WHERE
|
||||
STATUS != 9
|
||||
<include refid="where_statement"/>
|
||||
ORDER BY SORTORDER
|
||||
</select>
|
||||
|
||||
<select id="load" parameterType="UserExtra" resultType="UserExtra">
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
USEREXTRA
|
||||
WHERE
|
||||
STATUS != 9
|
||||
<include refid="where_statement"/>
|
||||
</select>
|
||||
|
||||
<select id="get" parameterType="string" resultType="UserExtra">
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
USEREXTRA
|
||||
WHERE
|
||||
ID = #{value}
|
||||
AND STATUS != 9
|
||||
</select>
|
||||
|
||||
<select id="grid" parameterType="UserExtra" resultType="UserExtra">
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
USEREXTRA
|
||||
WHERE
|
||||
STATUS != 9
|
||||
<include refid="where_statement"/>
|
||||
ORDER BY SORTORDER
|
||||
</select>
|
||||
|
||||
<select id="count" parameterType="UserExtra" resultType="java.lang.Integer">
|
||||
SELECT
|
||||
COUNT(*)
|
||||
FROM
|
||||
USEREXTRA
|
||||
WHERE
|
||||
STATUS != 9
|
||||
<include refid="where_statement"/>
|
||||
|
||||
</select>
|
||||
|
||||
<delete id="remove" parameterType="string" >
|
||||
DELETE FROM USEREXTRA WHERE ID=#{value}
|
||||
</delete>
|
||||
|
||||
<delete id="batchDelete" parameterType="java.util.List">
|
||||
DELETE FROM USEREXTRA WHERE ID IN
|
||||
<foreach collection="list" item="item" index="index" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@ -1,325 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.connsec.dao.persistence.UserInfoMapper">
|
||||
|
||||
<insert id="insert" parameterType="UserInfo">
|
||||
INSERT INTO USERINFO(
|
||||
ID,
|
||||
USERNAME,
|
||||
PASSWORD,
|
||||
DECIPHERABLE,
|
||||
USERTYPE,
|
||||
WINDOWSACCOUNT,
|
||||
|
||||
DISPLAYNAME ,
|
||||
NICKNAME ,
|
||||
NAMEZHSPELL,
|
||||
NAMEZHSHORTSPELL,
|
||||
GIVENNAME ,
|
||||
MIDDLENAME ,
|
||||
FAMILYNAME ,
|
||||
HONORIFICPREFIX ,
|
||||
HONORIFICSUFFIX ,
|
||||
FORMATTEDNAME ,
|
||||
MARRIED,
|
||||
GENDER,
|
||||
BIRTHDATE,
|
||||
PICTURE,
|
||||
IDTYPE,
|
||||
IDCARDNO ,
|
||||
WEBSITE,
|
||||
|
||||
AUTHNTYPE,
|
||||
MOBILE,
|
||||
MOBILEVERIFIED ,
|
||||
EMAIL,
|
||||
EMAILVERIFIED,
|
||||
PASSWORDQUESTION,
|
||||
PASSWORDANSWER,
|
||||
APPLOGINPASSWORD,
|
||||
PROTECTEDAPPS,
|
||||
|
||||
LASTLOGINTIME,
|
||||
LASTLOGOFFTIME,
|
||||
PASSWORDLASTSETTIME,
|
||||
BADPASSWORDCOUNT,
|
||||
UNLOCKTIME,
|
||||
ISLOCKED,
|
||||
LOCALE,
|
||||
TIMEZONE,
|
||||
PREFERREDLANGUAGE,
|
||||
|
||||
WORKCOUNTRY,
|
||||
WORKREGION,
|
||||
WORKLOCALITY,
|
||||
WORKSTREETADDRESS,
|
||||
WORKADDRESSFORMATTED,
|
||||
WORKEMAIL,
|
||||
WORKPHONENUMBER,
|
||||
WORKPOSTALCODE,
|
||||
WORKFAX,
|
||||
|
||||
HOMECOUNTRY,
|
||||
HOMEREGION,
|
||||
HOMELOCALITY,
|
||||
HOMESTREETADDRESS,
|
||||
HOMEADDRESSFORMATTED,
|
||||
HOMEEMAIL,
|
||||
HOMEPHONENUMBER,
|
||||
HOMEPOSTALCODE,
|
||||
HOMEFAX,
|
||||
|
||||
EMPLOYEENUMBER,
|
||||
DIVISION,
|
||||
COSTCENTER,
|
||||
ORGANIZATION,
|
||||
DEPARTMENTID,
|
||||
DEPARTMENT,
|
||||
JOBTITLE,
|
||||
JOBLEVEL,
|
||||
MANAGERID,
|
||||
MANAGER,
|
||||
ASSISTANTID,
|
||||
ASSISTANT,
|
||||
ENTRYDATE,
|
||||
QUITDATE,
|
||||
STARTWORKDATE,
|
||||
|
||||
QQ,
|
||||
WEIXIN,
|
||||
SINAWEIBO,
|
||||
YIXIN,
|
||||
FACEBOOK,
|
||||
SKYPE,
|
||||
MSN,
|
||||
GTALK,
|
||||
YAHOO,
|
||||
LINE,
|
||||
AIM,
|
||||
DEFINEIM,
|
||||
EXTRAATTRIBUTE,
|
||||
|
||||
SORTORDER,
|
||||
|
||||
CREATEDBY,
|
||||
CREATEDDATE,
|
||||
MODIFIEDBY,
|
||||
MODIFIEDDATE,
|
||||
|
||||
STATUS
|
||||
)VALUES(
|
||||
#{id},
|
||||
#{username},
|
||||
#{password},
|
||||
#{decipherable},
|
||||
#{userType},
|
||||
#{windowsAccount} ,
|
||||
|
||||
#{displayName} ,
|
||||
#{nickName},
|
||||
#{nameZHSpell},
|
||||
#{nameZHShortSpell},
|
||||
#{givenName},
|
||||
#{middleName},
|
||||
#{familyName},
|
||||
#{honorificPrefix},
|
||||
#{honorificSuffix},
|
||||
#{formattedName},
|
||||
#{married},
|
||||
#{gender},
|
||||
#{birthDate},
|
||||
#{picture},
|
||||
#{idType},
|
||||
#{idCardNo},
|
||||
#{webSite},
|
||||
|
||||
#{authnType},
|
||||
#{mobile} ,
|
||||
#{mobileVerified} ,
|
||||
#{email},
|
||||
#{emailVerified} ,
|
||||
|
||||
#{passwordQuestion},
|
||||
#{passwordAnswer} ,
|
||||
#{appLoginPassword} ,
|
||||
#{protectedApps} ,
|
||||
|
||||
#{lastLoginTime},
|
||||
#{lastLogoffTime},
|
||||
#{passwordLastSetTime},
|
||||
#{badPasswordCount} ,
|
||||
#{unLockTime},
|
||||
#{isLocked},
|
||||
#{locale},
|
||||
#{timeZone} ,
|
||||
#{preferredLanguage},
|
||||
|
||||
#{workCountry},
|
||||
#{workRegion} ,
|
||||
#{workLocality},
|
||||
#{workStreetAddress},
|
||||
#{workAddressFormatted},
|
||||
#{workEmail} ,
|
||||
#{workPhoneNumber},
|
||||
#{workPostalCode},
|
||||
#{workFax},
|
||||
|
||||
#{homeCountry},
|
||||
#{homeRegion} ,
|
||||
#{homeLocality},
|
||||
#{homeStreetAddress},
|
||||
#{homeAddressFormatted},
|
||||
#{homeEmail} ,
|
||||
#{homePhoneNumber},
|
||||
#{homePostalCode},
|
||||
#{homeFax},
|
||||
|
||||
#{employeeNumber},
|
||||
#{division},
|
||||
#{costCenter},
|
||||
#{organization},
|
||||
#{departmentId},
|
||||
#{department},
|
||||
#{jobTitle},
|
||||
#{jobLevel},
|
||||
#{managerId},
|
||||
#{manager},
|
||||
#{assistantId},
|
||||
#{assistant},
|
||||
#{entryDate},
|
||||
#{quitDate},
|
||||
#{startWorkDate},
|
||||
|
||||
#{qq},
|
||||
#{weixin},
|
||||
#{sinaweibo},
|
||||
#{yixin},
|
||||
#{facebook},
|
||||
#{skype},
|
||||
#{msn},
|
||||
#{gtalk},
|
||||
#{yahoo},
|
||||
#{line},
|
||||
#{aim},
|
||||
#{defineIm},
|
||||
|
||||
#{extraAttribute},
|
||||
|
||||
#{sortOrder},
|
||||
|
||||
#{createdBy},
|
||||
#{createdDate} ,
|
||||
#{modifiedBy},
|
||||
#{modifiedDate},
|
||||
|
||||
#{status}
|
||||
)
|
||||
</insert>
|
||||
|
||||
<update id="update" parameterType="UserInfo" >
|
||||
UPDATE USERINFO SET
|
||||
WINDOWSACCOUNT = #{windowsAccount},
|
||||
|
||||
DISPLAYNAME = #{displayName},
|
||||
NICKNAME = #{nickName},
|
||||
NAMEZHSPELL = #{nameZHSpell},
|
||||
NAMEZHSHORTSPELL= #{nameZHShortSpell},
|
||||
GIVENNAME = #{givenName},
|
||||
MIDDLENAME = #{middleName},
|
||||
FAMILYNAME = #{familyName},
|
||||
HONORIFICPREFIX = #{honorificPrefix},
|
||||
HONORIFICSUFFIX = #{honorificSuffix},
|
||||
FORMATTEDNAME = #{formattedName} ,
|
||||
MARRIED = #{married},
|
||||
GENDER = #{gender},
|
||||
BIRTHDATE = #{birthDate},
|
||||
<if test="picture != null">
|
||||
PICTURE = #{picture},
|
||||
</if>
|
||||
IDTYPE = #{idType},
|
||||
IDCARDNO = #{idCardNo},
|
||||
WEBSITE = #{webSite},
|
||||
|
||||
LOCALE = #{locale},
|
||||
TIMEZONE = #{timeZone},
|
||||
PREFERREDLANGUAGE= #{preferredLanguage},
|
||||
|
||||
WORKCOUNTRY = #{workCountry},
|
||||
WORKREGION = #{workRegion},
|
||||
WORKLOCALITY = #{workLocality},
|
||||
WORKSTREETADDRESS= #{workStreetAddress},
|
||||
WORKADDRESSFORMATTED= #{workAddressFormatted},
|
||||
WORKEMAIL = #{workEmail},
|
||||
WORKPHONENUMBER = #{workPhoneNumber},
|
||||
WORKPOSTALCODE = #{workPostalCode},
|
||||
WORKFAX = #{workFax},
|
||||
|
||||
HOMECOUNTRY = #{homeCountry},
|
||||
HOMEREGION = #{homeRegion},
|
||||
HOMELOCALITY = #{homeLocality},
|
||||
HOMESTREETADDRESS= #{homeStreetAddress},
|
||||
HOMEADDRESSFORMATTED= #{homeAddressFormatted},
|
||||
HOMEEMAIL = #{homeEmail},
|
||||
HOMEPHONENUMBER= #{homePhoneNumber},
|
||||
HOMEPOSTALCODE = #{homePostalCode},
|
||||
HOMEFAX = #{homeFax},
|
||||
|
||||
EMPLOYEENUMBER = #{employeeNumber},
|
||||
DIVISION = #{division},
|
||||
COSTCENTER = #{costCenter},
|
||||
ORGANIZATION = #{organization},
|
||||
DEPARTMENTID = #{departmentId},
|
||||
DEPARTMENT = #{department},
|
||||
JOBTITLE = #{jobTitle},
|
||||
JOBLEVEL = #{jobLevel},
|
||||
MANAGERID = #{managerId},
|
||||
MANAGER = #{manager},
|
||||
ASSISTANTID = #{assistantId},
|
||||
ASSISTANT = #{assistant},
|
||||
ENTRYDATE = #{entryDate},
|
||||
QUITDATE = #{quitDate},
|
||||
STARTWORKDATE = #{startWorkDate},
|
||||
|
||||
QQ = #{qq},
|
||||
WEIXIN = #{weixin},
|
||||
SINAWEIBO = #{sinaweibo},
|
||||
YIXIN = #{yixin},
|
||||
FACEBOOK = #{facebook},
|
||||
SKYPE = #{skype},
|
||||
MSN = #{msn},
|
||||
GTALK = #{gtalk},
|
||||
YAHOO = #{yahoo},
|
||||
LINE = #{line},
|
||||
AIM = #{aim},
|
||||
DEFINEIM = #{defineIm},
|
||||
|
||||
EXTRAATTRIBUTE = #{extraAttribute},
|
||||
SORTORDER = #{sortOrder},
|
||||
STATUS = #{status},
|
||||
MODIFIEDBY = #{modifiedBy},
|
||||
MODIFIEDDATE = current_timestamp
|
||||
WHERE
|
||||
ID = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="remove" parameterType="string">
|
||||
DELETE FROM USERINFO WHERE ID = #{value}
|
||||
</delete>
|
||||
<mapper namespace="org.maxkey.dao.persistence.UserInfoMapper">
|
||||
|
||||
|
||||
|
||||
<select id="query" parameterType="UserInfo" resultType="UserInfo">
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
USERINFO
|
||||
WHERE
|
||||
(1=1)
|
||||
<if test="username != null and username != ''">
|
||||
AND USERNAME = #{username}
|
||||
</if>
|
||||
ORDER BY SORTORDER
|
||||
</select>
|
||||
|
||||
<select id="grid" parameterType="UserInfo" resultType="UserInfo">
|
||||
SELECT
|
||||
@ -409,32 +93,6 @@
|
||||
|
||||
|
||||
|
||||
<select id="load" parameterType="UserInfo" resultType="UserInfo">
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
USERINFO
|
||||
WHERE
|
||||
(1=1)
|
||||
<if test="username != null and username != ''">
|
||||
AND USERNAME = #{username}
|
||||
</if>
|
||||
<if test="id != null and id != ''">
|
||||
AND ID = #{id}
|
||||
</if>
|
||||
<if test="userType != null and userType != ''">
|
||||
AND USERTYPE = #{userType}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="get" parameterType="String" resultType="UserInfo">
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
USERINFO
|
||||
WHERE
|
||||
ID = #{value}
|
||||
</select>
|
||||
|
||||
<update id="locked" parameterType="UserInfo" >
|
||||
UPDATE USERINFO SET
|
||||
|
||||
@ -1,97 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.connsec.dao.persistence.UserTypeMapper">
|
||||
<sql id="where_statement">
|
||||
<if test="id != null and id != ''">
|
||||
AND id = #{id}
|
||||
</if>
|
||||
<if test="name != null and name != ''">
|
||||
AND NAME LIKE '%${name}%'
|
||||
</if>
|
||||
</sql>
|
||||
|
||||
<insert id="insert" parameterType="UserType">
|
||||
INSERT INTO USERTYPE(
|
||||
ID,
|
||||
NAME,
|
||||
SORTORDER,
|
||||
DESCRIPTION,
|
||||
STATUS
|
||||
|
||||
)VALUES(
|
||||
#{id},
|
||||
#{name},
|
||||
#{sortOrder},
|
||||
#{description},
|
||||
#{status}
|
||||
)
|
||||
</insert>
|
||||
|
||||
<update id="update" parameterType="UserType" >
|
||||
UPDATE USERTYPE SET
|
||||
NAME = #{name},
|
||||
SORTORDER = #{sortOrder},
|
||||
DESCRIPTION = #{description},
|
||||
STATUS = #{status}
|
||||
|
||||
WHERE
|
||||
ID = #{id}
|
||||
</update>
|
||||
|
||||
<select id="query" parameterType="UserType" resultType="UserType">
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
USERTYPE
|
||||
WHERE
|
||||
STATUS = 3
|
||||
<include refid="where_statement"/>
|
||||
ORDER BY SORTORDER
|
||||
</select>
|
||||
|
||||
<select id="load" parameterType="UserType" resultType="UserType">
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
USERTYPE
|
||||
WHERE
|
||||
STATUS != 9
|
||||
<include refid="where_statement"/>
|
||||
</select>
|
||||
|
||||
<select id="get" parameterType="string" resultType="UserType">
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
USERTYPE
|
||||
WHERE
|
||||
ID = #{value}
|
||||
AND STATUS != 9
|
||||
</select>
|
||||
|
||||
<select id="grid" parameterType="UserType" resultType="UserType">
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
USERTYPE
|
||||
WHERE
|
||||
STATUS != 9
|
||||
<include refid="where_statement"/>
|
||||
ORDER BY SORTORDER
|
||||
</select>
|
||||
|
||||
<select id="count" parameterType="UserType" resultType="java.lang.Integer">
|
||||
SELECT
|
||||
COUNT(*)
|
||||
FROM
|
||||
USERTYPE
|
||||
WHERE
|
||||
STATUS != 9
|
||||
<include refid="where_statement"/>
|
||||
|
||||
</select>
|
||||
|
||||
<delete id="remove" parameterType="string" >
|
||||
DELETE FROM USERTYPE WHERE ID=#{value}
|
||||
</delete>
|
||||
</mapper>
|
||||
@ -2,5 +2,5 @@
|
||||
<classpath>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8/"/>
|
||||
<classpathentry kind="con" path="org.eclipse.buildship.core.gradleclasspathcontainer"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
<classpathentry kind="output" path="bin/default"/>
|
||||
</classpath>
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>maxkey-demos</name>
|
||||
<comment>Project maxkey-demos created by Buildship.</comment>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
@ -17,7 +17,7 @@
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.buildship.core.gradleprojectnature</nature>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
<nature>org.eclipse.buildship.core.gradleprojectnature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
||||
|
||||
@ -1,4 +0,0 @@
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
|
||||
org.eclipse.jdt.core.compiler.compliance=1.8
|
||||
org.eclipse.jdt.core.compiler.source=1.8
|
||||
@ -1,6 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="src" path="src/main/java"/>
|
||||
<classpathentry kind="src" output="bin/main" path="src/main/java">
|
||||
<attributes>
|
||||
<attribute name="gradle_scope" value="main"/>
|
||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8/"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/>
|
||||
<classpathentry kind="con" path="org.eclipse.buildship.core.gradleclasspathcontainer">
|
||||
@ -8,5 +13,5 @@
|
||||
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
<classpathentry kind="output" path="bin/default"/>
|
||||
</classpath>
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>maxkey-demo-cas</name>
|
||||
<comment>Project maxkey-demo-cas created by Buildship.</comment>
|
||||
<comment>maxkey-demo-cas</comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
@ -27,10 +27,10 @@
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.buildship.core.gradleprojectnature</nature>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
|
||||
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
|
||||
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
|
||||
<nature>org.eclipse.buildship.core.gradleprojectnature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
||||
|
||||
@ -1,4 +0,0 @@
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
|
||||
org.eclipse.jdt.core.compiler.compliance=1.8
|
||||
org.eclipse.jdt.core.compiler.source=1.8
|
||||
@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project-modules id="moduleCoreId" project-version="2.0">
|
||||
<project-modules id="moduleCoreId" project-version="1.5.0">
|
||||
<wb-module deploy-name="maxkey-demo-cas">
|
||||
<property name="context-root" value="demo-cas"/>
|
||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="src/main/java"/>
|
||||
|
||||
Binary file not shown.
@ -1,7 +1,17 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="src" path="src/main/java"/>
|
||||
<classpathentry kind="src" path="src/main/resources"/>
|
||||
<classpathentry kind="src" output="bin/main" path="src/main/java">
|
||||
<attributes>
|
||||
<attribute name="gradle_scope" value="main"/>
|
||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="src" output="bin/main" path="src/main/resources">
|
||||
<attributes>
|
||||
<attribute name="gradle_scope" value="main"/>
|
||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8/"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/>
|
||||
<classpathentry kind="con" path="org.eclipse.buildship.core.gradleclasspathcontainer">
|
||||
@ -9,5 +19,5 @@
|
||||
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
<classpathentry kind="output" path="bin/default"/>
|
||||
</classpath>
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>maxkey-demo-jwt</name>
|
||||
<comment>Project maxkey-demo-jwt created by Buildship.</comment>
|
||||
<comment>maxkey-demo-jwt</comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
@ -27,10 +27,10 @@
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.buildship.core.gradleprojectnature</nature>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
|
||||
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
|
||||
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
|
||||
<nature>org.eclipse.buildship.core.gradleprojectnature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
||||
|
||||
@ -1,4 +0,0 @@
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
|
||||
org.eclipse.jdt.core.compiler.compliance=1.8
|
||||
org.eclipse.jdt.core.compiler.source=1.8
|
||||
@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project-modules id="moduleCoreId" project-version="2.0">
|
||||
<project-modules id="moduleCoreId" project-version="1.5.0">
|
||||
<wb-module deploy-name="maxkey-demo-jwt">
|
||||
<property name="context-root" value="demo-jwt"/>
|
||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="src/main/resources"/>
|
||||
|
||||
Binary file not shown.
@ -1,6 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="src" path="src/main/java"/>
|
||||
<classpathentry kind="src" output="bin/main" path="src/main/java">
|
||||
<attributes>
|
||||
<attribute name="gradle_scope" value="main"/>
|
||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8/"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/>
|
||||
<classpathentry kind="con" path="org.eclipse.buildship.core.gradleclasspathcontainer">
|
||||
@ -8,5 +13,5 @@
|
||||
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
<classpathentry kind="output" path="bin/default"/>
|
||||
</classpath>
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user