Skip to content

Commit

Permalink
Merge pull request #57 from WeBankFinTech/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
yanggang-JV authored Jun 17, 2020
2 parents 3cde614 + b81417e commit 292a1e2
Show file tree
Hide file tree
Showing 17 changed files with 1,239 additions and 844 deletions.
82 changes: 61 additions & 21 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ if (!gradle.startParameter.isOffline()) {
apply plugin: 'signing'
}

version = "1.0.2"
version = "1.0.3"
//设置jdk的版本
sourceCompatibility = 1.8
targetCompatibility = 1.8
Expand All @@ -53,38 +53,72 @@ repositories {
}
}

def spring_version = "4.3.27.RELEASE"
def log4j_version = "2.13.3";
def slf4j_version = "1.7.30";
def jackson_version = "2.11.0";
def mysql_version = "8.0.20";
def swagger_version = "2.9.2";

List swagger = [
"io.springfox:springfox-swagger2:2.9.2",
"io.springfox:springfox-swagger-ui:2.9.2"
"io.springfox:springfox-swagger2:$swagger_version",
"io.springfox:springfox-swagger-ui:$swagger_version"
]

List apache_commons = [
"org.apache.commons:commons-collections4:4.1",
"org.apache.commons:commons-lang3:3.5",
"commons-cli:commons-cli:1.3.1",
'com.github.fge:json-schema-validator:2.2.6',
"com.fasterxml.jackson.core:jackson-databind:2.10.0",
"com.fasterxml.jackson.core:jackson-core:2.10.0",
"com.fasterxml.jackson.core:jackson-annotations:2.10.0",
"com.github.reinert:jjschema:1.16",
"com.google.zxing:core:3.3.0",
"javassist:javassist:3.12.1.GA"
"org.apache.logging.log4j:log4j-api:$log4j_version",
"org.apache.logging.log4j:log4j-web:$log4j_version",
"org.apache.logging.log4j:log4j-core:$log4j_version",
"org.apache.logging.log4j:log4j-jcl:$log4j_version",
"org.apache.logging.log4j:log4j-slf4j-impl:$log4j_version",
"org.slf4j:jul-to-slf4j:$slf4j_version",
"org.slf4j:slf4j-api:$slf4j_version"
]

List json = [
"com.fasterxml.jackson.datatype:jackson-datatype-jdk8:$jackson_version",
"com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version",
"com.fasterxml.jackson.module:jackson-module-parameter-names:$jackson_version",
"com.fasterxml.jackson.core:jackson-databind:$jackson_version",
"com.fasterxml.jackson.core:jackson-annotations:$jackson_version",
"com.fasterxml.jackson.core:jackson-core:$jackson_version",
"com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:$jackson_version"
]

List mysql_driver = [
"mysql:mysql-connector-java:$mysql_version"
]

List spring = [
"org.springframework:spring-core:$spring_version",
"org.springframework:spring-beans:$spring_version",
"org.springframework:spring-context:$spring_version",
"org.springframework:spring-tx:$spring_version",
"org.springframework:spring-jdbc:$spring_version",
"org.springframework:spring-test:$spring_version",
"org.springframework:spring-context-support:$spring_version",
"org.springframework:spring-web:$spring_version",
"org.springframework:spring-webmvc:$spring_version"
]

List other = [
"javassist:javassist:3.12.1.GA"
]

configurations {
localDeps
}

//添加编译时的依赖
dependencies {
localDeps 'org.projectlombok:lombok:1.18.10'
localDeps 'org.projectlombok:lombok:1.18.12'
// Check SDK pipeline dependency
if (file("./dependencies/weid-java-sdk-pipeline.jar").exists()) {
println "Pipeline jar for WeIdentity Java SDK found."
compile files('./dependencies/weid-java-sdk-pipeline.jar')
} else {
println "No pipeline jar found for WeIdentity Java SDK, using gradle version.."
compile("com.webank:weid-java-sdk:1.5.0") {
compile("com.webank:weid-java-sdk:1.6.4") {
exclude group:"org.slf4j", module: "slf4j-log4j12"
}
}
Expand All @@ -96,21 +130,21 @@ dependencies {
exclude group:"ch.qos.logback"
}
compile fileTree(dir:'libs', include:'*.jar')
compile apache_commons, swagger
compile apache_commons, swagger, json, mysql_driver, spring, other
}
}
if (gradleVer.startsWith("5")) {
if (!gradle.startParameter.isOffline()) {
compileOnly 'org.projectlombok:lombok:1.18.10'
annotationProcessor 'org.projectlombok:lombok:1.18.10'
compileOnly 'org.projectlombok:lombok:1.18.12'
annotationProcessor 'org.projectlombok:lombok:1.18.12'
compile("org.springframework.boot:spring-boot-starter-web"){
exclude group:"ch.qos.logback"
}
compile fileTree(dir:'libs', include:'*.jar')
compile apache_commons, swagger
compile apache_commons, swagger, json, mysql_driver, spring, other
} else {
compileOnly files('dist/lib/lombok-1.18.10.jar')
annotationProcessor files('dist/lib/lombok-1.18.10.jar')
compileOnly files('dist/lib/lombok-1.18.12.jar')
annotationProcessor files('dist/lib/lombok-1.18.12.jar')
compile fileTree(dir: 'dist/lib', include: '*.jar')
}
}
Expand Down Expand Up @@ -160,6 +194,12 @@ clean {
delete("dist")
}

eclipse {
classpath {
downloadSources = false
}
}

checkstyle {
ignoreFailures false
showViolations true
Expand Down
142 changes: 97 additions & 45 deletions claim/JsonSchema2.json
Original file line number Diff line number Diff line change
@@ -1,46 +1,98 @@
{
"properties": {
"weid": {
"type": "string",
"description": "the weid of certificate owner"
},
"name": {
"type": "string",
"description": "the name of certificate owner"
},
"meta": {
"type": "object",
"properties": {
"code": {
"type": "number",
"description": "code"
},
"error": {
"type": "string",
"description": "error"
},
"info": {
"type": "string",
"description": "info"
}
}
},
"data": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "info"
},
"sipTellAddress": {
"type": "string",
"description": "sipTellAddress"
},
"userlevel": {
"type": "integer",
"description": "userlevel"
}
}
}
}
}
"$id": "certs/v1.0",
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "StudentCert",
"type": "object",
"required": [ "did", "fullname", "cert", "issuers"],
"properties": {
"did": {"type": "string"},
"weid": {"type": "string"},
"fullname": {
"type": "object",
"properties": {
"cn": {"type": "string"},
"en": {"type": "string"}
}
},

"cert":{
"type": "object",
"required": ["code", "title", "category", "issueDate"],
"properties": {
"code": {"type": "string"},
"title": {
"type": "object",
"properties": {
"cn": {"type": "string"},
"en": {"type": "string"}
}
},
"category": {
"type": "object",
"properties": {
"cn": {"type": "string"},
"en": {"type": "string"}
}
},
"totalDuration": {
"type": "number"
},
"issueDate": {
"type": "string",
"format": "date-time"
},
"validBefore": {
"type": "string",
"format": "date-time"
},
"permanent": {"type": "boolean"}
}
},

"issuers": {
"type": "array",
"minItems": 1,
"items": {
"type": "object",
"properties": {
"name": {
"type": "object",
"properties": {
"cn": {"type": "string"},
"en": {"type": "string"}
}
}
}
}
},

"courses": {
"type": "array",
"items": {
"type": "object",
"properties": {
"code": {"type": "string"},
"title": {
"type": "object",
"properties": {
"cn": {"type": "string"},
"en": {"type": "string"}
}
},
"startDate": {
"type": "string",
"format": "date"
},
"endDate": {
"type": "string",
"format": "date"
},
"duration": {"type": "number"},
"grade": {"type": "string"},
"score": {"type": "string"},
"language": {"type": "string"}
}
}
}
}
}
Loading

0 comments on commit 292a1e2

Please sign in to comment.