├── PetStore ├── .gradle │ ├── 6.6.1 │ │ ├── executionHistory │ │ │ ├── executionHistory.bin │ │ │ └── executionHistory.lock │ │ ├── fileChanges │ │ │ └── last-build.bin │ │ ├── fileContent │ │ │ └── fileContent.lock │ │ ├── fileHashes │ │ │ ├── fileHashes.bin │ │ │ ├── fileHashes.lock │ │ │ └── resourceHashesCache.bin │ │ ├── gc.properties │ │ └── javaCompile │ │ │ ├── classAnalysis.bin │ │ │ ├── jarAnalysis.bin │ │ │ ├── javaCompile.lock │ │ │ └── taskHistory.bin │ ├── buildOutputCleanup │ │ ├── buildOutputCleanup.lock │ │ ├── cache.properties │ │ └── outputFiles.bin │ ├── checksums │ │ ├── checksums.lock │ │ ├── md5-checksums.bin │ │ └── sha1-checksums.bin │ ├── configuration-cache │ │ └── gc.properties │ └── vcs-1 │ │ └── gc.properties ├── .idea │ ├── .gitignore │ ├── compiler.xml │ ├── gradle.xml │ ├── jarRepositories.xml │ └── misc.xml ├── build.gradle ├── build │ ├── classes │ │ └── java │ │ │ └── main │ │ │ ├── Adoption$1.class │ │ │ ├── Adoption$2.class │ │ │ ├── Adoption$3.class │ │ │ ├── Adoption$4.class │ │ │ ├── Adoption$5.class │ │ │ ├── Adoption$6.class │ │ │ ├── Adoption$7.class │ │ │ ├── Adoption.class │ │ │ └── org │ │ │ └── example │ │ │ └── PetStore │ │ │ ├── Application.class │ │ │ ├── config │ │ │ ├── ContractConfig.class │ │ │ ├── SdkBeanConfig.class │ │ │ ├── SwaggerConfig.class │ │ │ └── SystemConfig.class │ │ │ ├── controller │ │ │ ├── MyAdoptionController.class │ │ │ └── UserController.class │ │ │ ├── model │ │ │ ├── CommonResponse.class │ │ │ └── bo │ │ │ │ ├── AdoptionAdoptInputBO.class │ │ │ │ ├── AdoptionAdoptersInputBO.class │ │ │ │ ├── AdoptionLoginInputBO.class │ │ │ │ └── AdoptionRegisterInputBO.class │ │ │ ├── service │ │ │ ├── AdoptionService.class │ │ │ ├── MyAdoptionService.class │ │ │ ├── ServiceManager.class │ │ │ └── UserService.class │ │ │ └── utils │ │ │ ├── IOUtil.class │ │ │ └── WeBASEUtils.class │ ├── resources │ │ └── main │ │ │ ├── abi │ │ │ └── Adoption.abi │ │ │ ├── application.properties │ │ │ ├── banner.txt │ │ │ ├── bin │ │ │ └── ecc │ │ │ │ └── Adoption.bin │ │ │ └── conf │ │ │ ├── ca.crt │ │ │ ├── sdk.crt │ │ │ └── sdk.key │ └── tmp │ │ └── compileJava │ │ └── source-classes-mapping.txt ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── pet-store-init-front-master │ ├── .gitignore │ ├── README.md │ ├── babel.config.js │ ├── package-lock.json │ ├── package.json │ ├── public │ │ ├── favicon.ico │ │ └── index.html │ ├── src │ │ ├── App.vue │ │ ├── assets │ │ │ ├── logo.png │ │ │ ├── 博美.png │ │ │ ├── 哈士奇.png │ │ │ ├── 拉布拉多.png │ │ │ ├── 柴犬.png │ │ │ ├── 法斗.png │ │ │ ├── 萨摩.png │ │ │ ├── 边牧.png │ │ │ └── 金毛.png │ │ ├── components │ │ │ └── Navigator.vue │ │ ├── config.js │ │ ├── frame │ │ │ └── BaseFrame.vue │ │ ├── main.js │ │ ├── router.js │ │ ├── utils │ │ │ └── axios.js │ │ └── views │ │ │ ├── Adoption.vue │ │ │ ├── Home.vue │ │ │ ├── Login.vue │ │ │ └── Register.vue │ └── vue.config.js ├── pom.xml ├── settings.gradle ├── src │ ├── main │ │ ├── contracts │ │ │ └── Adoption.sol │ │ ├── java │ │ │ └── org │ │ │ │ └── example │ │ │ │ └── PetStore │ │ │ │ ├── Application.java │ │ │ │ ├── config │ │ │ │ ├── ContractConfig.java │ │ │ │ ├── SdkBeanConfig.java │ │ │ │ ├── SwaggerConfig.java │ │ │ │ └── SystemConfig.java │ │ │ │ ├── controller │ │ │ │ ├── MyAdoptionController.java │ │ │ │ └── UserController.java │ │ │ │ ├── model │ │ │ │ ├── CommonResponse.java │ │ │ │ └── bo │ │ │ │ │ ├── AdoptionAdoptInputBO.java │ │ │ │ │ ├── AdoptionAdoptersInputBO.java │ │ │ │ │ ├── AdoptionLoginInputBO.java │ │ │ │ │ └── AdoptionRegisterInputBO.java │ │ │ │ ├── raw │ │ │ │ └── Adoption.java │ │ │ │ ├── service │ │ │ │ ├── AdoptionService.java │ │ │ │ ├── MyAdoptionService.java │ │ │ │ ├── ServiceManager.java │ │ │ │ └── UserService.java │ │ │ │ └── utils │ │ │ │ ├── IOUtil.java │ │ │ │ └── WeBASEUtils.java │ │ └── resources │ │ │ ├── abi │ │ │ └── Adoption.abi │ │ │ ├── application.properties │ │ │ ├── banner.txt │ │ │ ├── bin │ │ │ └── ecc │ │ │ │ └── Adoption.bin │ │ │ └── conf │ │ │ ├── ca.crt │ │ │ ├── sdk.crt │ │ │ └── sdk.key │ └── test │ │ └── java │ │ └── org │ │ └── example │ │ └── PetStore │ │ └── DemoPkey.java └── target │ ├── classes │ ├── abi │ │ └── Adoption.abi │ ├── application.properties │ ├── bin │ │ └── ecc │ │ │ └── Adoption.bin │ ├── conf │ │ ├── ca.crt │ │ ├── sdk.crt │ │ └── sdk.key │ └── org │ │ └── example │ │ └── PetStore │ │ ├── Application.class │ │ ├── config │ │ ├── ContractConfig.class │ │ ├── SdkBeanConfig.class │ │ ├── SwaggerConfig.class │ │ └── SystemConfig.class │ │ ├── controller │ │ ├── MyAdoptionController.class │ │ └── UserController.class │ │ ├── model │ │ ├── CommonResponse.class │ │ └── bo │ │ │ ├── AdoptionAdoptInputBO.class │ │ │ ├── AdoptionAdoptersInputBO.class │ │ │ ├── AdoptionLoginInputBO.class │ │ │ └── AdoptionRegisterInputBO.class │ │ ├── raw │ │ └── Adoption.class │ │ ├── service │ │ ├── AdoptionService.class │ │ ├── MyAdoptionService.class │ │ ├── ServiceManager.class │ │ └── UserService.class │ │ └── utils │ │ ├── IOUtil.class │ │ ├── MyAdoptionController.class │ │ └── WeBASEUtils.class │ └── test-classes │ └── org │ └── example │ └── PetStore │ └── DemoPkey.class └── pet-store-init-front-master ├── .gitignore ├── README.md ├── babel.config.js ├── package-lock.json ├── package.json ├── public ├── favicon.ico └── index.html ├── src ├── App.vue ├── assets │ ├── logo.png │ ├── 博美.png │ ├── 哈士奇.png │ ├── 拉布拉多.png │ ├── 柴犬.png │ ├── 法斗.png │ ├── 萨摩.png │ ├── 边牧.png │ └── 金毛.png ├── components │ └── Navigator.vue ├── config.js ├── frame │ └── BaseFrame.vue ├── main.js ├── router.js ├── utils │ └── axios.js └── views │ ├── Adoption.vue │ ├── Home.vue │ ├── Login.vue │ └── Register.vue └── vue.config.js /PetStore/.gradle/6.6.1/executionHistory/executionHistory.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenguowei10086/QKL-QHD/e8f04decfd8cc51111970405d309adf3ae3745cb/PetStore/.gradle/6.6.1/executionHistory/executionHistory.bin -------------------------------------------------------------------------------- /PetStore/.gradle/6.6.1/executionHistory/executionHistory.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenguowei10086/QKL-QHD/e8f04decfd8cc51111970405d309adf3ae3745cb/PetStore/.gradle/6.6.1/executionHistory/executionHistory.lock -------------------------------------------------------------------------------- /PetStore/.gradle/6.6.1/fileChanges/last-build.bin: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /PetStore/.gradle/6.6.1/fileContent/fileContent.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenguowei10086/QKL-QHD/e8f04decfd8cc51111970405d309adf3ae3745cb/PetStore/.gradle/6.6.1/fileContent/fileContent.lock -------------------------------------------------------------------------------- /PetStore/.gradle/6.6.1/fileHashes/fileHashes.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenguowei10086/QKL-QHD/e8f04decfd8cc51111970405d309adf3ae3745cb/PetStore/.gradle/6.6.1/fileHashes/fileHashes.bin -------------------------------------------------------------------------------- /PetStore/.gradle/6.6.1/fileHashes/fileHashes.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenguowei10086/QKL-QHD/e8f04decfd8cc51111970405d309adf3ae3745cb/PetStore/.gradle/6.6.1/fileHashes/fileHashes.lock -------------------------------------------------------------------------------- /PetStore/.gradle/6.6.1/fileHashes/resourceHashesCache.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenguowei10086/QKL-QHD/e8f04decfd8cc51111970405d309adf3ae3745cb/PetStore/.gradle/6.6.1/fileHashes/resourceHashesCache.bin -------------------------------------------------------------------------------- /PetStore/.gradle/6.6.1/gc.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenguowei10086/QKL-QHD/e8f04decfd8cc51111970405d309adf3ae3745cb/PetStore/.gradle/6.6.1/gc.properties -------------------------------------------------------------------------------- /PetStore/.gradle/6.6.1/javaCompile/classAnalysis.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenguowei10086/QKL-QHD/e8f04decfd8cc51111970405d309adf3ae3745cb/PetStore/.gradle/6.6.1/javaCompile/classAnalysis.bin -------------------------------------------------------------------------------- /PetStore/.gradle/6.6.1/javaCompile/jarAnalysis.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenguowei10086/QKL-QHD/e8f04decfd8cc51111970405d309adf3ae3745cb/PetStore/.gradle/6.6.1/javaCompile/jarAnalysis.bin -------------------------------------------------------------------------------- /PetStore/.gradle/6.6.1/javaCompile/javaCompile.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenguowei10086/QKL-QHD/e8f04decfd8cc51111970405d309adf3ae3745cb/PetStore/.gradle/6.6.1/javaCompile/javaCompile.lock -------------------------------------------------------------------------------- /PetStore/.gradle/6.6.1/javaCompile/taskHistory.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenguowei10086/QKL-QHD/e8f04decfd8cc51111970405d309adf3ae3745cb/PetStore/.gradle/6.6.1/javaCompile/taskHistory.bin -------------------------------------------------------------------------------- /PetStore/.gradle/buildOutputCleanup/buildOutputCleanup.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenguowei10086/QKL-QHD/e8f04decfd8cc51111970405d309adf3ae3745cb/PetStore/.gradle/buildOutputCleanup/buildOutputCleanup.lock -------------------------------------------------------------------------------- /PetStore/.gradle/buildOutputCleanup/cache.properties: -------------------------------------------------------------------------------- 1 | #Mon Mar 07 21:53:40 PST 2022 2 | gradle.version=6.6.1 3 | -------------------------------------------------------------------------------- /PetStore/.gradle/buildOutputCleanup/outputFiles.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenguowei10086/QKL-QHD/e8f04decfd8cc51111970405d309adf3ae3745cb/PetStore/.gradle/buildOutputCleanup/outputFiles.bin -------------------------------------------------------------------------------- /PetStore/.gradle/checksums/checksums.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenguowei10086/QKL-QHD/e8f04decfd8cc51111970405d309adf3ae3745cb/PetStore/.gradle/checksums/checksums.lock -------------------------------------------------------------------------------- /PetStore/.gradle/checksums/md5-checksums.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenguowei10086/QKL-QHD/e8f04decfd8cc51111970405d309adf3ae3745cb/PetStore/.gradle/checksums/md5-checksums.bin -------------------------------------------------------------------------------- /PetStore/.gradle/checksums/sha1-checksums.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenguowei10086/QKL-QHD/e8f04decfd8cc51111970405d309adf3ae3745cb/PetStore/.gradle/checksums/sha1-checksums.bin -------------------------------------------------------------------------------- /PetStore/.gradle/configuration-cache/gc.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenguowei10086/QKL-QHD/e8f04decfd8cc51111970405d309adf3ae3745cb/PetStore/.gradle/configuration-cache/gc.properties -------------------------------------------------------------------------------- /PetStore/.gradle/vcs-1/gc.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenguowei10086/QKL-QHD/e8f04decfd8cc51111970405d309adf3ae3745cb/PetStore/.gradle/vcs-1/gc.properties -------------------------------------------------------------------------------- /PetStore/.idea/.gitignore: -------------------------------------------------------------------------------- 1 | # 默认忽略的文件 2 | /shelf/ 3 | /workspace.xml 4 | -------------------------------------------------------------------------------- /PetStore/.idea/compiler.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /PetStore/.idea/gradle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 16 | 17 | -------------------------------------------------------------------------------- /PetStore/.idea/jarRepositories.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 9 | 10 | 14 | 15 | 19 | 20 | 24 | 25 | 29 | 30 | 34 | 35 | 39 | 40 | 44 | 45 | 49 | 50 | 54 | 55 | 59 | 60 | 64 | 65 | -------------------------------------------------------------------------------- /PetStore/.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /PetStore/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | repositories { 3 | mavenCentral() 4 | maven { url "http://maven.aliyun.com/nexus/content/groups/public/"} 5 | maven { url "https://oss.sonatype.org/content/repositories/snapshots" } 6 | mavenLocal() 7 | 8 | } 9 | dependencies { 10 | classpath("org.springframework.boot:spring-boot-gradle-plugin:2.1.1.RELEASE") 11 | } 12 | } 13 | plugins { 14 | id 'org.springframework.boot' version '2.1.1.RELEASE' 15 | } 16 | apply plugin: 'java' 17 | apply plugin: 'eclipse' 18 | apply plugin: 'idea' 19 | apply plugin: 'maven' 20 | apply plugin: 'org.springframework.boot' 21 | apply plugin: 'io.spring.dependency-management' 22 | 23 | sourceCompatibility = 1.8 24 | targetCompatibility = 1.8 25 | group = 'org.example' 26 | version = '1.0.0-SNAPSHOT' 27 | 28 | repositories { 29 | mavenLocal() 30 | mavenCentral() 31 | maven { url "http://maven.aliyun.com/nexus/content/groups/public/"} 32 | maven { url "https://oss.sonatype.org/content/repositories/snapshots" } 33 | maven { url "https://dl.bintray.com/ethereum/maven/" } 34 | maven { url "https://oss.sonatype.org/service/local/staging/deploy/maven2"} 35 | } 36 | 37 | configurations { 38 | compileOnly { 39 | extendsFrom annotationProcessor 40 | } 41 | all { 42 | } 43 | } 44 | 45 | dependencies { 46 | 47 | implementation 'org.springframework.boot:spring-boot-starter-web' 48 | implementation 'org.slf4j:slf4j-api:1.7.5' 49 | compileOnly 'org.projectlombok:lombok' 50 | annotationProcessor 'org.projectlombok:lombok' 51 | testImplementation('org.springframework.boot:spring-boot-starter-test') { 52 | exclude group: 'org.junit.vintage', module: 'junit-vintage-engine' 53 | } 54 | compile ('org.fisco-bcos.java-sdk:fisco-bcos-java-sdk:2.7.2') { 55 | exclude group: 'org.slf4j' 56 | } 57 | implementation 'io.springfox:springfox-swagger2:2.6.1' 58 | implementation 'io.springfox:springfox-swagger-ui:2.6.1' 59 | implementation 'cn.hutool:hutool-all:5.7.9' 60 | } 61 | 62 | 63 | sourceSets { 64 | main { 65 | java { 66 | srcDir 'src/main/java' 67 | } 68 | resources { 69 | srcDir 'src/main/resources' 70 | } 71 | } 72 | } 73 | test { 74 | useJUnitPlatform() 75 | } 76 | bootJar { 77 | destinationDir file('dist') 78 | archiveName project.name + '-exec.jar' 79 | doLast { 80 | copy { 81 | from file('src/main/resources') 82 | into 'dist' 83 | } 84 | } 85 | } 86 | 87 | clean { 88 | println "delete ${projectDir}/dist" 89 | delete "${projectDir}/dist" 90 | } 91 | -------------------------------------------------------------------------------- /PetStore/build/classes/java/main/Adoption$1.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenguowei10086/QKL-QHD/e8f04decfd8cc51111970405d309adf3ae3745cb/PetStore/build/classes/java/main/Adoption$1.class -------------------------------------------------------------------------------- /PetStore/build/classes/java/main/Adoption$2.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenguowei10086/QKL-QHD/e8f04decfd8cc51111970405d309adf3ae3745cb/PetStore/build/classes/java/main/Adoption$2.class -------------------------------------------------------------------------------- /PetStore/build/classes/java/main/Adoption$3.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenguowei10086/QKL-QHD/e8f04decfd8cc51111970405d309adf3ae3745cb/PetStore/build/classes/java/main/Adoption$3.class -------------------------------------------------------------------------------- /PetStore/build/classes/java/main/Adoption$4.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenguowei10086/QKL-QHD/e8f04decfd8cc51111970405d309adf3ae3745cb/PetStore/build/classes/java/main/Adoption$4.class -------------------------------------------------------------------------------- /PetStore/build/classes/java/main/Adoption$5.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenguowei10086/QKL-QHD/e8f04decfd8cc51111970405d309adf3ae3745cb/PetStore/build/classes/java/main/Adoption$5.class -------------------------------------------------------------------------------- /PetStore/build/classes/java/main/Adoption$6.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenguowei10086/QKL-QHD/e8f04decfd8cc51111970405d309adf3ae3745cb/PetStore/build/classes/java/main/Adoption$6.class -------------------------------------------------------------------------------- /PetStore/build/classes/java/main/Adoption$7.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenguowei10086/QKL-QHD/e8f04decfd8cc51111970405d309adf3ae3745cb/PetStore/build/classes/java/main/Adoption$7.class -------------------------------------------------------------------------------- /PetStore/build/classes/java/main/Adoption.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenguowei10086/QKL-QHD/e8f04decfd8cc51111970405d309adf3ae3745cb/PetStore/build/classes/java/main/Adoption.class -------------------------------------------------------------------------------- /PetStore/build/classes/java/main/org/example/PetStore/Application.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenguowei10086/QKL-QHD/e8f04decfd8cc51111970405d309adf3ae3745cb/PetStore/build/classes/java/main/org/example/PetStore/Application.class -------------------------------------------------------------------------------- /PetStore/build/classes/java/main/org/example/PetStore/config/ContractConfig.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenguowei10086/QKL-QHD/e8f04decfd8cc51111970405d309adf3ae3745cb/PetStore/build/classes/java/main/org/example/PetStore/config/ContractConfig.class -------------------------------------------------------------------------------- /PetStore/build/classes/java/main/org/example/PetStore/config/SdkBeanConfig.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenguowei10086/QKL-QHD/e8f04decfd8cc51111970405d309adf3ae3745cb/PetStore/build/classes/java/main/org/example/PetStore/config/SdkBeanConfig.class -------------------------------------------------------------------------------- /PetStore/build/classes/java/main/org/example/PetStore/config/SwaggerConfig.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenguowei10086/QKL-QHD/e8f04decfd8cc51111970405d309adf3ae3745cb/PetStore/build/classes/java/main/org/example/PetStore/config/SwaggerConfig.class -------------------------------------------------------------------------------- /PetStore/build/classes/java/main/org/example/PetStore/config/SystemConfig.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenguowei10086/QKL-QHD/e8f04decfd8cc51111970405d309adf3ae3745cb/PetStore/build/classes/java/main/org/example/PetStore/config/SystemConfig.class -------------------------------------------------------------------------------- /PetStore/build/classes/java/main/org/example/PetStore/controller/MyAdoptionController.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenguowei10086/QKL-QHD/e8f04decfd8cc51111970405d309adf3ae3745cb/PetStore/build/classes/java/main/org/example/PetStore/controller/MyAdoptionController.class -------------------------------------------------------------------------------- /PetStore/build/classes/java/main/org/example/PetStore/controller/UserController.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenguowei10086/QKL-QHD/e8f04decfd8cc51111970405d309adf3ae3745cb/PetStore/build/classes/java/main/org/example/PetStore/controller/UserController.class -------------------------------------------------------------------------------- /PetStore/build/classes/java/main/org/example/PetStore/model/CommonResponse.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenguowei10086/QKL-QHD/e8f04decfd8cc51111970405d309adf3ae3745cb/PetStore/build/classes/java/main/org/example/PetStore/model/CommonResponse.class -------------------------------------------------------------------------------- /PetStore/build/classes/java/main/org/example/PetStore/model/bo/AdoptionAdoptInputBO.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenguowei10086/QKL-QHD/e8f04decfd8cc51111970405d309adf3ae3745cb/PetStore/build/classes/java/main/org/example/PetStore/model/bo/AdoptionAdoptInputBO.class -------------------------------------------------------------------------------- /PetStore/build/classes/java/main/org/example/PetStore/model/bo/AdoptionAdoptersInputBO.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenguowei10086/QKL-QHD/e8f04decfd8cc51111970405d309adf3ae3745cb/PetStore/build/classes/java/main/org/example/PetStore/model/bo/AdoptionAdoptersInputBO.class -------------------------------------------------------------------------------- /PetStore/build/classes/java/main/org/example/PetStore/model/bo/AdoptionLoginInputBO.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenguowei10086/QKL-QHD/e8f04decfd8cc51111970405d309adf3ae3745cb/PetStore/build/classes/java/main/org/example/PetStore/model/bo/AdoptionLoginInputBO.class -------------------------------------------------------------------------------- /PetStore/build/classes/java/main/org/example/PetStore/model/bo/AdoptionRegisterInputBO.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenguowei10086/QKL-QHD/e8f04decfd8cc51111970405d309adf3ae3745cb/PetStore/build/classes/java/main/org/example/PetStore/model/bo/AdoptionRegisterInputBO.class -------------------------------------------------------------------------------- /PetStore/build/classes/java/main/org/example/PetStore/service/AdoptionService.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenguowei10086/QKL-QHD/e8f04decfd8cc51111970405d309adf3ae3745cb/PetStore/build/classes/java/main/org/example/PetStore/service/AdoptionService.class -------------------------------------------------------------------------------- /PetStore/build/classes/java/main/org/example/PetStore/service/MyAdoptionService.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenguowei10086/QKL-QHD/e8f04decfd8cc51111970405d309adf3ae3745cb/PetStore/build/classes/java/main/org/example/PetStore/service/MyAdoptionService.class -------------------------------------------------------------------------------- /PetStore/build/classes/java/main/org/example/PetStore/service/ServiceManager.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenguowei10086/QKL-QHD/e8f04decfd8cc51111970405d309adf3ae3745cb/PetStore/build/classes/java/main/org/example/PetStore/service/ServiceManager.class -------------------------------------------------------------------------------- /PetStore/build/classes/java/main/org/example/PetStore/service/UserService.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenguowei10086/QKL-QHD/e8f04decfd8cc51111970405d309adf3ae3745cb/PetStore/build/classes/java/main/org/example/PetStore/service/UserService.class -------------------------------------------------------------------------------- /PetStore/build/classes/java/main/org/example/PetStore/utils/IOUtil.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenguowei10086/QKL-QHD/e8f04decfd8cc51111970405d309adf3ae3745cb/PetStore/build/classes/java/main/org/example/PetStore/utils/IOUtil.class -------------------------------------------------------------------------------- /PetStore/build/classes/java/main/org/example/PetStore/utils/WeBASEUtils.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenguowei10086/QKL-QHD/e8f04decfd8cc51111970405d309adf3ae3745cb/PetStore/build/classes/java/main/org/example/PetStore/utils/WeBASEUtils.class -------------------------------------------------------------------------------- /PetStore/build/resources/main/abi/Adoption.abi: -------------------------------------------------------------------------------- 1 | [{"constant":true,"inputs":[{"name":"user","type":"address"}],"name":"login","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getAdopters","outputs":[{"name":"","type":"address[8]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"adopters","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"user","type":"address"}],"name":"register","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"petId","type":"uint256"}],"name":"adopt","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"}] -------------------------------------------------------------------------------- /PetStore/build/resources/main/application.properties: -------------------------------------------------------------------------------- 1 | ### Required, node's {ip:port} to connect. 2 | system.peers=192.168.56.128:20200 3 | ### Required 4 | system.groupId=1 5 | ### Optional. Default will search conf,config,src/main/conf/src/main/config 6 | system.certPath=conf,config,src/main/resources/conf,src/main/resources/config 7 | ### Optional. If don't specify a random private key will be used 8 | system.hexPrivateKey=2d495d03e4643fee042e691a355a88e33268519a8e04624c0875cced6b79f8a9 9 | ### Optional. Please fill this address if you want to use related service 10 | system.contract.adoptionAddress=0xf4e6f73334965efe27f79918b00f9e0f9e7958ed 11 | ### ### Springboot server config 12 | server.port=8080 13 | server.session.timeout=60 14 | banner.charset=UTF-8 15 | spring.jackson.date-format=yyyy-MM-dd HH:mm:ss 16 | spring.jackson.time-zone=GMT+8 17 | -------------------------------------------------------------------------------- /PetStore/build/resources/main/banner.txt: -------------------------------------------------------------------------------- 1 | vdghccgh -------------------------------------------------------------------------------- /PetStore/build/resources/main/bin/ecc/Adoption.bin: -------------------------------------------------------------------------------- 1 | 608060405234801561001057600080fd5b5060008060006101000a81548160ff021916908360ff1602179055506105c28061003b6000396000f30060806040526004361061006d576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806335a6861a146100725780633de4eb17146100cf57806343ae80d3146101225780634420e4861461018f5780638588b2c5146101ec575b600080fd5b34801561007e57600080fd5b506100b3600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061022d565b604051808260ff1660ff16815260200191505060405180910390f35b3480156100db57600080fd5b506100e4610283565b6040518082600860200280838360005b8381101561010f5780820151818401526020810190506100f4565b5050505090500191505060405180910390f35b34801561012e57600080fd5b5061014d60048036038101908080359060200190929190505050610304565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561019b57600080fd5b506101d0600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610339565b604051808260ff1660ff16815260200191505060405180910390f35b3480156101f857600080fd5b5061021760048036038101908080359060200190929190505050610494565b6040518082815260200191505060405180910390f35b6000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050919050565b61028b610572565b60026008806020026040519081016040528092919082600880156102fa576020028201915b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190600101908083116102b0575b5050505050905090565b60028160088110151561031357fe5b016000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1660ff1611156103e657600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905061048f565b60008081819054906101000a900460ff168092919060010191906101000a81548160ff021916908360ff160217905550506000809054906101000a900460ff16600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908360ff1602179055506000809054906101000a900460ff1690505b919050565b600080600083101580156104a9575060078311155b15156104b457600080fd5b61019490506000600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1660ff1614156105195780915061056c565b3360028460088110151561052957fe5b0160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508291505b50919050565b610100604051908101604052806008906020820280388339808201915050905050905600a165627a7a723058206533a0a379ddbd3575b612c9c9551165226222b8800f7a2ca0ba93db0353d91f0029 -------------------------------------------------------------------------------- /PetStore/build/resources/main/conf/ca.crt: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIBvzCCAWSgAwIBAgIUdj53y2g118ogV8sCKMQKWZMNqUcwCgYIKoZIzj0EAwIw 3 | NTEOMAwGA1UEAwwFY2hhaW4xEzARBgNVBAoMCmZpc2NvLWJjb3MxDjAMBgNVBAsM 4 | BWNoYWluMCAXDTIyMDMwNjA1NDgzMVoYDzIxMjIwMjEwMDU0ODMxWjA1MQ4wDAYD 5 | VQQDDAVjaGFpbjETMBEGA1UECgwKZmlzY28tYmNvczEOMAwGA1UECwwFY2hhaW4w 6 | VjAQBgcqhkjOPQIBBgUrgQQACgNCAARC2z0RyRR645SDMMWDBl3dD3jU1ni2ehds 7 | DZue0Yus+iUL8f/SwdvfT4AKNcJuH1Bgpzli8wj02jBfwWwPSqn8o1MwUTAdBgNV 8 | HQ4EFgQUhE6cWOox460xHdhzC+RQvBUql+owHwYDVR0jBBgwFoAUhE6cWOox460x 9 | HdhzC+RQvBUql+owDwYDVR0TAQH/BAUwAwEB/zAKBggqhkjOPQQDAgNJADBGAiEA 10 | qp3vs8O6uaNmZ7KIHsR692mQXaehX0ARV/wZuwgGN1UCIQCSLho16lX0w4yhp/dt 11 | fn8hfrvsqUpyAc3YRY0KVJsFkA== 12 | -----END CERTIFICATE----- 13 | -------------------------------------------------------------------------------- /PetStore/build/resources/main/conf/sdk.crt: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIBhDCCASmgAwIBAgIUSXb1aIvELDPR7xfD/SBvWGX9WHQwCgYIKoZIzj0EAwIw 3 | NzEPMA0GA1UEAwwGYWdlbmN5MRMwEQYDVQQKDApmaXNjby1iY29zMQ8wDQYDVQQL 4 | DAZhZ2VuY3kwIBcNMjIwMzA2MDU0ODMyWhgPMjEyMjAyMTAwNTQ4MzJaMDExDDAK 5 | BgNVBAMMA3NkazETMBEGA1UECgwKZmlzY28tYmNvczEMMAoGA1UECwwDc2RrMFYw 6 | EAYHKoZIzj0CAQYFK4EEAAoDQgAESYh5pnfQTm/V4Zev0p909TLPxal0n5AyzM8V 7 | zKH9YDMlNcNHunWfcqr0no0Qcd1MIjFGKQN6pRTcIckesE6DsKMaMBgwCQYDVR0T 8 | BAIwADALBgNVHQ8EBAMCBeAwCgYIKoZIzj0EAwIDSQAwRgIhANsTe+ChBXTsSPtk 9 | GEbX4c02ppe03JQpQlDQr8VwMdlzAiEApcNdGRtuVUuLf4JoQyu1rfbGUBWS8T6b 10 | o07DiiF37ZE= 11 | -----END CERTIFICATE----- 12 | -----BEGIN CERTIFICATE----- 13 | MIIBezCCASGgAwIBAgIUQnL50GMHwkKtdkmBLbIa7NUYtMcwCgYIKoZIzj0EAwIw 14 | NTEOMAwGA1UEAwwFY2hhaW4xEzARBgNVBAoMCmZpc2NvLWJjb3MxDjAMBgNVBAsM 15 | BWNoYWluMB4XDTIyMDMwNjA1NDgzMVoXDTMyMDMwMzA1NDgzMVowNzEPMA0GA1UE 16 | AwwGYWdlbmN5MRMwEQYDVQQKDApmaXNjby1iY29zMQ8wDQYDVQQLDAZhZ2VuY3kw 17 | VjAQBgcqhkjOPQIBBgUrgQQACgNCAASGzxUtd+KhCiUGFule9jrjURD66vjw7TUe 18 | VFvsgVbeufGjiY7UBgLWOUY1aIm+wPa+vSnriqEEowODT6Ih3I9zoxAwDjAMBgNV 19 | HRMEBTADAQH/MAoGCCqGSM49BAMCA0gAMEUCIDVaZ2f9yiBadVyqKX0lUJ+tca/Z 20 | putRJ9n30BByly+wAiEAkQrZUWfOgblWFPixH6PHn7hwy1mLcUzibdws267uJOk= 21 | -----END CERTIFICATE----- 22 | -----BEGIN CERTIFICATE----- 23 | MIIBvzCCAWSgAwIBAgIUdj53y2g118ogV8sCKMQKWZMNqUcwCgYIKoZIzj0EAwIw 24 | NTEOMAwGA1UEAwwFY2hhaW4xEzARBgNVBAoMCmZpc2NvLWJjb3MxDjAMBgNVBAsM 25 | BWNoYWluMCAXDTIyMDMwNjA1NDgzMVoYDzIxMjIwMjEwMDU0ODMxWjA1MQ4wDAYD 26 | VQQDDAVjaGFpbjETMBEGA1UECgwKZmlzY28tYmNvczEOMAwGA1UECwwFY2hhaW4w 27 | VjAQBgcqhkjOPQIBBgUrgQQACgNCAARC2z0RyRR645SDMMWDBl3dD3jU1ni2ehds 28 | DZue0Yus+iUL8f/SwdvfT4AKNcJuH1Bgpzli8wj02jBfwWwPSqn8o1MwUTAdBgNV 29 | HQ4EFgQUhE6cWOox460xHdhzC+RQvBUql+owHwYDVR0jBBgwFoAUhE6cWOox460x 30 | HdhzC+RQvBUql+owDwYDVR0TAQH/BAUwAwEB/zAKBggqhkjOPQQDAgNJADBGAiEA 31 | qp3vs8O6uaNmZ7KIHsR692mQXaehX0ARV/wZuwgGN1UCIQCSLho16lX0w4yhp/dt 32 | fn8hfrvsqUpyAc3YRY0KVJsFkA== 33 | -----END CERTIFICATE----- 34 | -------------------------------------------------------------------------------- /PetStore/build/resources/main/conf/sdk.key: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIGEAgEAMBAGByqGSM49AgEGBSuBBAAKBG0wawIBAQQgPIKzFUFbgSBob9DNYajQ 3 | 178mbbML/kl5uRiX3uqPSzahRANCAARJiHmmd9BOb9Xhl6/Sn3T1Ms/FqXSfkDLM 4 | zxXMof1gMyU1w0e6dZ9yqvSejRBx3UwiMUYpA3qlFNwhyR6wToOw 5 | -----END PRIVATE KEY----- 6 | -------------------------------------------------------------------------------- /PetStore/build/tmp/compileJava/source-classes-mapping.txt: -------------------------------------------------------------------------------- 1 | org/example/PetStore/model/bo/AdoptionAdoptersInputBO.java 2 | org.example.PetStore.model.bo.AdoptionAdoptersInputBO 3 | org/example/PetStore/config/SdkBeanConfig.java 4 | org.example.PetStore.config.SdkBeanConfig 5 | org/example/PetStore/model/bo/AdoptionLoginInputBO.java 6 | org.example.PetStore.model.bo.AdoptionLoginInputBO 7 | org/example/PetStore/utils/IOUtil.java 8 | org.example.PetStore.utils.IOUtil 9 | org/example/PetStore/service/AdoptionService.java 10 | org.example.PetStore.service.AdoptionService 11 | org/example/PetStore/controller/UserController.java 12 | org.example.PetStore.controller.UserController 13 | org/example/PetStore/controller/MyAdoptionController.java 14 | org.example.PetStore.controller.MyAdoptionController 15 | org/example/PetStore/model/bo/AdoptionAdoptInputBO.java 16 | org.example.PetStore.model.bo.AdoptionAdoptInputBO 17 | org/example/PetStore/model/CommonResponse.java 18 | org.example.PetStore.model.CommonResponse 19 | org/example/PetStore/model/bo/AdoptionRegisterInputBO.java 20 | org.example.PetStore.model.bo.AdoptionRegisterInputBO 21 | org/example/PetStore/raw/Adoption.java 22 | Adoption 23 | Adoption$1 24 | Adoption$2 25 | Adoption$3 26 | Adoption$4 27 | Adoption$5 28 | Adoption$6 29 | Adoption$7 30 | org/example/PetStore/config/SwaggerConfig.java 31 | org.example.PetStore.config.SwaggerConfig 32 | org/example/PetStore/config/ContractConfig.java 33 | org.example.PetStore.config.ContractConfig 34 | org/example/PetStore/utils/WeBASEUtils.java 35 | org.example.PetStore.utils.WeBASEUtils 36 | org/example/PetStore/Application.java 37 | org.example.PetStore.Application 38 | org/example/PetStore/service/MyAdoptionService.java 39 | org.example.PetStore.service.MyAdoptionService 40 | org/example/PetStore/service/UserService.java 41 | org.example.PetStore.service.UserService 42 | org/example/PetStore/service/ServiceManager.java 43 | org.example.PetStore.service.ServiceManager 44 | org/example/PetStore/config/SystemConfig.java 45 | org.example.PetStore.config.SystemConfig 46 | -------------------------------------------------------------------------------- /PetStore/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenguowei10086/QKL-QHD/e8f04decfd8cc51111970405d309adf3ae3745cb/PetStore/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /PetStore/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.6.1-bin.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | -------------------------------------------------------------------------------- /PetStore/gradlew: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | 3 | # 4 | # Copyright 2015 the original author or authors. 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); 7 | # you may not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at 9 | # 10 | # https://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | # 18 | 19 | ############################################################################## 20 | ## 21 | ## Gradle start up script for UN*X 22 | ## 23 | ############################################################################## 24 | 25 | # Attempt to set APP_HOME 26 | # Resolve links: $0 may be a link 27 | PRG="$0" 28 | # Need this for relative symlinks. 29 | while [ -h "$PRG" ] ; do 30 | ls=`ls -ld "$PRG"` 31 | link=`expr "$ls" : '.*-> \(.*\)$'` 32 | if expr "$link" : '/.*' > /dev/null; then 33 | PRG="$link" 34 | else 35 | PRG=`dirname "$PRG"`"/$link" 36 | fi 37 | done 38 | SAVED="`pwd`" 39 | cd "`dirname \"$PRG\"`/" >/dev/null 40 | APP_HOME="`pwd -P`" 41 | cd "$SAVED" >/dev/null 42 | 43 | APP_NAME="Gradle" 44 | APP_BASE_NAME=`basename "$0"` 45 | 46 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 47 | DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' 48 | 49 | # Use the maximum available, or set MAX_FD != -1 to use that value. 50 | MAX_FD="maximum" 51 | 52 | warn () { 53 | echo "$*" 54 | } 55 | 56 | die () { 57 | echo 58 | echo "$*" 59 | echo 60 | exit 1 61 | } 62 | 63 | # OS specific support (must be 'true' or 'false'). 64 | cygwin=false 65 | msys=false 66 | darwin=false 67 | nonstop=false 68 | case "`uname`" in 69 | CYGWIN* ) 70 | cygwin=true 71 | ;; 72 | Darwin* ) 73 | darwin=true 74 | ;; 75 | MINGW* ) 76 | msys=true 77 | ;; 78 | NONSTOP* ) 79 | nonstop=true 80 | ;; 81 | esac 82 | 83 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar 84 | 85 | 86 | # Determine the Java command to use to start the JVM. 87 | if [ -n "$JAVA_HOME" ] ; then 88 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 89 | # IBM's JDK on AIX uses strange locations for the executables 90 | JAVACMD="$JAVA_HOME/jre/sh/java" 91 | else 92 | JAVACMD="$JAVA_HOME/bin/java" 93 | fi 94 | if [ ! -x "$JAVACMD" ] ; then 95 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME 96 | 97 | Please set the JAVA_HOME variable in your environment to match the 98 | location of your Java installation." 99 | fi 100 | else 101 | JAVACMD="java" 102 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 103 | 104 | Please set the JAVA_HOME variable in your environment to match the 105 | location of your Java installation." 106 | fi 107 | 108 | # Increase the maximum file descriptors if we can. 109 | if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then 110 | MAX_FD_LIMIT=`ulimit -H -n` 111 | if [ $? -eq 0 ] ; then 112 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then 113 | MAX_FD="$MAX_FD_LIMIT" 114 | fi 115 | ulimit -n $MAX_FD 116 | if [ $? -ne 0 ] ; then 117 | warn "Could not set maximum file descriptor limit: $MAX_FD" 118 | fi 119 | else 120 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" 121 | fi 122 | fi 123 | 124 | # For Darwin, add options to specify how the application appears in the dock 125 | if $darwin; then 126 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" 127 | fi 128 | 129 | # For Cygwin or MSYS, switch paths to Windows format before running java 130 | if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then 131 | APP_HOME=`cygpath --path --mixed "$APP_HOME"` 132 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` 133 | 134 | JAVACMD=`cygpath --unix "$JAVACMD"` 135 | 136 | # We build the pattern for arguments to be converted via cygpath 137 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` 138 | SEP="" 139 | for dir in $ROOTDIRSRAW ; do 140 | ROOTDIRS="$ROOTDIRS$SEP$dir" 141 | SEP="|" 142 | done 143 | OURCYGPATTERN="(^($ROOTDIRS))" 144 | # Add a user-defined pattern to the cygpath arguments 145 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then 146 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" 147 | fi 148 | # Now convert the arguments - kludge to limit ourselves to /bin/sh 149 | i=0 150 | for arg in "$@" ; do 151 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` 152 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option 153 | 154 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition 155 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` 156 | else 157 | eval `echo args$i`="\"$arg\"" 158 | fi 159 | i=`expr $i + 1` 160 | done 161 | case $i in 162 | 0) set -- ;; 163 | 1) set -- "$args0" ;; 164 | 2) set -- "$args0" "$args1" ;; 165 | 3) set -- "$args0" "$args1" "$args2" ;; 166 | 4) set -- "$args0" "$args1" "$args2" "$args3" ;; 167 | 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; 168 | 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; 169 | 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; 170 | 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; 171 | 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; 172 | esac 173 | fi 174 | 175 | # Escape application args 176 | save () { 177 | for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done 178 | echo " " 179 | } 180 | APP_ARGS=`save "$@"` 181 | 182 | # Collect all arguments for the java command, following the shell quoting and substitution rules 183 | eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" 184 | 185 | exec "$JAVACMD" "$@" 186 | -------------------------------------------------------------------------------- /PetStore/gradlew.bat: -------------------------------------------------------------------------------- 1 | @rem 2 | @rem Copyright 2015 the original author or authors. 3 | @rem 4 | @rem Licensed under the Apache License, Version 2.0 (the "License"); 5 | @rem you may not use this file except in compliance with the License. 6 | @rem You may obtain a copy of the License at 7 | @rem 8 | @rem https://www.apache.org/licenses/LICENSE-2.0 9 | @rem 10 | @rem Unless required by applicable law or agreed to in writing, software 11 | @rem distributed under the License is distributed on an "AS IS" BASIS, 12 | @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | @rem See the License for the specific language governing permissions and 14 | @rem limitations under the License. 15 | @rem 16 | 17 | @if "%DEBUG%" == "" @echo off 18 | @rem ########################################################################## 19 | @rem 20 | @rem Gradle startup script for Windows 21 | @rem 22 | @rem ########################################################################## 23 | 24 | @rem Set local scope for the variables with windows NT shell 25 | if "%OS%"=="Windows_NT" setlocal 26 | 27 | set DIRNAME=%~dp0 28 | if "%DIRNAME%" == "" set DIRNAME=. 29 | set APP_BASE_NAME=%~n0 30 | set APP_HOME=%DIRNAME% 31 | 32 | @rem Resolve any "." and ".." in APP_HOME to make it shorter. 33 | for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi 34 | 35 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 36 | set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" 37 | 38 | @rem Find java.exe 39 | if defined JAVA_HOME goto findJavaFromJavaHome 40 | 41 | set JAVA_EXE=java.exe 42 | %JAVA_EXE% -version >NUL 2>&1 43 | if "%ERRORLEVEL%" == "0" goto execute 44 | 45 | echo. 46 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 47 | echo. 48 | echo Please set the JAVA_HOME variable in your environment to match the 49 | echo location of your Java installation. 50 | 51 | goto fail 52 | 53 | :findJavaFromJavaHome 54 | set JAVA_HOME=%JAVA_HOME:"=% 55 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 56 | 57 | if exist "%JAVA_EXE%" goto execute 58 | 59 | echo. 60 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 61 | echo. 62 | echo Please set the JAVA_HOME variable in your environment to match the 63 | echo location of your Java installation. 64 | 65 | goto fail 66 | 67 | :execute 68 | @rem Setup the command line 69 | 70 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 71 | 72 | 73 | @rem Execute Gradle 74 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* 75 | 76 | :end 77 | @rem End local scope for the variables with windows NT shell 78 | if "%ERRORLEVEL%"=="0" goto mainEnd 79 | 80 | :fail 81 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 82 | rem the _cmd.exe /c_ return code! 83 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 84 | exit /b 1 85 | 86 | :mainEnd 87 | if "%OS%"=="Windows_NT" endlocal 88 | 89 | :omega 90 | -------------------------------------------------------------------------------- /PetStore/pet-store-init-front-master/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | /dist 4 | 5 | 6 | # local env files 7 | .env.local 8 | .env.*.local 9 | 10 | # Log files 11 | npm-debug.log* 12 | yarn-debug.log* 13 | yarn-error.log* 14 | pnpm-debug.log* 15 | 16 | # Editor directories and files 17 | .idea 18 | .vscode 19 | *.suo 20 | *.ntvs* 21 | *.njsproj 22 | *.sln 23 | *.sw? 24 | *.zip 25 | -------------------------------------------------------------------------------- /PetStore/pet-store-init-front-master/README.md: -------------------------------------------------------------------------------- 1 | # pet-store-init 2 | 3 | ## Project setup 4 | ``` 5 | npm install 6 | ``` 7 | 8 | ### Compiles and hot-reloads for development 9 | ``` 10 | npm run serve 11 | ``` 12 | 13 | ### Compiles and minifies for production 14 | ``` 15 | npm run build 16 | ``` 17 | 18 | ### Lints and fixes files 19 | ``` 20 | npm run lint 21 | ``` 22 | 23 | ### Customize configuration 24 | See [Configuration Reference](https://cli.vuejs.org/config/). 25 | -------------------------------------------------------------------------------- /PetStore/pet-store-init-front-master/babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: [ 3 | '@vue/cli-plugin-babel/preset' 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /PetStore/pet-store-init-front-master/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "operator-front", 3 | "version": "0.1.0", 4 | "private": true, 5 | "scripts": { 6 | "serve": "vue-cli-service serve", 7 | "build": "vue-cli-service build", 8 | "lint": "vue-cli-service lint" 9 | }, 10 | "dependencies": { 11 | "axios": "^0.21.1", 12 | "core-js": "^3.6.5", 13 | "element-ui": "^2.15.1", 14 | "vue": "^2.6.11", 15 | "vue-axios": "^3.2.4", 16 | "vue-cookies": "^1.7.4", 17 | "vue-json-views": "^1.3.0", 18 | "vue-router": "^3.5.1" 19 | }, 20 | "devDependencies": { 21 | "@vue/cli-plugin-babel": "~4.5.0", 22 | "@vue/cli-plugin-eslint": "~4.5.0", 23 | "@vue/cli-service": "~4.5.0", 24 | "babel-eslint": "^10.1.0", 25 | "eslint": "^6.7.2", 26 | "eslint-plugin-vue": "^6.2.2", 27 | "vue-template-compiler": "^2.6.11" 28 | }, 29 | "eslintConfig": { 30 | "root": true, 31 | "env": { 32 | "node": true 33 | }, 34 | "extends": [ 35 | "plugin:vue/essential", 36 | "eslint:recommended" 37 | ], 38 | "parserOptions": { 39 | "parser": "babel-eslint" 40 | }, 41 | "rules": {} 42 | }, 43 | "browserslist": [ 44 | "> 1%", 45 | "last 2 versions", 46 | "not dead" 47 | ] 48 | } 49 | -------------------------------------------------------------------------------- /PetStore/pet-store-init-front-master/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenguowei10086/QKL-QHD/e8f04decfd8cc51111970405d309adf3ae3745cb/PetStore/pet-store-init-front-master/public/favicon.ico -------------------------------------------------------------------------------- /PetStore/pet-store-init-front-master/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | <%= htmlWebpackPlugin.options.title %> 9 | 10 | 11 | 14 |
15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /PetStore/pet-store-init-front-master/src/App.vue: -------------------------------------------------------------------------------- 1 | 7 | 8 | 18 | 19 | 32 | -------------------------------------------------------------------------------- /PetStore/pet-store-init-front-master/src/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenguowei10086/QKL-QHD/e8f04decfd8cc51111970405d309adf3ae3745cb/PetStore/pet-store-init-front-master/src/assets/logo.png -------------------------------------------------------------------------------- /PetStore/pet-store-init-front-master/src/assets/博美.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenguowei10086/QKL-QHD/e8f04decfd8cc51111970405d309adf3ae3745cb/PetStore/pet-store-init-front-master/src/assets/博美.png -------------------------------------------------------------------------------- /PetStore/pet-store-init-front-master/src/assets/哈士奇.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenguowei10086/QKL-QHD/e8f04decfd8cc51111970405d309adf3ae3745cb/PetStore/pet-store-init-front-master/src/assets/哈士奇.png -------------------------------------------------------------------------------- /PetStore/pet-store-init-front-master/src/assets/拉布拉多.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenguowei10086/QKL-QHD/e8f04decfd8cc51111970405d309adf3ae3745cb/PetStore/pet-store-init-front-master/src/assets/拉布拉多.png -------------------------------------------------------------------------------- /PetStore/pet-store-init-front-master/src/assets/柴犬.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenguowei10086/QKL-QHD/e8f04decfd8cc51111970405d309adf3ae3745cb/PetStore/pet-store-init-front-master/src/assets/柴犬.png -------------------------------------------------------------------------------- /PetStore/pet-store-init-front-master/src/assets/法斗.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenguowei10086/QKL-QHD/e8f04decfd8cc51111970405d309adf3ae3745cb/PetStore/pet-store-init-front-master/src/assets/法斗.png -------------------------------------------------------------------------------- /PetStore/pet-store-init-front-master/src/assets/萨摩.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenguowei10086/QKL-QHD/e8f04decfd8cc51111970405d309adf3ae3745cb/PetStore/pet-store-init-front-master/src/assets/萨摩.png -------------------------------------------------------------------------------- /PetStore/pet-store-init-front-master/src/assets/边牧.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenguowei10086/QKL-QHD/e8f04decfd8cc51111970405d309adf3ae3745cb/PetStore/pet-store-init-front-master/src/assets/边牧.png -------------------------------------------------------------------------------- /PetStore/pet-store-init-front-master/src/assets/金毛.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenguowei10086/QKL-QHD/e8f04decfd8cc51111970405d309adf3ae3745cb/PetStore/pet-store-init-front-master/src/assets/金毛.png -------------------------------------------------------------------------------- /PetStore/pet-store-init-front-master/src/components/Navigator.vue: -------------------------------------------------------------------------------- 1 | 13 | 14 | 35 | 36 | -------------------------------------------------------------------------------- /PetStore/pet-store-init-front-master/src/config.js: -------------------------------------------------------------------------------- 1 | 2 | export default { 3 | base_url : 'http://127.0.0.1' 4 | } -------------------------------------------------------------------------------- /PetStore/pet-store-init-front-master/src/frame/BaseFrame.vue: -------------------------------------------------------------------------------- 1 | 7 | 8 | 13 | 14 | -------------------------------------------------------------------------------- /PetStore/pet-store-init-front-master/src/main.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import ElementUI from 'element-ui'; 3 | import 'element-ui/lib/theme-chalk/index.css'; 4 | import VueRouter from 'vue-router' 5 | import routes from './router' 6 | import axios from "axios"; 7 | import VueAxios from 'vue-axios' 8 | import App from './App.vue' 9 | import VueCookies from 'vue-cookies' 10 | axios.defaults.baseURL='/api' 11 | // axios.defaults.baseURL='http://127.0.0.1:5003' 12 | Vue.use(ElementUI); 13 | Vue.use(VueRouter); 14 | Vue.use(VueAxios, axios); 15 | Vue.use(VueCookies) 16 | Vue.config.productionTip = false 17 | 18 | const router = new VueRouter({ 19 | routes 20 | }) 21 | 22 | new Vue({ 23 | router: router, 24 | render: h => h(App), 25 | }).$mount('#app') 26 | -------------------------------------------------------------------------------- /PetStore/pet-store-init-front-master/src/router.js: -------------------------------------------------------------------------------- 1 | import Home from '@/views/Home'; 2 | import Login from '@/views/Login'; 3 | import Register from '@/views/Register' 4 | import Adoption from "@/views/Adoption"; 5 | 6 | 7 | export default [ 8 | { 9 | path: '/', 10 | redirect: '/home' 11 | }, 12 | { 13 | path:'/home', 14 | component: Home 15 | }, 16 | { 17 | path:'/login', 18 | component: Login 19 | }, 20 | { 21 | path: '/register', 22 | component: Register 23 | }, 24 | { 25 | path: '/adoption', 26 | component: Adoption 27 | } 28 | 29 | ] -------------------------------------------------------------------------------- /PetStore/pet-store-init-front-master/src/utils/axios.js: -------------------------------------------------------------------------------- 1 | const VueAxios = { 2 | vm: {}, 3 | // eslint-disable-next-line no-unused-vars 4 | install (Vue, instance) { 5 | if (this.installed) { 6 | return 7 | } 8 | this.installed = true 9 | 10 | if (!instance) { 11 | // eslint-disable-next-line no-console 12 | console.error('You have to install axios') 13 | return 14 | } 15 | 16 | Vue.axios = instance 17 | 18 | Object.defineProperties(Vue.prototype, { 19 | axios: { 20 | get: function get () { 21 | return instance 22 | } 23 | }, 24 | $http: { 25 | get: function get () { 26 | return instance 27 | } 28 | } 29 | }) 30 | } 31 | } 32 | 33 | export { 34 | VueAxios 35 | } 36 | -------------------------------------------------------------------------------- /PetStore/pet-store-init-front-master/src/views/Adoption.vue: -------------------------------------------------------------------------------- 1 | 33 | 34 | 154 | 155 | -------------------------------------------------------------------------------- /PetStore/pet-store-init-front-master/src/views/Home.vue: -------------------------------------------------------------------------------- 1 | 137 | 138 | 188 | 189 | -------------------------------------------------------------------------------- /PetStore/pet-store-init-front-master/src/views/Login.vue: -------------------------------------------------------------------------------- 1 | 24 | 25 | 51 | 52 | -------------------------------------------------------------------------------- /PetStore/pet-store-init-front-master/src/views/Register.vue: -------------------------------------------------------------------------------- 1 | 24 | 25 | 52 | 53 | -------------------------------------------------------------------------------- /PetStore/pet-store-init-front-master/vue.config.js: -------------------------------------------------------------------------------- 1 | const vueConfig = { 2 | devServer: { 3 | // development server port 8000 4 | port: 8020, 5 | // If you want to turn on the proxy, please remove the mockjs /src/main.jsL11 6 | proxy: { 7 | '/api': { 8 | //target: 'http://383a25k854.qicp.vip/', 9 | //target: 'http://cxzme.com:58081/', 10 | target: 'http://localhost:8080/', 11 | changeOrigin: true, 12 | pathRewrite: { 13 | '^/api': '/' 14 | } 15 | } 16 | } 17 | } 18 | } 19 | module.exports = vueConfig -------------------------------------------------------------------------------- /PetStore/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 4.0.0 6 | 7 | groupId 8 | PetStore 9 | 1.0-SNAPSHOT 10 | 11 | 12 | 11 13 | 11 14 | 15 | 16 | -------------------------------------------------------------------------------- /PetStore/settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'PetStore' 2 | 3 | -------------------------------------------------------------------------------- /PetStore/src/main/contracts/Adoption.sol: -------------------------------------------------------------------------------- 1 | pragma solidity ^0.4.24; 2 | contract Adoption { 3 | uint8 userIndex; 4 | mapping(address => uint8) userMapping; 5 | // 保存领养者的地址 6 | address[8] public adopters; 7 | constructor() public { 8 | userIndex = 0; 9 | } 10 | //用户注册 11 | function register(address user) public returns(uint8) { 12 | if (userMapping[user] > 0) { 13 | return userMapping[user]; 14 | } userIndex++; 15 | userMapping[user] = userIndex; 16 | return userIndex; 17 | } 18 | //判断用户是否可以登录(>0) 19 | function login(address user) public view returns(uint8) { 20 | return userMapping[user]; 21 | } 22 | // 领养宠物 23 | function adopt(uint petId) public returns (uint) { 24 | // 确保id 在数组长度内 25 | require(petId >= 0 && petId <= 7); 26 | uint userNotExist= 404; 27 | if (userMapping[msg.sender] == 0) { 28 | return userNotExist; 29 | } 30 | // 保存调用这地址 31 | adopters[petId] = msg.sender; 32 | return petId; 33 | } 34 | // 返回领养者 35 | function getAdopters() public view returns (address[8]) { 36 | return adopters; 37 | 38 | } 39 | 40 | } -------------------------------------------------------------------------------- /PetStore/src/main/java/org/example/PetStore/Application.java: -------------------------------------------------------------------------------- 1 | package org.example.PetStore; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class Application { 8 | 9 | public static void main(String[] args){ 10 | SpringApplication.run(Application.class, args); 11 | } 12 | } -------------------------------------------------------------------------------- /PetStore/src/main/java/org/example/PetStore/config/ContractConfig.java: -------------------------------------------------------------------------------- 1 | package org.example.PetStore.config; 2 | 3 | import java.lang.String; 4 | import lombok.Data; 5 | 6 | @Data 7 | public class ContractConfig { 8 | private String adoptionAddress; 9 | } 10 | -------------------------------------------------------------------------------- /PetStore/src/main/java/org/example/PetStore/config/SdkBeanConfig.java: -------------------------------------------------------------------------------- 1 | package org.example.PetStore.config; 2 | 3 | import java.math.BigInteger; 4 | import java.util.Arrays; 5 | import java.util.HashMap; 6 | import java.util.List; 7 | import java.util.Map; 8 | import java.util.stream.Collectors; 9 | import lombok.extern.slf4j.Slf4j; 10 | import org.fisco.bcos.sdk.BcosSDK; 11 | import org.fisco.bcos.sdk.client.Client; 12 | import org.fisco.bcos.sdk.config.ConfigOption; 13 | import org.fisco.bcos.sdk.config.exceptions.ConfigException; 14 | import org.fisco.bcos.sdk.config.model.ConfigProperty; 15 | import org.springframework.beans.factory.annotation.Autowired; 16 | import org.springframework.context.annotation.Bean; 17 | import org.springframework.context.annotation.Configuration; 18 | 19 | @Configuration 20 | @Slf4j 21 | public class SdkBeanConfig { 22 | 23 | @Autowired 24 | private SystemConfig config; 25 | 26 | @Bean 27 | public Client client() throws Exception { 28 | String certPaths = this.config.getCertPath(); 29 | String[] possibilities = certPaths.split(",|;"); 30 | for(String certPath: possibilities ) { 31 | try{ 32 | ConfigProperty property = new ConfigProperty(); 33 | configNetwork(property); 34 | configCryptoMaterial(property,certPath); 35 | 36 | ConfigOption configOption = new ConfigOption(property); 37 | Client client = new BcosSDK(configOption).getClient(config.getGroupId()); 38 | 39 | BigInteger blockNumber = client.getBlockNumber().getBlockNumber(); 40 | log.info("Chain connect successful. Current block number {}", blockNumber); 41 | 42 | configCryptoKeyPair(client); 43 | log.info("is Gm:{}, address:{}", client.getCryptoSuite().cryptoTypeConfig == 1, client.getCryptoSuite().getCryptoKeyPair().getAddress()); 44 | return client; 45 | } 46 | catch (Exception ex) { 47 | log.error(ex.getMessage()); 48 | try{ 49 | Thread.sleep(5000); 50 | }catch (Exception e) {} 51 | } 52 | } 53 | throw new ConfigException("Failed to connect to peers:" + config.getPeers()); 54 | } 55 | 56 | public void configNetwork(ConfigProperty configProperty) { 57 | String peerStr = config.getPeers(); 58 | List peers = Arrays.stream(peerStr.split(",")).collect(Collectors.toList()); 59 | Map networkConfig = new HashMap<>(); 60 | networkConfig.put("peers", peers); 61 | 62 | configProperty.setNetwork(networkConfig); 63 | } 64 | 65 | public void configCryptoMaterial(ConfigProperty configProperty,String certPath) { 66 | Map cryptoMaterials = new HashMap<>(); 67 | cryptoMaterials.put("certPath", certPath); 68 | configProperty.setCryptoMaterial(cryptoMaterials); 69 | } 70 | 71 | public void configCryptoKeyPair(Client client) { 72 | if (config.getHexPrivateKey() == null || config.getHexPrivateKey().isEmpty()){ 73 | client.getCryptoSuite().setCryptoKeyPair(client.getCryptoSuite().createKeyPair()); 74 | return; 75 | } 76 | String privateKey; 77 | if (!config.getHexPrivateKey().contains(",")) { 78 | privateKey = config.getHexPrivateKey(); 79 | } else { 80 | String[] list = config.getHexPrivateKey().split(","); 81 | privateKey = list[0]; 82 | } 83 | if (privateKey.startsWith("0x") || privateKey.startsWith("0X")) { 84 | privateKey = privateKey.substring(2); 85 | config.setHexPrivateKey(privateKey); 86 | } 87 | client.getCryptoSuite().setCryptoKeyPair(client.getCryptoSuite().createKeyPair(privateKey)); 88 | } 89 | } 90 | -------------------------------------------------------------------------------- /PetStore/src/main/java/org/example/PetStore/config/SwaggerConfig.java: -------------------------------------------------------------------------------- 1 | package org.example.PetStore.config; 2 | 3 | import org.springframework.context.annotation.Bean; 4 | import org.springframework.context.annotation.Configuration; 5 | import springfox.documentation.builders.ApiInfoBuilder; 6 | import springfox.documentation.builders.PathSelectors; 7 | import springfox.documentation.builders.RequestHandlerSelectors; 8 | import springfox.documentation.service.ApiInfo; 9 | import springfox.documentation.spi.DocumentationType; 10 | import springfox.documentation.spring.web.plugins.Docket; 11 | import springfox.documentation.swagger2.annotations.EnableSwagger2; 12 | 13 | @Configuration 14 | @EnableSwagger2 15 | public class SwaggerConfig { 16 | 17 | @Bean 18 | public Docket createRestApi() { 19 | return new Docket(DocumentationType.SWAGGER_2).apiInfo(apiInfo()).select() 20 | .apis(RequestHandlerSelectors.basePackage("org")).paths(PathSelectors.any()).build(); 21 | } 22 | 23 | private ApiInfo apiInfo() { 24 | return new ApiInfoBuilder().title("PetStoreAPI 接口文档").description("PetStore API") 25 | .termsOfServiceUrl("").version("1.0").build(); 26 | } 27 | } -------------------------------------------------------------------------------- /PetStore/src/main/java/org/example/PetStore/config/SystemConfig.java: -------------------------------------------------------------------------------- 1 | package org.example.PetStore.config; 2 | 3 | import java.lang.String; 4 | import lombok.Data; 5 | import org.springframework.boot.context.properties.ConfigurationProperties; 6 | import org.springframework.boot.context.properties.NestedConfigurationProperty; 7 | import org.springframework.context.annotation.Configuration; 8 | 9 | @Data 10 | @Configuration 11 | @ConfigurationProperties( 12 | prefix = "system" 13 | ) 14 | public class SystemConfig { 15 | private String peers; 16 | 17 | private int groupId = 1; 18 | 19 | private String certPath = "conf"; 20 | 21 | private String hexPrivateKey; 22 | 23 | @NestedConfigurationProperty 24 | private ContractConfig contract; 25 | } 26 | -------------------------------------------------------------------------------- /PetStore/src/main/java/org/example/PetStore/controller/MyAdoptionController.java: -------------------------------------------------------------------------------- 1 | package org.example.PetStore.controller; 2 | 3 | 4 | import cn.hutool.core.lang.Dict; 5 | import io.swagger.annotations.Api; 6 | import io.swagger.annotations.ApiOperation; 7 | import org.example.PetStore.service.MyAdoptionService; 8 | import org.springframework.beans.factory.annotation.Autowired; 9 | import org.springframework.web.bind.annotation.RequestMapping; 10 | import org.springframework.web.bind.annotation.RequestMethod; 11 | import org.springframework.web.bind.annotation.RequestParam; 12 | import org.springframework.web.bind.annotation.RestController; 13 | 14 | @Api(value = "领养Controller", tags = {"领养Api"}) 15 | 16 | @RestController 17 | @RequestMapping("myAdoption") 18 | public class MyAdoptionController { 19 | @Autowired 20 | MyAdoptionService myAdoptionService; 21 | @ApiOperation(value = "领养宠物", notes = "领养宠物") 22 | @RequestMapping(value = "adopt", method = RequestMethod.GET) public Dict adopt(@RequestParam("address") String address, @RequestParam("petId") Integer petId) { 23 | return myAdoptionService.adopt(address, petId); 24 | } 25 | @ApiOperation(value = "列出宠物被领养的情况列表", notes = " 列出宠物被领养的情况列表") 26 | @RequestMapping(value = "listPetAdoption", method = RequestMethod.GET) public Dict listPetAdoption(@RequestParam("address") String address) {return myAdoptionService.listPetAdoption(address); 27 | } 28 | @ApiOperation(value = "列出请求账户已领养宠物的情况", notes = "列出请求账户已领养宠物的情况") 29 | @RequestMapping(value = "listAdoptedPet", method = RequestMethod.GET) 30 | public Dict listAdoptedPet(@RequestParam("address") String address) { 31 | return myAdoptionService.listAdoptedPet(address); 32 | } 33 | } -------------------------------------------------------------------------------- /PetStore/src/main/java/org/example/PetStore/controller/UserController.java: -------------------------------------------------------------------------------- 1 | package org.example.PetStore.controller; 2 | 3 | import cn.hutool.core.lang.Dict; 4 | import io.swagger.annotations.Api; 5 | import io.swagger.annotations.ApiOperation; 6 | import org.example.PetStore.service.UserService; 7 | import org.springframework.beans.factory.annotation.Autowired; 8 | import org.springframework.web.bind.annotation.RequestMapping; 9 | import org.springframework.web.bind.annotation.RequestMethod; 10 | import org.springframework.web.bind.annotation.RequestParam; 11 | import org.springframework.web.bind.annotation.RestController; 12 | 13 | @Api(value = "注册登录Controller", tags = {"注册登录Api"}) 14 | 15 | @RestController 16 | @RequestMapping("user") 17 | public class UserController { 18 | @Autowired 19 | UserService userService; 20 | @ApiOperation(value = "注册账号", notes = "注册账号") 21 | @RequestMapping(value = "register", method = RequestMethod.GET) public Dict register(@RequestParam("address") String address) { 22 | return userService.register(address); 23 | } 24 | @ApiOperation(value = "登录账号", notes = "登录账号") 25 | @RequestMapping(value = "login", method = RequestMethod.GET) public Dict login(@RequestParam("address") String address) { 26 | return userService.login(address); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /PetStore/src/main/java/org/example/PetStore/model/CommonResponse.java: -------------------------------------------------------------------------------- 1 | package org.example.PetStore.model; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Data; 5 | import lombok.NoArgsConstructor; 6 | 7 | @Data 8 | @NoArgsConstructor 9 | @AllArgsConstructor 10 | public class CommonResponse { 11 | 12 | public static final String OK = "0"; 13 | 14 | private String code; 15 | private String message; 16 | private Object data; 17 | 18 | public static CommonResponse ok(Object data){ 19 | return new CommonResponse(OK, "",data); 20 | } 21 | 22 | public static CommonResponse fail(String code, Exception ex){ 23 | return new CommonResponse(code, ex.getMessage(), null); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /PetStore/src/main/java/org/example/PetStore/model/bo/AdoptionAdoptInputBO.java: -------------------------------------------------------------------------------- 1 | package org.example.PetStore.model.bo; 2 | 3 | import java.lang.Object; 4 | import java.math.BigInteger; 5 | import java.util.ArrayList; 6 | import java.util.List; 7 | import lombok.AllArgsConstructor; 8 | import lombok.Data; 9 | import lombok.NoArgsConstructor; 10 | 11 | @Data 12 | @NoArgsConstructor 13 | @AllArgsConstructor 14 | public class AdoptionAdoptInputBO { 15 | private BigInteger petId; 16 | 17 | public List toArgs() { 18 | List args = new ArrayList(); 19 | args.add(petId); 20 | return args; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /PetStore/src/main/java/org/example/PetStore/model/bo/AdoptionAdoptersInputBO.java: -------------------------------------------------------------------------------- 1 | package org.example.PetStore.model.bo; 2 | 3 | import java.lang.Object; 4 | import java.math.BigInteger; 5 | import java.util.ArrayList; 6 | import java.util.List; 7 | import lombok.AllArgsConstructor; 8 | import lombok.Data; 9 | import lombok.NoArgsConstructor; 10 | 11 | @Data 12 | @NoArgsConstructor 13 | @AllArgsConstructor 14 | public class AdoptionAdoptersInputBO { 15 | private BigInteger arg0; 16 | 17 | public List toArgs() { 18 | List args = new ArrayList(); 19 | args.add(arg0); 20 | return args; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /PetStore/src/main/java/org/example/PetStore/model/bo/AdoptionLoginInputBO.java: -------------------------------------------------------------------------------- 1 | package org.example.PetStore.model.bo; 2 | 3 | import java.lang.Object; 4 | import java.lang.String; 5 | import java.util.ArrayList; 6 | import java.util.List; 7 | import lombok.AllArgsConstructor; 8 | import lombok.Data; 9 | import lombok.NoArgsConstructor; 10 | 11 | @Data 12 | @NoArgsConstructor 13 | @AllArgsConstructor 14 | public class AdoptionLoginInputBO { 15 | private String user; 16 | 17 | public List toArgs() { 18 | List args = new ArrayList(); 19 | args.add(user); 20 | return args; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /PetStore/src/main/java/org/example/PetStore/model/bo/AdoptionRegisterInputBO.java: -------------------------------------------------------------------------------- 1 | package org.example.PetStore.model.bo; 2 | 3 | import java.lang.Object; 4 | import java.lang.String; 5 | import java.util.ArrayList; 6 | import java.util.List; 7 | import lombok.AllArgsConstructor; 8 | import lombok.Data; 9 | import lombok.NoArgsConstructor; 10 | 11 | @Data 12 | @NoArgsConstructor 13 | @AllArgsConstructor 14 | public class AdoptionRegisterInputBO { 15 | private String user; 16 | 17 | public List toArgs() { 18 | List args = new ArrayList(); 19 | args.add(user); 20 | return args; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /PetStore/src/main/java/org/example/PetStore/raw/Adoption.java: -------------------------------------------------------------------------------- 1 | import java.math.BigInteger; 2 | import java.util.Arrays; 3 | import java.util.Collections; 4 | import java.util.List; 5 | import org.fisco.bcos.sdk.abi.FunctionReturnDecoder; 6 | import org.fisco.bcos.sdk.abi.TypeReference; 7 | import org.fisco.bcos.sdk.abi.datatypes.Address; 8 | import org.fisco.bcos.sdk.abi.datatypes.Function; 9 | import org.fisco.bcos.sdk.abi.datatypes.Type; 10 | import org.fisco.bcos.sdk.abi.datatypes.generated.StaticArray8; 11 | import org.fisco.bcos.sdk.abi.datatypes.generated.Uint256; 12 | import org.fisco.bcos.sdk.abi.datatypes.generated.Uint8; 13 | import org.fisco.bcos.sdk.abi.datatypes.generated.tuples.generated.Tuple1; 14 | import org.fisco.bcos.sdk.client.Client; 15 | import org.fisco.bcos.sdk.contract.Contract; 16 | import org.fisco.bcos.sdk.crypto.CryptoSuite; 17 | import org.fisco.bcos.sdk.crypto.keypair.CryptoKeyPair; 18 | import org.fisco.bcos.sdk.model.CryptoType; 19 | import org.fisco.bcos.sdk.model.TransactionReceipt; 20 | import org.fisco.bcos.sdk.model.callback.TransactionCallback; 21 | import org.fisco.bcos.sdk.transaction.model.exception.ContractException; 22 | 23 | @SuppressWarnings("unchecked") 24 | public class Adoption extends Contract { 25 | public static final String[] BINARY_ARRAY = {"608060405234801561001057600080fd5b5060008060006101000a81548160ff021916908360ff1602179055506105c28061003b6000396000f30060806040526004361061006d576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806335a6861a146100725780633de4eb17146100cf57806343ae80d3146101225780634420e4861461018f5780638588b2c5146101ec575b600080fd5b34801561007e57600080fd5b506100b3600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061022d565b604051808260ff1660ff16815260200191505060405180910390f35b3480156100db57600080fd5b506100e4610283565b6040518082600860200280838360005b8381101561010f5780820151818401526020810190506100f4565b5050505090500191505060405180910390f35b34801561012e57600080fd5b5061014d60048036038101908080359060200190929190505050610304565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561019b57600080fd5b506101d0600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610339565b604051808260ff1660ff16815260200191505060405180910390f35b3480156101f857600080fd5b5061021760048036038101908080359060200190929190505050610494565b6040518082815260200191505060405180910390f35b6000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050919050565b61028b610572565b60026008806020026040519081016040528092919082600880156102fa576020028201915b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190600101908083116102b0575b5050505050905090565b60028160088110151561031357fe5b016000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1660ff1611156103e657600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905061048f565b60008081819054906101000a900460ff168092919060010191906101000a81548160ff021916908360ff160217905550506000809054906101000a900460ff16600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908360ff1602179055506000809054906101000a900460ff1690505b919050565b600080600083101580156104a9575060078311155b15156104b457600080fd5b61019490506000600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1660ff1614156105195780915061056c565b3360028460088110151561052957fe5b0160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508291505b50919050565b610100604051908101604052806008906020820280388339808201915050905050905600a165627a7a723058206533a0a379ddbd3575b612c9c9551165226222b8800f7a2ca0ba93db0353d91f0029"}; 26 | 27 | public static final String BINARY = org.fisco.bcos.sdk.utils.StringUtils.joinAll("", BINARY_ARRAY); 28 | 29 | public static final String[] SM_BINARY_ARRAY = {}; 30 | 31 | public static final String SM_BINARY = org.fisco.bcos.sdk.utils.StringUtils.joinAll("", SM_BINARY_ARRAY); 32 | 33 | public static final String[] ABI_ARRAY = {"[{\"constant\":true,\"inputs\":[{\"name\":\"user\",\"type\":\"address\"}],\"name\":\"login\",\"outputs\":[{\"name\":\"\",\"type\":\"uint8\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getAdopters\",\"outputs\":[{\"name\":\"\",\"type\":\"address[8]\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"adopters\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"user\",\"type\":\"address\"}],\"name\":\"register\",\"outputs\":[{\"name\":\"\",\"type\":\"uint8\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"petId\",\"type\":\"uint256\"}],\"name\":\"adopt\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"}]"}; 34 | 35 | public static final String ABI = org.fisco.bcos.sdk.utils.StringUtils.joinAll("", ABI_ARRAY); 36 | 37 | public static final String FUNC_LOGIN = "login"; 38 | 39 | public static final String FUNC_GETADOPTERS = "getAdopters"; 40 | 41 | public static final String FUNC_ADOPTERS = "adopters"; 42 | 43 | public static final String FUNC_REGISTER = "register"; 44 | 45 | public static final String FUNC_ADOPT = "adopt"; 46 | 47 | protected Adoption(String contractAddress, Client client, CryptoKeyPair credential) { 48 | super(getBinary(client.getCryptoSuite()), contractAddress, client, credential); 49 | } 50 | 51 | public static String getBinary(CryptoSuite cryptoSuite) { 52 | return (cryptoSuite.getCryptoTypeConfig() == CryptoType.ECDSA_TYPE ? BINARY : SM_BINARY); 53 | } 54 | 55 | public BigInteger login(String user) throws ContractException { 56 | final Function function = new Function(FUNC_LOGIN, 57 | Arrays.asList(new org.fisco.bcos.sdk.abi.datatypes.Address(user)), 58 | Arrays.>asList(new TypeReference() {})); 59 | return executeCallWithSingleValueReturn(function, BigInteger.class); 60 | } 61 | 62 | public List getAdopters() throws ContractException { 63 | final Function function = new Function(FUNC_GETADOPTERS, 64 | Arrays.asList(), 65 | Arrays.>asList(new TypeReference>() {})); 66 | List result = (List) executeCallWithSingleValueReturn(function, List.class); 67 | return convertToNative(result); 68 | } 69 | 70 | public String adopters(BigInteger param0) throws ContractException { 71 | final Function function = new Function(FUNC_ADOPTERS, 72 | Arrays.asList(new org.fisco.bcos.sdk.abi.datatypes.generated.Uint256(param0)), 73 | Arrays.>asList(new TypeReference
() {})); 74 | return executeCallWithSingleValueReturn(function, String.class); 75 | } 76 | 77 | public TransactionReceipt register(String user) { 78 | final Function function = new Function( 79 | FUNC_REGISTER, 80 | Arrays.asList(new org.fisco.bcos.sdk.abi.datatypes.Address(user)), 81 | Collections.>emptyList()); 82 | return executeTransaction(function); 83 | } 84 | 85 | public void register(String user, TransactionCallback callback) { 86 | final Function function = new Function( 87 | FUNC_REGISTER, 88 | Arrays.asList(new org.fisco.bcos.sdk.abi.datatypes.Address(user)), 89 | Collections.>emptyList()); 90 | asyncExecuteTransaction(function, callback); 91 | } 92 | 93 | public String getSignedTransactionForRegister(String user) { 94 | final Function function = new Function( 95 | FUNC_REGISTER, 96 | Arrays.asList(new org.fisco.bcos.sdk.abi.datatypes.Address(user)), 97 | Collections.>emptyList()); 98 | return createSignedTransaction(function); 99 | } 100 | 101 | public Tuple1 getRegisterInput(TransactionReceipt transactionReceipt) { 102 | String data = transactionReceipt.getInput().substring(10); 103 | final Function function = new Function(FUNC_REGISTER, 104 | Arrays.asList(), 105 | Arrays.>asList(new TypeReference
() {})); 106 | List results = FunctionReturnDecoder.decode(data, function.getOutputParameters()); 107 | return new Tuple1( 108 | 109 | (String) results.get(0).getValue() 110 | ); 111 | } 112 | 113 | public Tuple1 getRegisterOutput(TransactionReceipt transactionReceipt) { 114 | String data = transactionReceipt.getOutput(); 115 | final Function function = new Function(FUNC_REGISTER, 116 | Arrays.asList(), 117 | Arrays.>asList(new TypeReference() {})); 118 | List results = FunctionReturnDecoder.decode(data, function.getOutputParameters()); 119 | return new Tuple1( 120 | 121 | (BigInteger) results.get(0).getValue() 122 | ); 123 | } 124 | 125 | public TransactionReceipt adopt(BigInteger petId) { 126 | final Function function = new Function( 127 | FUNC_ADOPT, 128 | Arrays.asList(new org.fisco.bcos.sdk.abi.datatypes.generated.Uint256(petId)), 129 | Collections.>emptyList()); 130 | return executeTransaction(function); 131 | } 132 | 133 | public void adopt(BigInteger petId, TransactionCallback callback) { 134 | final Function function = new Function( 135 | FUNC_ADOPT, 136 | Arrays.asList(new org.fisco.bcos.sdk.abi.datatypes.generated.Uint256(petId)), 137 | Collections.>emptyList()); 138 | asyncExecuteTransaction(function, callback); 139 | } 140 | 141 | public String getSignedTransactionForAdopt(BigInteger petId) { 142 | final Function function = new Function( 143 | FUNC_ADOPT, 144 | Arrays.asList(new org.fisco.bcos.sdk.abi.datatypes.generated.Uint256(petId)), 145 | Collections.>emptyList()); 146 | return createSignedTransaction(function); 147 | } 148 | 149 | public Tuple1 getAdoptInput(TransactionReceipt transactionReceipt) { 150 | String data = transactionReceipt.getInput().substring(10); 151 | final Function function = new Function(FUNC_ADOPT, 152 | Arrays.asList(), 153 | Arrays.>asList(new TypeReference() {})); 154 | List results = FunctionReturnDecoder.decode(data, function.getOutputParameters()); 155 | return new Tuple1( 156 | 157 | (BigInteger) results.get(0).getValue() 158 | ); 159 | } 160 | 161 | public Tuple1 getAdoptOutput(TransactionReceipt transactionReceipt) { 162 | String data = transactionReceipt.getOutput(); 163 | final Function function = new Function(FUNC_ADOPT, 164 | Arrays.asList(), 165 | Arrays.>asList(new TypeReference() {})); 166 | List results = FunctionReturnDecoder.decode(data, function.getOutputParameters()); 167 | return new Tuple1( 168 | 169 | (BigInteger) results.get(0).getValue() 170 | ); 171 | } 172 | 173 | public static Adoption load(String contractAddress, Client client, CryptoKeyPair credential) { 174 | return new Adoption(contractAddress, client, credential); 175 | } 176 | 177 | public static Adoption deploy(Client client, CryptoKeyPair credential) throws ContractException { 178 | return deploy(Adoption.class, client, credential, getBinary(client.getCryptoSuite()), ""); 179 | } 180 | } 181 | -------------------------------------------------------------------------------- /PetStore/src/main/java/org/example/PetStore/service/AdoptionService.java: -------------------------------------------------------------------------------- 1 | package org.example.PetStore.service; 2 | 3 | import java.lang.Exception; 4 | import java.lang.String; 5 | import java.util.Arrays; 6 | import javax.annotation.PostConstruct; 7 | import lombok.Data; 8 | import lombok.NoArgsConstructor; 9 | import org.example.PetStore.model.bo.AdoptionAdoptInputBO; 10 | import org.example.PetStore.model.bo.AdoptionAdoptersInputBO; 11 | import org.example.PetStore.model.bo.AdoptionLoginInputBO; 12 | import org.example.PetStore.model.bo.AdoptionRegisterInputBO; 13 | import org.fisco.bcos.sdk.client.Client; 14 | import org.fisco.bcos.sdk.transaction.manager.AssembleTransactionProcessor; 15 | import org.fisco.bcos.sdk.transaction.manager.TransactionProcessorFactory; 16 | import org.fisco.bcos.sdk.transaction.model.dto.CallResponse; 17 | import org.fisco.bcos.sdk.transaction.model.dto.TransactionResponse; 18 | import org.springframework.beans.factory.annotation.Autowired; 19 | import org.springframework.beans.factory.annotation.Value; 20 | import org.springframework.stereotype.Service; 21 | 22 | @Service 23 | @NoArgsConstructor 24 | @Data 25 | public class AdoptionService { 26 | public static final String ABI = org.example.PetStore.utils.IOUtil.readResourceAsString("abi/Adoption.abi"); 27 | 28 | public static final String BINARY = org.example.PetStore.utils.IOUtil.readResourceAsString("bin/ecc/Adoption.bin"); 29 | 30 | public static final String SM_BINARY = org.example.PetStore.utils.IOUtil.readResourceAsString("bin/sm/Adoption.bin"); 31 | 32 | @Value("${system.contract.adoptionAddress}") 33 | private String address; 34 | 35 | @Autowired 36 | private Client client; 37 | 38 | AssembleTransactionProcessor txProcessor; 39 | 40 | @PostConstruct 41 | public void init() throws Exception { 42 | this.txProcessor = TransactionProcessorFactory.createAssembleTransactionProcessor(this.client, this.client.getCryptoSuite().getCryptoKeyPair()); 43 | } 44 | 45 | public CallResponse login(AdoptionLoginInputBO input) throws Exception { 46 | return this.txProcessor.sendCall(this.client.getCryptoSuite().getCryptoKeyPair().getAddress(), this.address, ABI, "login", input.toArgs()); 47 | } 48 | 49 | public CallResponse getAdopters() throws Exception { 50 | return this.txProcessor.sendCall(this.client.getCryptoSuite().getCryptoKeyPair().getAddress(), this.address, ABI, "getAdopters", Arrays.asList()); 51 | } 52 | 53 | public TransactionResponse adopt(AdoptionAdoptInputBO input) throws Exception { 54 | return this.txProcessor.sendTransactionAndGetResponse(this.address, ABI, "adopt", input.toArgs()); 55 | } 56 | 57 | public TransactionResponse register(AdoptionRegisterInputBO input) throws Exception { 58 | return this.txProcessor.sendTransactionAndGetResponse(this.address, ABI, "register", input.toArgs()); 59 | } 60 | 61 | public CallResponse adopters(AdoptionAdoptersInputBO input) throws Exception { 62 | return this.txProcessor.sendCall(this.client.getCryptoSuite().getCryptoKeyPair().getAddress(), this.address, ABI, "adopters", input.toArgs()); 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /PetStore/src/main/java/org/example/PetStore/service/MyAdoptionService.java: -------------------------------------------------------------------------------- 1 | package org.example.PetStore.service; 2 | 3 | import cn.hutool.core.lang.Dict; 4 | import cn.hutool.core.util.HexUtil; 5 | import cn.hutool.core.util.ObjectUtil; 6 | import cn.hutool.json.JSONArray; 7 | import cn.hutool.json.JSONObject; 8 | import cn.hutool.json.JSONUtil; 9 | import org.example.PetStore.utils.WeBASEUtils; 10 | import org.springframework.beans.factory.annotation.Autowired; 11 | import org.springframework.beans.factory.annotation.Value; 12 | import org.springframework.stereotype.Service; 13 | import java.util.ArrayList; 14 | import java.util.List; 15 | 16 | @Service 17 | public class MyAdoptionService { 18 | @Value("${system.contract.adoptionAddress}") 19 | String contractAddress; 20 | public static final String ABI = org.example.PetStore.utils.IOUtil.readResourceAsString("abi/Adoption.abi"); 21 | @Autowired 22 | WeBASEUtils weBASEUtils; 23 | /** 24 | * * 领养宠物 25 | * */ 26 | public Dict adopt(String userAddress, Integer petId) { 27 | /** 28 | * * 假设有8 个宠物可供领养,编号为0-7 29 | * * 输入宠物编号为0-7 之间,若不在此范围内则返回code为500 30 | * * */ 31 | if (petId < 0 || petId > 7) { 32 | Dict result = new Dict(); 33 | result.set("code", 500); 34 | result.set("result","宠物编号不合规"); 35 | } 36 | /** 37 | * 向WeBASE-Front 发送Request 请求 38 | * */ 39 | List funcParam = new ArrayList(); 40 | funcParam.add(petId); 41 | Dict result = weBASEUtils.commonReq(userAddress, "adopt", funcParam, ABI, "Adoption", contractAddress); 42 | /** 43 | * 获取返回结果,并解析,如果结果与输入宠物编号相符则返回200 44 | * */ 45 | JSONObject respBody = JSONUtil.parseObj(result.get("result")); 46 | String output = (String) respBody.get("output"); 47 | long resInt = HexUtil.hexToLong(output.substring(2)); 48 | result.set("result", resInt); 49 | if (resInt != petId) { 50 | result.set("code", resInt); 51 | }else { 52 | result.set("code", 200); 53 | } return result; 54 | } 55 | /** 56 | * 列出宠物领养情况列表 57 | * */ 58 | public Dict listPetAdoption(String userAddress) { 59 | /** 60 | * 获取领养宠物的账户地址列表 61 | * */ 62 | JSONArray resArr2 = getPetAdoptAddresses(userAddress); 63 | List petStatusList = new ArrayList(); 64 | /** 65 | * 解析账户地址,若为默认地址(0x0000000000000000000000000000000000000000)则表示该编号宠物没有被领养 66 | * */ 67 | for (Object item : resArr2) { 68 | String parseAddress = (String) item; 69 | if (parseAddress.equals("0x0000000000000000000000000000000000000000")) { 70 | petStatusList.add(0); 71 | }else { 72 | petStatusList.add(1); 73 | } 74 | } Dict result = new Dict(); 75 | result.set("code", 200); 76 | result.set("result", petStatusList); 77 | return result; 78 | } 79 | /** 80 | * 通过地址获取宠物列表,如果获取地址列表不是查询用户,则说明该用 81 | 户未领养此宠物 82 | * @Param: userAddress 查询用户地址 83 | * */ 84 | public Dict listAdoptedPet(String userAddress) { 85 | JSONArray resArr2 = getPetAdoptAddresses(userAddress); 86 | List petStatusList = new ArrayList(); 87 | for (Object item : resArr2) { 88 | String parseAddress = (String) item; 89 | if (parseAddress.equals(userAddress)) { 90 | petStatusList.add(1); 91 | }else { 92 | petStatusList.add(0); 93 | } 94 | } Dict result = new Dict(); 95 | result.set("code", 200); 96 | result.set("result", petStatusList); 97 | return result; 98 | } 99 | /** 100 | * 通过用户地址获取领养宠物的地址列表 101 | * */ 102 | public JSONArray getPetAdoptAddresses(String userAddress) { 103 | List funcParam = new ArrayList(); 104 | Dict result = weBASEUtils.commonReq( 105 | userAddress, "getAdopters", funcParam, 106 | ABI, "Adoption", contractAddress); 107 | JSONArray resArr1 = JSONUtil.parseArray(result.get("result")); 108 | JSONArray resArr2 = (JSONArray) resArr1.get(0); 109 | return resArr2; 110 | } 111 | } -------------------------------------------------------------------------------- /PetStore/src/main/java/org/example/PetStore/service/ServiceManager.java: -------------------------------------------------------------------------------- 1 | package org.example.PetStore.service; 2 | 3 | import java.lang.Exception; 4 | import java.lang.String; 5 | import java.util.Arrays; 6 | import java.util.List; 7 | import java.util.Map; 8 | import java.util.concurrent.ConcurrentHashMap; 9 | import javax.annotation.PostConstruct; 10 | import lombok.Data; 11 | import lombok.extern.slf4j.Slf4j; 12 | import org.example.PetStore.config.SystemConfig; 13 | import org.fisco.bcos.sdk.client.Client; 14 | import org.springframework.beans.factory.annotation.Autowired; 15 | import org.springframework.context.annotation.Bean; 16 | import org.springframework.context.annotation.Configuration; 17 | 18 | @Configuration 19 | @Data 20 | @Slf4j 21 | public class ServiceManager { 22 | @Autowired 23 | private SystemConfig config; 24 | 25 | @Autowired 26 | private Client client; 27 | 28 | List hexPrivateKeyList; 29 | 30 | @PostConstruct 31 | public void init() { 32 | hexPrivateKeyList = Arrays.asList(this.config.getHexPrivateKey().split(",")); 33 | } 34 | 35 | /** 36 | * @notice: must use @Qualifier("AdoptionService") with @Autowired to get this Bean 37 | */ 38 | @Bean("AdoptionService") 39 | public Map initAdoptionServiceManager() throws Exception { 40 | Map serviceMap = new ConcurrentHashMap<>(this.hexPrivateKeyList.size()); 41 | for (int i = 0; i < this.hexPrivateKeyList.size(); i++) { 42 | String privateKey = this.hexPrivateKeyList.get(i); 43 | if (privateKey.startsWith("0x") || privateKey.startsWith("0X")) { 44 | privateKey = privateKey.substring(2); 45 | } 46 | if (privateKey.isEmpty()) { 47 | continue; 48 | } 49 | org.fisco.bcos.sdk.crypto.CryptoSuite cryptoSuite = new org.fisco.bcos.sdk.crypto.CryptoSuite(this.client.getCryptoType()); 50 | org.fisco.bcos.sdk.crypto.keypair.CryptoKeyPair cryptoKeyPair = cryptoSuite.createKeyPair(privateKey); 51 | String userAddress = cryptoKeyPair.getAddress(); 52 | log.info("++++++++hexPrivateKeyList[{}]:{},userAddress:{}", i, privateKey, userAddress); 53 | AdoptionService adoptionService = new AdoptionService(); 54 | adoptionService.setAddress(this.config.getContract().getAdoptionAddress()); 55 | adoptionService.setClient(this.client); 56 | org.fisco.bcos.sdk.transaction.manager.AssembleTransactionProcessor txProcessor = 57 | org.fisco.bcos.sdk.transaction.manager.TransactionProcessorFactory.createAssembleTransactionProcessor(this.client, cryptoKeyPair); 58 | adoptionService.setTxProcessor(txProcessor); 59 | serviceMap.put(userAddress, adoptionService); 60 | } 61 | log.info("++++++++AdoptionService map:{}", serviceMap); 62 | return serviceMap; 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /PetStore/src/main/java/org/example/PetStore/service/UserService.java: -------------------------------------------------------------------------------- 1 | package org.example.PetStore.service; 2 | 3 | import cn.hutool.core.lang.Dict; 4 | import cn.hutool.core.util.HexUtil; 5 | import cn.hutool.http.Header; 6 | import cn.hutool.http.HttpRequest; 7 | import cn.hutool.json.JSONArray; 8 | import cn.hutool.json.JSONObject; 9 | import cn.hutool.json.JSONUtil; 10 | import org.example.PetStore.utils.WeBASEUtils; 11 | import org.springframework.beans.factory.annotation.Autowired; 12 | import org.springframework.beans.factory.annotation.Value; 13 | import org.springframework.stereotype.Service; 14 | import java.math.BigInteger; 15 | import java.util.ArrayList; 16 | import java.util.List; 17 | 18 | @Service 19 | public class UserService { 20 | @Value("${system.contract.adoptionAddress}") 21 | String contractAddress; 22 | 23 | public static final String ABI = org.example.PetStore.utils.IOUtil.readResourceAsString("abi/Adoption.abi"); 24 | 25 | @Autowired 26 | WeBASEUtils weBASEUtils; 27 | public Dict register(String userAddress) { 28 | List funcParam = new ArrayList(); 29 | funcParam.add(userAddress); 30 | Dict result = weBASEUtils.commonReq(userAddress, "register", funcParam, ABI, "Adoption", contractAddress); 31 | JSONObject respBody = JSONUtil.parseObj(result.get("result")); 32 | String output = (String) respBody.get("output"); 33 | long resInt = HexUtil.hexToLong(output.substring(2)); 34 | result.set("result", resInt); 35 | return result; 36 | } 37 | public Dict login(String userAddress) { 38 | List funcParam = new ArrayList(); 39 | funcParam.add(userAddress); 40 | Dict result = weBASEUtils.commonReq(userAddress, "login", funcParam, ABI, "Adoption", contractAddress); 41 | JSONArray respBody = JSONUtil.parseArray(result.get("result")); 42 | if (respBody.size() > 0) { 43 | result.set("result", respBody.get(0)); 44 | } return result; 45 | } 46 | } -------------------------------------------------------------------------------- /PetStore/src/main/java/org/example/PetStore/utils/IOUtil.java: -------------------------------------------------------------------------------- 1 | package org.example.PetStore.utils; 2 | 3 | import lombok.extern.slf4j.Slf4j; 4 | 5 | import java.io.*; 6 | 7 | @Slf4j 8 | public class IOUtil { 9 | private IOUtil(){} 10 | 11 | private static final int BUF_SIZE = 2048; 12 | 13 | public static String readAsString(File file) throws IOException { 14 | try(InputStream in = new FileInputStream(file)){ 15 | ByteArrayOutputStream baos = new ByteArrayOutputStream(); 16 | copy(in, baos); 17 | return new String(baos.toByteArray()); 18 | } 19 | } 20 | 21 | public static String readResourceAsString(String resource){ 22 | ClassLoader classLoader = Thread.currentThread().getContextClassLoader(); 23 | try(InputStream in = classLoader.getResourceAsStream(resource)){ 24 | return readAsString(in); 25 | } 26 | catch (IOException ex){ 27 | log.error("Error reading resource",ex); 28 | return null; 29 | } 30 | } 31 | 32 | public static String readAsString(InputStream inputStream) throws IOException { 33 | ByteArrayOutputStream baos = new ByteArrayOutputStream(); 34 | copy(inputStream, baos); 35 | return new String(baos.toByteArray()); 36 | } 37 | 38 | public static void writeString(File target, String template) throws IOException{ 39 | ByteArrayInputStream baos = new ByteArrayInputStream(template.getBytes()); 40 | try(FileOutputStream fos = new FileOutputStream(target, false)){ 41 | copy(baos, fos); 42 | } 43 | } 44 | 45 | public static void copyFolder(File srcDir, final File destDir) throws IOException{ 46 | for(File f: srcDir.listFiles()){ 47 | File fileCopyTo = new File(destDir, f.getName()); 48 | if(!f.isDirectory()){ 49 | copyFile(f, fileCopyTo); 50 | } 51 | else{ 52 | if(!fileCopyTo.mkdirs()){ 53 | throw new IOException("Dir "+fileCopyTo.getAbsolutePath() + " create failed"); 54 | } 55 | copyFolder(f, fileCopyTo); 56 | } 57 | } 58 | 59 | } 60 | 61 | public static void copyFile(File src, File tgt) throws IOException{ 62 | try(FileInputStream fis = new FileInputStream(src); 63 | FileOutputStream fos = new FileOutputStream(tgt, false)){ 64 | copy(fis, fos); 65 | } 66 | } 67 | 68 | public static void copy(InputStream is, OutputStream os) throws IOException{ 69 | try(BufferedInputStream bis = new BufferedInputStream(is); BufferedOutputStream bos = new BufferedOutputStream(os)){ 70 | byte[] buf = new byte[BUF_SIZE]; 71 | int n; 72 | while ((n = bis.read(buf)) != -1){ 73 | bos.write(buf, 0, n); 74 | } 75 | bos.flush(); 76 | } 77 | } 78 | 79 | public static void removeItem(File item) { 80 | if(!item.isDirectory()){ 81 | item.delete(); 82 | return; 83 | } 84 | 85 | for(File subItem: item.listFiles()){ 86 | removeItem(subItem); 87 | } 88 | } 89 | } 90 | -------------------------------------------------------------------------------- /PetStore/src/main/java/org/example/PetStore/utils/WeBASEUtils.java: -------------------------------------------------------------------------------- 1 | package org.example.PetStore.utils; 2 | 3 | import cn.hutool.core.lang.Dict; 4 | import cn.hutool.http.Header; 5 | import cn.hutool.http.HttpRequest; 6 | import cn.hutool.json.JSONArray; 7 | import cn.hutool.json.JSONObject; 8 | import cn.hutool.json.JSONUtil; 9 | import org.springframework.stereotype.Service; 10 | import java.math.BigInteger; 11 | import java.util.List; 12 | 13 | @Service 14 | public class WeBASEUtils { 15 | public Dict commonReq(String userAddress, 16 | String funcName, 17 | List funcParam, 18 | String ABI, 19 | String contractName, 20 | String contractAddress) { 21 | JSONArray abiJSON = JSONUtil.parseArray(ABI); 22 | JSONObject data = JSONUtil.createObj(); 23 | data.set("groupId", "1"); 24 | data.set("user", userAddress); 25 | data.set("contractName", contractName); 26 | data.set("version", ""); 27 | data.set("funcName", funcName); 28 | data.set("funcParam", funcParam); 29 | data.set("contractAddress", contractAddress); 30 | data.set("contractAbi", abiJSON); 31 | data.set("useAes", false); 32 | data.set("useCns", false); 33 | data.set("cnsName", ""); 34 | String dataString = JSONUtil.toJsonStr(data); 35 | String responseBody = HttpRequest.post("192.168.56.128:5002/WeBASE-Front/trans/handle") 36 | .header(Header.CONTENT_TYPE, "application/json").body(dataString).execute().body(); 37 | Dict retDict = new Dict(); 38 | retDict.set("result", responseBody); 39 | return retDict; 40 | } 41 | } -------------------------------------------------------------------------------- /PetStore/src/main/resources/abi/Adoption.abi: -------------------------------------------------------------------------------- 1 | [{"constant":true,"inputs":[{"name":"user","type":"address"}],"name":"login","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getAdopters","outputs":[{"name":"","type":"address[8]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"adopters","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"user","type":"address"}],"name":"register","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"petId","type":"uint256"}],"name":"adopt","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"}] -------------------------------------------------------------------------------- /PetStore/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | ### Required, node's {ip:port} to connect. 2 | system.peers=192.168.56.128:20200 3 | ### Required 4 | system.groupId=1 5 | ### Optional. Default will search conf,config,src/main/conf/src/main/config 6 | system.certPath=conf,config,src/main/resources/conf,src/main/resources/config 7 | ### Optional. If don't specify a random private key will be used 8 | system.hexPrivateKey=2d495d03e4643fee042e691a355a88e33268519a8e04624c0875cced6b79f8a9 9 | ### Optional. Please fill this address if you want to use related service 10 | system.contract.adoptionAddress=0xf4e6f73334965efe27f79918b00f9e0f9e7958ed 11 | ### ### Springboot server config 12 | server.port=8080 13 | server.session.timeout=60 14 | banner.charset=UTF-8 15 | spring.jackson.date-format=yyyy-MM-dd HH:mm:ss 16 | spring.jackson.time-zone=GMT+8 17 | -------------------------------------------------------------------------------- /PetStore/src/main/resources/banner.txt: -------------------------------------------------------------------------------- 1 | vdghccgh -------------------------------------------------------------------------------- /PetStore/src/main/resources/bin/ecc/Adoption.bin: -------------------------------------------------------------------------------- 1 | 608060405234801561001057600080fd5b5060008060006101000a81548160ff021916908360ff1602179055506105c28061003b6000396000f30060806040526004361061006d576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806335a6861a146100725780633de4eb17146100cf57806343ae80d3146101225780634420e4861461018f5780638588b2c5146101ec575b600080fd5b34801561007e57600080fd5b506100b3600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061022d565b604051808260ff1660ff16815260200191505060405180910390f35b3480156100db57600080fd5b506100e4610283565b6040518082600860200280838360005b8381101561010f5780820151818401526020810190506100f4565b5050505090500191505060405180910390f35b34801561012e57600080fd5b5061014d60048036038101908080359060200190929190505050610304565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561019b57600080fd5b506101d0600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610339565b604051808260ff1660ff16815260200191505060405180910390f35b3480156101f857600080fd5b5061021760048036038101908080359060200190929190505050610494565b6040518082815260200191505060405180910390f35b6000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050919050565b61028b610572565b60026008806020026040519081016040528092919082600880156102fa576020028201915b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190600101908083116102b0575b5050505050905090565b60028160088110151561031357fe5b016000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1660ff1611156103e657600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905061048f565b60008081819054906101000a900460ff168092919060010191906101000a81548160ff021916908360ff160217905550506000809054906101000a900460ff16600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908360ff1602179055506000809054906101000a900460ff1690505b919050565b600080600083101580156104a9575060078311155b15156104b457600080fd5b61019490506000600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1660ff1614156105195780915061056c565b3360028460088110151561052957fe5b0160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508291505b50919050565b610100604051908101604052806008906020820280388339808201915050905050905600a165627a7a723058206533a0a379ddbd3575b612c9c9551165226222b8800f7a2ca0ba93db0353d91f0029 -------------------------------------------------------------------------------- /PetStore/src/main/resources/conf/ca.crt: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIBvzCCAWSgAwIBAgIUdj53y2g118ogV8sCKMQKWZMNqUcwCgYIKoZIzj0EAwIw 3 | NTEOMAwGA1UEAwwFY2hhaW4xEzARBgNVBAoMCmZpc2NvLWJjb3MxDjAMBgNVBAsM 4 | BWNoYWluMCAXDTIyMDMwNjA1NDgzMVoYDzIxMjIwMjEwMDU0ODMxWjA1MQ4wDAYD 5 | VQQDDAVjaGFpbjETMBEGA1UECgwKZmlzY28tYmNvczEOMAwGA1UECwwFY2hhaW4w 6 | VjAQBgcqhkjOPQIBBgUrgQQACgNCAARC2z0RyRR645SDMMWDBl3dD3jU1ni2ehds 7 | DZue0Yus+iUL8f/SwdvfT4AKNcJuH1Bgpzli8wj02jBfwWwPSqn8o1MwUTAdBgNV 8 | HQ4EFgQUhE6cWOox460xHdhzC+RQvBUql+owHwYDVR0jBBgwFoAUhE6cWOox460x 9 | HdhzC+RQvBUql+owDwYDVR0TAQH/BAUwAwEB/zAKBggqhkjOPQQDAgNJADBGAiEA 10 | qp3vs8O6uaNmZ7KIHsR692mQXaehX0ARV/wZuwgGN1UCIQCSLho16lX0w4yhp/dt 11 | fn8hfrvsqUpyAc3YRY0KVJsFkA== 12 | -----END CERTIFICATE----- 13 | -------------------------------------------------------------------------------- /PetStore/src/main/resources/conf/sdk.crt: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIBhDCCASmgAwIBAgIUSXb1aIvELDPR7xfD/SBvWGX9WHQwCgYIKoZIzj0EAwIw 3 | NzEPMA0GA1UEAwwGYWdlbmN5MRMwEQYDVQQKDApmaXNjby1iY29zMQ8wDQYDVQQL 4 | DAZhZ2VuY3kwIBcNMjIwMzA2MDU0ODMyWhgPMjEyMjAyMTAwNTQ4MzJaMDExDDAK 5 | BgNVBAMMA3NkazETMBEGA1UECgwKZmlzY28tYmNvczEMMAoGA1UECwwDc2RrMFYw 6 | EAYHKoZIzj0CAQYFK4EEAAoDQgAESYh5pnfQTm/V4Zev0p909TLPxal0n5AyzM8V 7 | zKH9YDMlNcNHunWfcqr0no0Qcd1MIjFGKQN6pRTcIckesE6DsKMaMBgwCQYDVR0T 8 | BAIwADALBgNVHQ8EBAMCBeAwCgYIKoZIzj0EAwIDSQAwRgIhANsTe+ChBXTsSPtk 9 | GEbX4c02ppe03JQpQlDQr8VwMdlzAiEApcNdGRtuVUuLf4JoQyu1rfbGUBWS8T6b 10 | o07DiiF37ZE= 11 | -----END CERTIFICATE----- 12 | -----BEGIN CERTIFICATE----- 13 | MIIBezCCASGgAwIBAgIUQnL50GMHwkKtdkmBLbIa7NUYtMcwCgYIKoZIzj0EAwIw 14 | NTEOMAwGA1UEAwwFY2hhaW4xEzARBgNVBAoMCmZpc2NvLWJjb3MxDjAMBgNVBAsM 15 | BWNoYWluMB4XDTIyMDMwNjA1NDgzMVoXDTMyMDMwMzA1NDgzMVowNzEPMA0GA1UE 16 | AwwGYWdlbmN5MRMwEQYDVQQKDApmaXNjby1iY29zMQ8wDQYDVQQLDAZhZ2VuY3kw 17 | VjAQBgcqhkjOPQIBBgUrgQQACgNCAASGzxUtd+KhCiUGFule9jrjURD66vjw7TUe 18 | VFvsgVbeufGjiY7UBgLWOUY1aIm+wPa+vSnriqEEowODT6Ih3I9zoxAwDjAMBgNV 19 | HRMEBTADAQH/MAoGCCqGSM49BAMCA0gAMEUCIDVaZ2f9yiBadVyqKX0lUJ+tca/Z 20 | putRJ9n30BByly+wAiEAkQrZUWfOgblWFPixH6PHn7hwy1mLcUzibdws267uJOk= 21 | -----END CERTIFICATE----- 22 | -----BEGIN CERTIFICATE----- 23 | MIIBvzCCAWSgAwIBAgIUdj53y2g118ogV8sCKMQKWZMNqUcwCgYIKoZIzj0EAwIw 24 | NTEOMAwGA1UEAwwFY2hhaW4xEzARBgNVBAoMCmZpc2NvLWJjb3MxDjAMBgNVBAsM 25 | BWNoYWluMCAXDTIyMDMwNjA1NDgzMVoYDzIxMjIwMjEwMDU0ODMxWjA1MQ4wDAYD 26 | VQQDDAVjaGFpbjETMBEGA1UECgwKZmlzY28tYmNvczEOMAwGA1UECwwFY2hhaW4w 27 | VjAQBgcqhkjOPQIBBgUrgQQACgNCAARC2z0RyRR645SDMMWDBl3dD3jU1ni2ehds 28 | DZue0Yus+iUL8f/SwdvfT4AKNcJuH1Bgpzli8wj02jBfwWwPSqn8o1MwUTAdBgNV 29 | HQ4EFgQUhE6cWOox460xHdhzC+RQvBUql+owHwYDVR0jBBgwFoAUhE6cWOox460x 30 | HdhzC+RQvBUql+owDwYDVR0TAQH/BAUwAwEB/zAKBggqhkjOPQQDAgNJADBGAiEA 31 | qp3vs8O6uaNmZ7KIHsR692mQXaehX0ARV/wZuwgGN1UCIQCSLho16lX0w4yhp/dt 32 | fn8hfrvsqUpyAc3YRY0KVJsFkA== 33 | -----END CERTIFICATE----- 34 | -------------------------------------------------------------------------------- /PetStore/src/main/resources/conf/sdk.key: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIGEAgEAMBAGByqGSM49AgEGBSuBBAAKBG0wawIBAQQgPIKzFUFbgSBob9DNYajQ 3 | 178mbbML/kl5uRiX3uqPSzahRANCAARJiHmmd9BOb9Xhl6/Sn3T1Ms/FqXSfkDLM 4 | zxXMof1gMyU1w0e6dZ9yqvSejRBx3UwiMUYpA3qlFNwhyR6wToOw 5 | -----END PRIVATE KEY----- 6 | -------------------------------------------------------------------------------- /PetStore/src/test/java/org/example/PetStore/DemoPkey.java: -------------------------------------------------------------------------------- 1 | package org.example.PetStore; 2 | 3 | import org.fisco.bcos.sdk.BcosSDK; 4 | import org.fisco.bcos.sdk.client.Client; 5 | import org.fisco.bcos.sdk.client.protocol.response.BlockNumber; 6 | import org.fisco.bcos.sdk.crypto.keypair.CryptoKeyPair; 7 | import org.fisco.bcos.sdk.crypto.keypair.ECDSAKeyPair; 8 | import org.fisco.bcos.sdk.crypto.keypair.SM2KeyPair; 9 | import org.junit.Test; 10 | 11 | public class DemoPkey { 12 | 13 | @Test 14 | public void keyGeneration() throws Exception { 15 | //ECDSA key generation 16 | CryptoKeyPair ecdsaKeyPair = new ECDSAKeyPair().generateKeyPair(); 17 | System.out.println("ecdsa private key :"+ecdsaKeyPair.getHexPrivateKey()); 18 | System.out.println("ecdsa public key :"+ecdsaKeyPair.getHexPublicKey()); 19 | System.out.println("ecdsa address :"+ecdsaKeyPair.getAddress()); 20 | //SM2 key generation 21 | CryptoKeyPair sm2KeyPair = new SM2KeyPair().generateKeyPair(); 22 | System.out.println("sm2 private key :"+sm2KeyPair.getHexPrivateKey()); 23 | System.out.println("sm2 public key :"+sm2KeyPair.getHexPublicKey()); 24 | System.out.println("sm2 address :"+sm2KeyPair.getAddress()); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /PetStore/target/classes/abi/Adoption.abi: -------------------------------------------------------------------------------- 1 | [{"constant":true,"inputs":[{"name":"user","type":"address"}],"name":"login","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getAdopters","outputs":[{"name":"","type":"address[8]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"adopters","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"user","type":"address"}],"name":"register","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"petId","type":"uint256"}],"name":"adopt","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"}] -------------------------------------------------------------------------------- /PetStore/target/classes/application.properties: -------------------------------------------------------------------------------- 1 | ### Required, node's {ip:port} to connect. 2 | system.peers=192.168.56.128:20200 3 | ### Required 4 | system.groupId=1 5 | ### Optional. Default will search conf,config,src/main/conf/src/main/config 6 | system.certPath=conf,config,src/main/resources/conf,src/main/resources/config 7 | ### Optional. If don't specify a random private key will be used 8 | system.hexPrivateKey=2d495d03e4643fee042e691a355a88e33268519a8e04624c0875cced6b79f8a9 9 | ### Optional. Please fill this address if you want to use related service 10 | system.contract.adoptionAddress=0xf4e6f73334965efe27f79918b00f9e0f9e7958ed 11 | ### ### Springboot server config 12 | server.port=8080 13 | server.session.timeout=60 14 | banner.charset=UTF-8 15 | spring.jackson.date-format=yyyy-MM-dd HH:mm:ss 16 | spring.jackson.time-zone=GMT+8 17 | -------------------------------------------------------------------------------- /PetStore/target/classes/bin/ecc/Adoption.bin: -------------------------------------------------------------------------------- 1 | 608060405234801561001057600080fd5b5060008060006101000a81548160ff021916908360ff1602179055506105c28061003b6000396000f30060806040526004361061006d576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806335a6861a146100725780633de4eb17146100cf57806343ae80d3146101225780634420e4861461018f5780638588b2c5146101ec575b600080fd5b34801561007e57600080fd5b506100b3600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061022d565b604051808260ff1660ff16815260200191505060405180910390f35b3480156100db57600080fd5b506100e4610283565b6040518082600860200280838360005b8381101561010f5780820151818401526020810190506100f4565b5050505090500191505060405180910390f35b34801561012e57600080fd5b5061014d60048036038101908080359060200190929190505050610304565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561019b57600080fd5b506101d0600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610339565b604051808260ff1660ff16815260200191505060405180910390f35b3480156101f857600080fd5b5061021760048036038101908080359060200190929190505050610494565b6040518082815260200191505060405180910390f35b6000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050919050565b61028b610572565b60026008806020026040519081016040528092919082600880156102fa576020028201915b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190600101908083116102b0575b5050505050905090565b60028160088110151561031357fe5b016000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1660ff1611156103e657600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905061048f565b60008081819054906101000a900460ff168092919060010191906101000a81548160ff021916908360ff160217905550506000809054906101000a900460ff16600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908360ff1602179055506000809054906101000a900460ff1690505b919050565b600080600083101580156104a9575060078311155b15156104b457600080fd5b61019490506000600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1660ff1614156105195780915061056c565b3360028460088110151561052957fe5b0160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508291505b50919050565b610100604051908101604052806008906020820280388339808201915050905050905600a165627a7a723058206533a0a379ddbd3575b612c9c9551165226222b8800f7a2ca0ba93db0353d91f0029 -------------------------------------------------------------------------------- /PetStore/target/classes/conf/ca.crt: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIBvzCCAWSgAwIBAgIUdj53y2g118ogV8sCKMQKWZMNqUcwCgYIKoZIzj0EAwIw 3 | NTEOMAwGA1UEAwwFY2hhaW4xEzARBgNVBAoMCmZpc2NvLWJjb3MxDjAMBgNVBAsM 4 | BWNoYWluMCAXDTIyMDMwNjA1NDgzMVoYDzIxMjIwMjEwMDU0ODMxWjA1MQ4wDAYD 5 | VQQDDAVjaGFpbjETMBEGA1UECgwKZmlzY28tYmNvczEOMAwGA1UECwwFY2hhaW4w 6 | VjAQBgcqhkjOPQIBBgUrgQQACgNCAARC2z0RyRR645SDMMWDBl3dD3jU1ni2ehds 7 | DZue0Yus+iUL8f/SwdvfT4AKNcJuH1Bgpzli8wj02jBfwWwPSqn8o1MwUTAdBgNV 8 | HQ4EFgQUhE6cWOox460xHdhzC+RQvBUql+owHwYDVR0jBBgwFoAUhE6cWOox460x 9 | HdhzC+RQvBUql+owDwYDVR0TAQH/BAUwAwEB/zAKBggqhkjOPQQDAgNJADBGAiEA 10 | qp3vs8O6uaNmZ7KIHsR692mQXaehX0ARV/wZuwgGN1UCIQCSLho16lX0w4yhp/dt 11 | fn8hfrvsqUpyAc3YRY0KVJsFkA== 12 | -----END CERTIFICATE----- 13 | -------------------------------------------------------------------------------- /PetStore/target/classes/conf/sdk.crt: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIBhDCCASmgAwIBAgIUSXb1aIvELDPR7xfD/SBvWGX9WHQwCgYIKoZIzj0EAwIw 3 | NzEPMA0GA1UEAwwGYWdlbmN5MRMwEQYDVQQKDApmaXNjby1iY29zMQ8wDQYDVQQL 4 | DAZhZ2VuY3kwIBcNMjIwMzA2MDU0ODMyWhgPMjEyMjAyMTAwNTQ4MzJaMDExDDAK 5 | BgNVBAMMA3NkazETMBEGA1UECgwKZmlzY28tYmNvczEMMAoGA1UECwwDc2RrMFYw 6 | EAYHKoZIzj0CAQYFK4EEAAoDQgAESYh5pnfQTm/V4Zev0p909TLPxal0n5AyzM8V 7 | zKH9YDMlNcNHunWfcqr0no0Qcd1MIjFGKQN6pRTcIckesE6DsKMaMBgwCQYDVR0T 8 | BAIwADALBgNVHQ8EBAMCBeAwCgYIKoZIzj0EAwIDSQAwRgIhANsTe+ChBXTsSPtk 9 | GEbX4c02ppe03JQpQlDQr8VwMdlzAiEApcNdGRtuVUuLf4JoQyu1rfbGUBWS8T6b 10 | o07DiiF37ZE= 11 | -----END CERTIFICATE----- 12 | -----BEGIN CERTIFICATE----- 13 | MIIBezCCASGgAwIBAgIUQnL50GMHwkKtdkmBLbIa7NUYtMcwCgYIKoZIzj0EAwIw 14 | NTEOMAwGA1UEAwwFY2hhaW4xEzARBgNVBAoMCmZpc2NvLWJjb3MxDjAMBgNVBAsM 15 | BWNoYWluMB4XDTIyMDMwNjA1NDgzMVoXDTMyMDMwMzA1NDgzMVowNzEPMA0GA1UE 16 | AwwGYWdlbmN5MRMwEQYDVQQKDApmaXNjby1iY29zMQ8wDQYDVQQLDAZhZ2VuY3kw 17 | VjAQBgcqhkjOPQIBBgUrgQQACgNCAASGzxUtd+KhCiUGFule9jrjURD66vjw7TUe 18 | VFvsgVbeufGjiY7UBgLWOUY1aIm+wPa+vSnriqEEowODT6Ih3I9zoxAwDjAMBgNV 19 | HRMEBTADAQH/MAoGCCqGSM49BAMCA0gAMEUCIDVaZ2f9yiBadVyqKX0lUJ+tca/Z 20 | putRJ9n30BByly+wAiEAkQrZUWfOgblWFPixH6PHn7hwy1mLcUzibdws267uJOk= 21 | -----END CERTIFICATE----- 22 | -----BEGIN CERTIFICATE----- 23 | MIIBvzCCAWSgAwIBAgIUdj53y2g118ogV8sCKMQKWZMNqUcwCgYIKoZIzj0EAwIw 24 | NTEOMAwGA1UEAwwFY2hhaW4xEzARBgNVBAoMCmZpc2NvLWJjb3MxDjAMBgNVBAsM 25 | BWNoYWluMCAXDTIyMDMwNjA1NDgzMVoYDzIxMjIwMjEwMDU0ODMxWjA1MQ4wDAYD 26 | VQQDDAVjaGFpbjETMBEGA1UECgwKZmlzY28tYmNvczEOMAwGA1UECwwFY2hhaW4w 27 | VjAQBgcqhkjOPQIBBgUrgQQACgNCAARC2z0RyRR645SDMMWDBl3dD3jU1ni2ehds 28 | DZue0Yus+iUL8f/SwdvfT4AKNcJuH1Bgpzli8wj02jBfwWwPSqn8o1MwUTAdBgNV 29 | HQ4EFgQUhE6cWOox460xHdhzC+RQvBUql+owHwYDVR0jBBgwFoAUhE6cWOox460x 30 | HdhzC+RQvBUql+owDwYDVR0TAQH/BAUwAwEB/zAKBggqhkjOPQQDAgNJADBGAiEA 31 | qp3vs8O6uaNmZ7KIHsR692mQXaehX0ARV/wZuwgGN1UCIQCSLho16lX0w4yhp/dt 32 | fn8hfrvsqUpyAc3YRY0KVJsFkA== 33 | -----END CERTIFICATE----- 34 | -------------------------------------------------------------------------------- /PetStore/target/classes/conf/sdk.key: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIGEAgEAMBAGByqGSM49AgEGBSuBBAAKBG0wawIBAQQgPIKzFUFbgSBob9DNYajQ 3 | 178mbbML/kl5uRiX3uqPSzahRANCAARJiHmmd9BOb9Xhl6/Sn3T1Ms/FqXSfkDLM 4 | zxXMof1gMyU1w0e6dZ9yqvSejRBx3UwiMUYpA3qlFNwhyR6wToOw 5 | -----END PRIVATE KEY----- 6 | -------------------------------------------------------------------------------- /PetStore/target/classes/org/example/PetStore/Application.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenguowei10086/QKL-QHD/e8f04decfd8cc51111970405d309adf3ae3745cb/PetStore/target/classes/org/example/PetStore/Application.class -------------------------------------------------------------------------------- /PetStore/target/classes/org/example/PetStore/config/ContractConfig.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenguowei10086/QKL-QHD/e8f04decfd8cc51111970405d309adf3ae3745cb/PetStore/target/classes/org/example/PetStore/config/ContractConfig.class -------------------------------------------------------------------------------- /PetStore/target/classes/org/example/PetStore/config/SdkBeanConfig.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenguowei10086/QKL-QHD/e8f04decfd8cc51111970405d309adf3ae3745cb/PetStore/target/classes/org/example/PetStore/config/SdkBeanConfig.class -------------------------------------------------------------------------------- /PetStore/target/classes/org/example/PetStore/config/SwaggerConfig.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenguowei10086/QKL-QHD/e8f04decfd8cc51111970405d309adf3ae3745cb/PetStore/target/classes/org/example/PetStore/config/SwaggerConfig.class -------------------------------------------------------------------------------- /PetStore/target/classes/org/example/PetStore/config/SystemConfig.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenguowei10086/QKL-QHD/e8f04decfd8cc51111970405d309adf3ae3745cb/PetStore/target/classes/org/example/PetStore/config/SystemConfig.class -------------------------------------------------------------------------------- /PetStore/target/classes/org/example/PetStore/controller/MyAdoptionController.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenguowei10086/QKL-QHD/e8f04decfd8cc51111970405d309adf3ae3745cb/PetStore/target/classes/org/example/PetStore/controller/MyAdoptionController.class -------------------------------------------------------------------------------- /PetStore/target/classes/org/example/PetStore/controller/UserController.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenguowei10086/QKL-QHD/e8f04decfd8cc51111970405d309adf3ae3745cb/PetStore/target/classes/org/example/PetStore/controller/UserController.class -------------------------------------------------------------------------------- /PetStore/target/classes/org/example/PetStore/model/CommonResponse.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenguowei10086/QKL-QHD/e8f04decfd8cc51111970405d309adf3ae3745cb/PetStore/target/classes/org/example/PetStore/model/CommonResponse.class -------------------------------------------------------------------------------- /PetStore/target/classes/org/example/PetStore/model/bo/AdoptionAdoptInputBO.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenguowei10086/QKL-QHD/e8f04decfd8cc51111970405d309adf3ae3745cb/PetStore/target/classes/org/example/PetStore/model/bo/AdoptionAdoptInputBO.class -------------------------------------------------------------------------------- /PetStore/target/classes/org/example/PetStore/model/bo/AdoptionAdoptersInputBO.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenguowei10086/QKL-QHD/e8f04decfd8cc51111970405d309adf3ae3745cb/PetStore/target/classes/org/example/PetStore/model/bo/AdoptionAdoptersInputBO.class -------------------------------------------------------------------------------- /PetStore/target/classes/org/example/PetStore/model/bo/AdoptionLoginInputBO.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenguowei10086/QKL-QHD/e8f04decfd8cc51111970405d309adf3ae3745cb/PetStore/target/classes/org/example/PetStore/model/bo/AdoptionLoginInputBO.class -------------------------------------------------------------------------------- /PetStore/target/classes/org/example/PetStore/model/bo/AdoptionRegisterInputBO.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenguowei10086/QKL-QHD/e8f04decfd8cc51111970405d309adf3ae3745cb/PetStore/target/classes/org/example/PetStore/model/bo/AdoptionRegisterInputBO.class -------------------------------------------------------------------------------- /PetStore/target/classes/org/example/PetStore/raw/Adoption.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenguowei10086/QKL-QHD/e8f04decfd8cc51111970405d309adf3ae3745cb/PetStore/target/classes/org/example/PetStore/raw/Adoption.class -------------------------------------------------------------------------------- /PetStore/target/classes/org/example/PetStore/service/AdoptionService.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenguowei10086/QKL-QHD/e8f04decfd8cc51111970405d309adf3ae3745cb/PetStore/target/classes/org/example/PetStore/service/AdoptionService.class -------------------------------------------------------------------------------- /PetStore/target/classes/org/example/PetStore/service/MyAdoptionService.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenguowei10086/QKL-QHD/e8f04decfd8cc51111970405d309adf3ae3745cb/PetStore/target/classes/org/example/PetStore/service/MyAdoptionService.class -------------------------------------------------------------------------------- /PetStore/target/classes/org/example/PetStore/service/ServiceManager.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenguowei10086/QKL-QHD/e8f04decfd8cc51111970405d309adf3ae3745cb/PetStore/target/classes/org/example/PetStore/service/ServiceManager.class -------------------------------------------------------------------------------- /PetStore/target/classes/org/example/PetStore/service/UserService.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenguowei10086/QKL-QHD/e8f04decfd8cc51111970405d309adf3ae3745cb/PetStore/target/classes/org/example/PetStore/service/UserService.class -------------------------------------------------------------------------------- /PetStore/target/classes/org/example/PetStore/utils/IOUtil.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenguowei10086/QKL-QHD/e8f04decfd8cc51111970405d309adf3ae3745cb/PetStore/target/classes/org/example/PetStore/utils/IOUtil.class -------------------------------------------------------------------------------- /PetStore/target/classes/org/example/PetStore/utils/MyAdoptionController.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenguowei10086/QKL-QHD/e8f04decfd8cc51111970405d309adf3ae3745cb/PetStore/target/classes/org/example/PetStore/utils/MyAdoptionController.class -------------------------------------------------------------------------------- /PetStore/target/classes/org/example/PetStore/utils/WeBASEUtils.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenguowei10086/QKL-QHD/e8f04decfd8cc51111970405d309adf3ae3745cb/PetStore/target/classes/org/example/PetStore/utils/WeBASEUtils.class -------------------------------------------------------------------------------- /PetStore/target/test-classes/org/example/PetStore/DemoPkey.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenguowei10086/QKL-QHD/e8f04decfd8cc51111970405d309adf3ae3745cb/PetStore/target/test-classes/org/example/PetStore/DemoPkey.class -------------------------------------------------------------------------------- /pet-store-init-front-master/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | /dist 4 | 5 | 6 | # local env files 7 | .env.local 8 | .env.*.local 9 | 10 | # Log files 11 | npm-debug.log* 12 | yarn-debug.log* 13 | yarn-error.log* 14 | pnpm-debug.log* 15 | 16 | # Editor directories and files 17 | .idea 18 | .vscode 19 | *.suo 20 | *.ntvs* 21 | *.njsproj 22 | *.sln 23 | *.sw? 24 | *.zip 25 | -------------------------------------------------------------------------------- /pet-store-init-front-master/README.md: -------------------------------------------------------------------------------- 1 | # pet-store-init 2 | 3 | ## Project setup 4 | ``` 5 | npm install 6 | ``` 7 | 8 | ### Compiles and hot-reloads for development 9 | ``` 10 | npm run serve 11 | ``` 12 | 13 | ### Compiles and minifies for production 14 | ``` 15 | npm run build 16 | ``` 17 | 18 | ### Lints and fixes files 19 | ``` 20 | npm run lint 21 | ``` 22 | 23 | ### Customize configuration 24 | See [Configuration Reference](https://cli.vuejs.org/config/). 25 | -------------------------------------------------------------------------------- /pet-store-init-front-master/babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: [ 3 | '@vue/cli-plugin-babel/preset' 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /pet-store-init-front-master/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "operator-front", 3 | "version": "0.1.0", 4 | "private": true, 5 | "scripts": { 6 | "serve": "vue-cli-service serve", 7 | "build": "vue-cli-service build", 8 | "lint": "vue-cli-service lint" 9 | }, 10 | "dependencies": { 11 | "axios": "^0.21.1", 12 | "core-js": "^3.6.5", 13 | "element-ui": "^2.15.1", 14 | "vue": "^2.6.11", 15 | "vue-axios": "^3.2.4", 16 | "vue-cookies": "^1.7.4", 17 | "vue-json-views": "^1.3.0", 18 | "vue-router": "^3.5.1" 19 | }, 20 | "devDependencies": { 21 | "@vue/cli-plugin-babel": "~4.5.0", 22 | "@vue/cli-plugin-eslint": "~4.5.0", 23 | "@vue/cli-service": "~4.5.0", 24 | "babel-eslint": "^10.1.0", 25 | "eslint": "^6.7.2", 26 | "eslint-plugin-vue": "^6.2.2", 27 | "vue-template-compiler": "^2.6.11" 28 | }, 29 | "eslintConfig": { 30 | "root": true, 31 | "env": { 32 | "node": true 33 | }, 34 | "extends": [ 35 | "plugin:vue/essential", 36 | "eslint:recommended" 37 | ], 38 | "parserOptions": { 39 | "parser": "babel-eslint" 40 | }, 41 | "rules": {} 42 | }, 43 | "browserslist": [ 44 | "> 1%", 45 | "last 2 versions", 46 | "not dead" 47 | ] 48 | } 49 | -------------------------------------------------------------------------------- /pet-store-init-front-master/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenguowei10086/QKL-QHD/e8f04decfd8cc51111970405d309adf3ae3745cb/pet-store-init-front-master/public/favicon.ico -------------------------------------------------------------------------------- /pet-store-init-front-master/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | <%= htmlWebpackPlugin.options.title %> 9 | 10 | 11 | 14 |
15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /pet-store-init-front-master/src/App.vue: -------------------------------------------------------------------------------- 1 | 7 | 8 | 18 | 19 | 32 | -------------------------------------------------------------------------------- /pet-store-init-front-master/src/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenguowei10086/QKL-QHD/e8f04decfd8cc51111970405d309adf3ae3745cb/pet-store-init-front-master/src/assets/logo.png -------------------------------------------------------------------------------- /pet-store-init-front-master/src/assets/博美.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenguowei10086/QKL-QHD/e8f04decfd8cc51111970405d309adf3ae3745cb/pet-store-init-front-master/src/assets/博美.png -------------------------------------------------------------------------------- /pet-store-init-front-master/src/assets/哈士奇.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenguowei10086/QKL-QHD/e8f04decfd8cc51111970405d309adf3ae3745cb/pet-store-init-front-master/src/assets/哈士奇.png -------------------------------------------------------------------------------- /pet-store-init-front-master/src/assets/拉布拉多.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenguowei10086/QKL-QHD/e8f04decfd8cc51111970405d309adf3ae3745cb/pet-store-init-front-master/src/assets/拉布拉多.png -------------------------------------------------------------------------------- /pet-store-init-front-master/src/assets/柴犬.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenguowei10086/QKL-QHD/e8f04decfd8cc51111970405d309adf3ae3745cb/pet-store-init-front-master/src/assets/柴犬.png -------------------------------------------------------------------------------- /pet-store-init-front-master/src/assets/法斗.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenguowei10086/QKL-QHD/e8f04decfd8cc51111970405d309adf3ae3745cb/pet-store-init-front-master/src/assets/法斗.png -------------------------------------------------------------------------------- /pet-store-init-front-master/src/assets/萨摩.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenguowei10086/QKL-QHD/e8f04decfd8cc51111970405d309adf3ae3745cb/pet-store-init-front-master/src/assets/萨摩.png -------------------------------------------------------------------------------- /pet-store-init-front-master/src/assets/边牧.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenguowei10086/QKL-QHD/e8f04decfd8cc51111970405d309adf3ae3745cb/pet-store-init-front-master/src/assets/边牧.png -------------------------------------------------------------------------------- /pet-store-init-front-master/src/assets/金毛.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenguowei10086/QKL-QHD/e8f04decfd8cc51111970405d309adf3ae3745cb/pet-store-init-front-master/src/assets/金毛.png -------------------------------------------------------------------------------- /pet-store-init-front-master/src/components/Navigator.vue: -------------------------------------------------------------------------------- 1 | 13 | 14 | 35 | 36 | -------------------------------------------------------------------------------- /pet-store-init-front-master/src/config.js: -------------------------------------------------------------------------------- 1 | 2 | export default { 3 | // base_url : 'http://127.0.0.1' 4 | base_url : 'http://192.168.205.131' 5 | } -------------------------------------------------------------------------------- /pet-store-init-front-master/src/frame/BaseFrame.vue: -------------------------------------------------------------------------------- 1 | 7 | 8 | 13 | 14 | -------------------------------------------------------------------------------- /pet-store-init-front-master/src/main.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import ElementUI from 'element-ui'; 3 | import 'element-ui/lib/theme-chalk/index.css'; 4 | import VueRouter from 'vue-router' 5 | import routes from './router' 6 | import axios from "axios"; 7 | import VueAxios from 'vue-axios' 8 | import App from './App.vue' 9 | import VueCookies from 'vue-cookies' 10 | axios.defaults.baseURL='/api' 11 | // axios.defaults.baseURL='http://127.0.0.1:5003' 12 | Vue.use(ElementUI); 13 | Vue.use(VueRouter); 14 | Vue.use(VueAxios, axios); 15 | Vue.use(VueCookies) 16 | Vue.config.productionTip = false 17 | 18 | const router = new VueRouter({ 19 | routes 20 | }) 21 | 22 | new Vue({ 23 | router: router, 24 | render: h => h(App), 25 | }).$mount('#app') 26 | -------------------------------------------------------------------------------- /pet-store-init-front-master/src/router.js: -------------------------------------------------------------------------------- 1 | import Home2 from '@/views/Home'; 2 | import Login from '@/views/Login'; 3 | import Register from '@/views/Register' 4 | import Adoption from "@/views/Adoption"; 5 | 6 | 7 | export default [ 8 | { 9 | path: '/', 10 | redirect: '/home' 11 | }, 12 | { 13 | path:'/home', 14 | component: Home2 15 | }, 16 | { 17 | path:'/login', 18 | component: Login 19 | }, 20 | { 21 | path: '/register', 22 | component: Register 23 | }, 24 | { 25 | path: '/adoption', 26 | component: Adoption 27 | } 28 | 29 | ] -------------------------------------------------------------------------------- /pet-store-init-front-master/src/utils/axios.js: -------------------------------------------------------------------------------- 1 | const VueAxios = { 2 | vm: {}, 3 | // eslint-disable-next-line no-unused-vars 4 | install (Vue, instance) { 5 | if (this.installed) { 6 | return 7 | } 8 | this.installed = true 9 | 10 | if (!instance) { 11 | // eslint-disable-next-line no-console 12 | console.error('You have to install axios') 13 | return 14 | } 15 | 16 | Vue.axios = instance 17 | 18 | Object.defineProperties(Vue.prototype, { 19 | axios: { 20 | get: function get () { 21 | return instance 22 | } 23 | }, 24 | $http: { 25 | get: function get () { 26 | return instance 27 | } 28 | } 29 | }) 30 | } 31 | } 32 | 33 | export { 34 | VueAxios 35 | } 36 | -------------------------------------------------------------------------------- /pet-store-init-front-master/src/views/Adoption.vue: -------------------------------------------------------------------------------- 1 | 33 | 34 | 135 | 136 | -------------------------------------------------------------------------------- /pet-store-init-front-master/src/views/Home.vue: -------------------------------------------------------------------------------- 1 | 137 | 138 | 188 | 189 | -------------------------------------------------------------------------------- /pet-store-init-front-master/src/views/Login.vue: -------------------------------------------------------------------------------- 1 | 24 | 25 | 51 | 52 | -------------------------------------------------------------------------------- /pet-store-init-front-master/src/views/Register.vue: -------------------------------------------------------------------------------- 1 | 24 | 25 | 52 | 53 | -------------------------------------------------------------------------------- /pet-store-init-front-master/vue.config.js: -------------------------------------------------------------------------------- 1 | const vueConfig = { 2 | devServer: { 3 | // development server port 8000 4 | port: 8020, 5 | // If you want to turn on the proxy, please remove the mockjs /src/main.jsL11 6 | proxy: { 7 | '/api': { 8 | //target: 'http://383a25k854.qicp.vip/', 9 | //target: 'http://cxzme.com:58081/', 10 | target: 'http://192.168.205.131:8080/', 11 | // target: 'http://localhost:8080/', 12 | changeOrigin: true, 13 | pathRewrite: { 14 | '^/api': '/' 15 | } 16 | } 17 | } 18 | } 19 | } 20 | module.exports = vueConfig --------------------------------------------------------------------------------