Browse Source

首次提交

qiubo 4 years ago
commit
de4aedafbf
100 changed files with 6018 additions and 0 deletions
  1. 29 0
      carbon-bank-service/.gitignore
  2. 114 0
      carbon-bank-service/.mvn/wrapper/MavenWrapperDownloader.java
  3. BIN
      carbon-bank-service/.mvn/wrapper/maven-wrapper.jar
  4. 1 0
      carbon-bank-service/.mvn/wrapper/maven-wrapper.properties
  5. 14 0
      carbon-bank-service/cqrcb.md
  6. 286 0
      carbon-bank-service/mvnw
  7. 161 0
      carbon-bank-service/mvnw.cmd
  8. 272 0
      carbon-bank-service/pom.xml
  9. 28 0
      carbon-bank-service/src/main/java/com/hcloud/microserver/bank/CarbonManagerServiceApplication.java
  10. 14 0
      carbon-bank-service/src/main/java/com/hcloud/microserver/bank/bo/BankLoginUserReqParam.java
  11. 9 0
      carbon-bank-service/src/main/java/com/hcloud/microserver/bank/bo/BankLoginUserRespBO.java
  12. 18 0
      carbon-bank-service/src/main/java/com/hcloud/microserver/bank/bo/BankQueryBaseParam.java
  13. 19 0
      carbon-bank-service/src/main/java/com/hcloud/microserver/bank/bo/BankResponseBase.java
  14. 12 0
      carbon-bank-service/src/main/java/com/hcloud/microserver/bank/bo/BankUpdateUserPwdParam.java
  15. 45 0
      carbon-bank-service/src/main/java/com/hcloud/microserver/bank/bo/CurrentAccountDetailQueryParam.java
  16. 13 0
      carbon-bank-service/src/main/java/com/hcloud/microserver/bank/bo/CurrentAccountHistoricalBalanceQueryParam.java
  17. 16 0
      carbon-bank-service/src/main/java/com/hcloud/microserver/bank/bo/CurrentAccountHistoricalBalanceQueryResp.java
  18. 53 0
      carbon-bank-service/src/main/java/com/hcloud/microserver/bank/bo/CurrentAccountQueryDetailResp.java
  19. 14 0
      carbon-bank-service/src/main/java/com/hcloud/microserver/bank/bo/CurrentAccountQueryDetailRespRecord.java
  20. 28 0
      carbon-bank-service/src/main/java/com/hcloud/microserver/bank/bo/CurrentAccountQueryDetailTotalResp.java
  21. 16 0
      carbon-bank-service/src/main/java/com/hcloud/microserver/bank/bo/CurrentAccountQueryParam.java
  22. 40 0
      carbon-bank-service/src/main/java/com/hcloud/microserver/bank/bo/CurrentAccountQueryResp.java
  23. 33 0
      carbon-bank-service/src/main/java/com/hcloud/microserver/bank/bo/InquiryOfWithholdingInstructionDetailsParam.java
  24. 12 0
      carbon-bank-service/src/main/java/com/hcloud/microserver/bank/bo/InquiryOfWithholdingInstructionDetailsRecord.java
  25. 19 0
      carbon-bank-service/src/main/java/com/hcloud/microserver/bank/bo/InquiryOfWithholdingInstructionDetailsResp.java
  26. 67 0
      carbon-bank-service/src/main/java/com/hcloud/microserver/bank/bo/InquiryOfWithholdingInstructionDetailsRespDetail.java
  27. 19 0
      carbon-bank-service/src/main/java/com/hcloud/microserver/bank/bo/InterbankNumberInformationParam.java
  28. 10 0
      carbon-bank-service/src/main/java/com/hcloud/microserver/bank/bo/InterbankNumberInformationResp.java
  29. 10 0
      carbon-bank-service/src/main/java/com/hcloud/microserver/bank/bo/InterbankNumberInformationRespDetail.java
  30. 10 0
      carbon-bank-service/src/main/java/com/hcloud/microserver/bank/bo/InterbankNumberInformationRespRecord.java
  31. 70 0
      carbon-bank-service/src/main/java/com/hcloud/microserver/bank/bo/IntrabankTransferParam.java
  32. 26 0
      carbon-bank-service/src/main/java/com/hcloud/microserver/bank/bo/IntrabankTransferResp.java
  33. 22 0
      carbon-bank-service/src/main/java/com/hcloud/microserver/bank/bo/MyX509Manager.java
  34. 67 0
      carbon-bank-service/src/main/java/com/hcloud/microserver/bank/bo/OutOfBankTransferParam.java
  35. 28 0
      carbon-bank-service/src/main/java/com/hcloud/microserver/bank/bo/OutOfBankTransferResp.java
  36. 18 0
      carbon-bank-service/src/main/java/com/hcloud/microserver/bank/bo/PayWagesOrReimbursementDetail.java
  37. 43 0
      carbon-bank-service/src/main/java/com/hcloud/microserver/bank/bo/PayWagesOrReimbursementParam.java
  38. 8 0
      carbon-bank-service/src/main/java/com/hcloud/microserver/bank/bo/PayWagesOrReimbursementRecord.java
  39. 20 0
      carbon-bank-service/src/main/java/com/hcloud/microserver/bank/bo/PayWagesOrReimbursementResp.java
  40. 32 0
      carbon-bank-service/src/main/java/com/hcloud/microserver/bank/bo/ReimbursementInstructionQureyParam.java
  41. 19 0
      carbon-bank-service/src/main/java/com/hcloud/microserver/bank/bo/ReimbursementInstructionResp.java
  42. 42 0
      carbon-bank-service/src/main/java/com/hcloud/microserver/bank/bo/ReimbursementInstructionRespDetail.java
  43. 11 0
      carbon-bank-service/src/main/java/com/hcloud/microserver/bank/bo/ReimbursementInstructionRespRecord.java
  44. 18 0
      carbon-bank-service/src/main/java/com/hcloud/microserver/bank/bo/ReimbursementInstructionsDetailQueryParam.java
  45. 47 0
      carbon-bank-service/src/main/java/com/hcloud/microserver/bank/bo/ReimbursementInstructionsDetailQueryResp.java
  46. 33 0
      carbon-bank-service/src/main/java/com/hcloud/microserver/bank/bo/ReimbursementInstructionsDetailQueryRespDetail.java
  47. 11 0
      carbon-bank-service/src/main/java/com/hcloud/microserver/bank/bo/ReimbursementInstructionsDetailQueryRespRecord.java
  48. 55 0
      carbon-bank-service/src/main/java/com/hcloud/microserver/bank/bo/SingleTransferInstructionQueryResp.java
  49. 18 0
      carbon-bank-service/src/main/java/com/hcloud/microserver/bank/bo/TransactionOrderStatusQueryParam.java
  50. 15 0
      carbon-bank-service/src/main/java/com/hcloud/microserver/bank/bo/TransactionOrderStatusQueryResp.java
  51. 33 0
      carbon-bank-service/src/main/java/com/hcloud/microserver/bank/bo/TransferTransactionInstructionDetail.java
  52. 32 0
      carbon-bank-service/src/main/java/com/hcloud/microserver/bank/bo/TransferTransactionInstructionQueryParam.java
  53. 20 0
      carbon-bank-service/src/main/java/com/hcloud/microserver/bank/bo/TransferTransactionInstructionQueryResp.java
  54. 42 0
      carbon-bank-service/src/main/java/com/hcloud/microserver/bank/service/BankTransactionService.java
  55. 17 0
      carbon-bank-service/src/main/java/com/hcloud/microserver/bank/service/BankUserService.java
  56. 6 0
      carbon-bank-service/src/main/java/com/hcloud/microserver/bank/service/SocketService.java
  57. 100 0
      carbon-bank-service/src/main/java/com/hcloud/microserver/bank/service/impl/BankTransactionServiceImpl.java
  58. 53 0
      carbon-bank-service/src/main/java/com/hcloud/microserver/bank/service/impl/BankUserServiceImpl.java
  59. 76 0
      carbon-bank-service/src/main/java/com/hcloud/microserver/bank/service/impl/SocketServiceImpl.java
  60. 47 0
      carbon-bank-service/src/main/java/com/hcloud/microserver/bank/util/BankNoUtial.java
  61. 396 0
      carbon-bank-service/src/main/java/com/hcloud/microserver/bank/util/BankUtil.java
  62. 81 0
      carbon-bank-service/src/main/java/com/hcloud/microserver/bank/util/HttpSSLUtil.java
  63. 288 0
      carbon-bank-service/src/main/java/com/hcloud/microserver/bank/util/JsonAndXmlUtils.java
  64. 105 0
      carbon-bank-service/src/main/java/com/hcloud/microserver/bank/util/RemoveNullAttr.java
  65. 258 0
      carbon-bank-service/src/main/java/com/hcloud/microserver/bank/util/SHAEncrytp.java
  66. 368 0
      carbon-bank-service/src/main/java/com/hcloud/microserver/bank/util/StringKit.java
  67. 76 0
      carbon-bank-service/src/main/resources/application-dev.properties
  68. 72 0
      carbon-bank-service/src/main/resources/application-pro.properties
  69. 62 0
      carbon-bank-service/src/main/resources/application-test.properties
  70. 3 0
      carbon-bank-service/src/main/resources/application.properties
  71. 45 0
      carbon-bank-service/src/main/resources/generatorConfig.xml
  72. 24 0
      carbon-bank-service/src/test/java/com/hcloud/microserver/bank/BankApiExcel.java
  73. 78 0
      carbon-bank-service/src/test/java/com/hcloud/microserver/bank/BankSiginTest.java
  74. 82 0
      carbon-bank-service/src/test/java/com/hcloud/microserver/bank/DemoDataListener.java
  75. 29 0
      carbon-bank-service/src/test/java/com/hcloud/microserver/bank/ExcelToEntityTest.java
  76. 217 0
      carbon-bank/carbon-bank-client/carbon-manager-client.iml
  77. 63 0
      carbon-bank/carbon-bank-client/pom.xml
  78. 10 0
      carbon-bank/carbon-bank-client/src/main/java/com/hcloud/microserver/facade/carbon/CarbonManageApplication.java
  79. 23 0
      carbon-bank/carbon-bank-client/src/main/java/com/hcloud/microserver/facade/carbon/client/BasePositionClient.java
  80. 24 0
      carbon-bank/carbon-bank-client/src/main/java/com/hcloud/microserver/facade/carbon/client/CollectiveFarmerClient.java
  81. 21 0
      carbon-bank/carbon-bank-client/src/main/java/com/hcloud/microserver/facade/carbon/client/CompanyClient.java
  82. 136 0
      carbon-bank/carbon-bank-client/src/main/java/com/hcloud/microserver/facade/carbon/client/CustomerClient.java
  83. 71 0
      carbon-bank/carbon-bank-client/src/main/java/com/hcloud/microserver/facade/carbon/client/FarmerInfoClient.java
  84. 79 0
      carbon-bank/carbon-bank-client/src/main/java/com/hcloud/microserver/facade/carbon/client/GoodsInfoClient.java
  85. 137 0
      carbon-bank/carbon-bank-client/src/main/java/com/hcloud/microserver/facade/carbon/client/OrderClient.java
  86. 14 0
      carbon-bank/carbon-bank-client/src/main/java/com/hcloud/microserver/facade/carbon/client/OrderDetailClient.java
  87. 59 0
      carbon-bank/carbon-bank-client/src/main/java/com/hcloud/microserver/facade/carbon/client/OrderPayApplyClient.java
  88. 55 0
      carbon-bank/carbon-bank-client/src/main/java/com/hcloud/microserver/facade/carbon/client/OrderPayClient.java
  89. 20 0
      carbon-bank/carbon-bank-client/src/main/java/com/hcloud/microserver/facade/carbon/client/PayApplyClient.java
  90. 15 0
      carbon-bank/carbon-bank-client/src/main/java/com/hcloud/microserver/facade/carbon/client/PayVoucherClient.java
  91. 29 0
      carbon-bank/carbon-bank-client/src/main/java/com/hcloud/microserver/facade/carbon/client/PovertyAreaClient.java
  92. 41 0
      carbon-bank/carbon-bank-client/src/main/java/com/hcloud/microserver/facade/carbon/client/ProductInfoClient.java
  93. 34 0
      carbon-bank/carbon-bank-client/src/main/java/com/hcloud/microserver/facade/carbon/client/ProductTypeClient.java
  94. 24 0
      carbon-bank/carbon-bank-client/src/main/java/com/hcloud/microserver/facade/carbon/entity/BasePosition.java
  95. 125 0
      carbon-bank/carbon-bank-client/src/main/java/com/hcloud/microserver/facade/carbon/entity/CarbonCalculateRule.java
  96. 213 0
      carbon-bank/carbon-bank-client/src/main/java/com/hcloud/microserver/facade/carbon/entity/CollectiveFarmer.java
  97. 20 0
      carbon-bank/carbon-bank-client/src/main/java/com/hcloud/microserver/facade/carbon/entity/CollectiveProductBelong.java
  98. 76 0
      carbon-bank/carbon-bank-client/src/main/java/com/hcloud/microserver/facade/carbon/entity/CustomerChannel.java
  99. 134 0
      carbon-bank/carbon-bank-client/src/main/java/com/hcloud/microserver/facade/carbon/entity/CustomerCompanyInfo.java
  100. 0 0
      carbon-bank/carbon-bank-client/src/main/java/com/hcloud/microserver/facade/carbon/entity/CustomerInfo.java

+ 29 - 0
carbon-bank-service/.gitignore

@@ -0,0 +1,29 @@
+HELP.md
+/target/
+!.mvn/wrapper/maven-wrapper.jar
+
+### STS ###
+.apt_generated
+.classpath
+.factorypath
+.project
+.settings
+.springBeans
+.sts4-cache
+
+### IntelliJ IDEA ###
+.idea
+*.iws
+*.iml
+*.ipr
+
+### NetBeans ###
+/nbproject/private/
+/nbbuild/
+/dist/
+/nbdist/
+/.nb-gradle/
+/build/
+
+### VS Code ###
+.vscode/

+ 114 - 0
carbon-bank-service/.mvn/wrapper/MavenWrapperDownloader.java

@@ -0,0 +1,114 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  https://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.net.URL;
+import java.nio.channels.Channels;
+import java.nio.channels.ReadableByteChannel;
+import java.util.Properties;
+
+public class MavenWrapperDownloader {
+
+    /**
+     * Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided.
+     */
+    private static final String DEFAULT_DOWNLOAD_URL =
+            "https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.4.2/maven-wrapper-0.4.2.jar";
+
+    /**
+     * Path to the maven-wrapper.properties file, which might contain a downloadUrl property to
+     * use instead of the default one.
+     */
+    private static final String MAVEN_WRAPPER_PROPERTIES_PATH =
+            ".mvn/wrapper/maven-wrapper.properties";
+
+    /**
+     * Path where the maven-wrapper.jar will be saved to.
+     */
+    private static final String MAVEN_WRAPPER_JAR_PATH =
+            ".mvn/wrapper/maven-wrapper.jar";
+
+    /**
+     * Name of the property which should be used to override the default download url for the wrapper.
+     */
+    private static final String PROPERTY_NAME_WRAPPER_URL = "wrapperUrl";
+
+    public static void main(String args[]) {
+        System.out.println("- Downloader started");
+        File baseDirectory = new File(args[0]);
+        System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath());
+
+        // If the maven-wrapper.properties exists, read it and check if it contains a custom
+        // wrapperUrl parameter.
+        File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH);
+        String url = DEFAULT_DOWNLOAD_URL;
+        if (mavenWrapperPropertyFile.exists()) {
+            FileInputStream mavenWrapperPropertyFileInputStream = null;
+            try {
+                mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile);
+                Properties mavenWrapperProperties = new Properties();
+                mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream);
+                url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url);
+            } catch (IOException e) {
+                System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'");
+            } finally {
+                try {
+                    if (mavenWrapperPropertyFileInputStream != null) {
+                        mavenWrapperPropertyFileInputStream.close();
+                    }
+                } catch (IOException e) {
+                    // Ignore ...
+                }
+            }
+        }
+        System.out.println("- Downloading from: : " + url);
+
+        File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH);
+        if (!outputFile.getParentFile().exists()) {
+            if (!outputFile.getParentFile().mkdirs()) {
+                System.out.println(
+                        "- ERROR creating output direcrory '" + outputFile.getParentFile().getAbsolutePath() + "'");
+            }
+        }
+        System.out.println("- Downloading to: " + outputFile.getAbsolutePath());
+        try {
+            downloadFileFromURL(url, outputFile);
+            System.out.println("Done");
+            System.exit(0);
+        } catch (Throwable e) {
+            System.out.println("- Error downloading");
+            e.printStackTrace();
+            System.exit(1);
+        }
+    }
+
+    private static void downloadFileFromURL(String urlString, File destination) throws Exception {
+        URL website = new URL(urlString);
+        ReadableByteChannel rbc;
+        rbc = Channels.newChannel(website.openStream());
+        FileOutputStream fos = new FileOutputStream(destination);
+        fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE);
+        fos.close();
+        rbc.close();
+    }
+
+}

BIN
carbon-bank-service/.mvn/wrapper/maven-wrapper.jar


+ 1 - 0
carbon-bank-service/.mvn/wrapper/maven-wrapper.properties

@@ -0,0 +1 @@
+distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.0/apache-maven-3.6.0-bin.zip

+ 14 - 0
carbon-bank-service/cqrcb.md

@@ -0,0 +1,14 @@
+# 重庆农商行对接文档
+#### 线管数据
+1. 测试环境用户:2720525548
+2. 测试环境密码:123456
+3. 测试环境服务地址:test.cqrcb.com
+4. 测试环境服务端口:9082
+
+#### 测试环境搭建
+1. 根据文档下载scp
+2. 咨询农商行的技术人员获取证书
+3. 安装证书
+4. 咨询农商行技术人员获取许可证
+5. 设置好scp软件启动加速
+

+ 286 - 0
carbon-bank-service/mvnw

@@ -0,0 +1,286 @@
+#!/bin/sh
+# ----------------------------------------------------------------------------
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#    https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+# ----------------------------------------------------------------------------
+
+# ----------------------------------------------------------------------------
+# Maven2 Start Up Batch script
+#
+# Required ENV vars:
+# ------------------
+#   JAVA_HOME - location of a JDK home dir
+#
+# Optional ENV vars
+# -----------------
+#   M2_HOME - location of maven2's installed home dir
+#   MAVEN_OPTS - parameters passed to the Java VM when running Maven
+#     e.g. to debug Maven itself, use
+#       set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
+#   MAVEN_SKIP_RC - flag to disable loading of mavenrc files
+# ----------------------------------------------------------------------------
+
+if [ -z "$MAVEN_SKIP_RC" ] ; then
+
+  if [ -f /etc/mavenrc ] ; then
+    . /etc/mavenrc
+  fi
+
+  if [ -f "$HOME/.mavenrc" ] ; then
+    . "$HOME/.mavenrc"
+  fi
+
+fi
+
+# OS specific support.  $var _must_ be set to either true or false.
+cygwin=false;
+darwin=false;
+mingw=false
+case "`uname`" in
+  CYGWIN*) cygwin=true ;;
+  MINGW*) mingw=true;;
+  Darwin*) darwin=true
+    # Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home
+    # See https://developer.apple.com/library/mac/qa/qa1170/_index.html
+    if [ -z "$JAVA_HOME" ]; then
+      if [ -x "/usr/libexec/java_home" ]; then
+        export JAVA_HOME="`/usr/libexec/java_home`"
+      else
+        export JAVA_HOME="/Library/Java/Home"
+      fi
+    fi
+    ;;
+esac
+
+if [ -z "$JAVA_HOME" ] ; then
+  if [ -r /etc/gentoo-release ] ; then
+    JAVA_HOME=`java-config --jre-home`
+  fi
+fi
+
+if [ -z "$M2_HOME" ] ; then
+  ## resolve links - $0 may be a link to maven's home
+  PRG="$0"
+
+  # need this for relative symlinks
+  while [ -h "$PRG" ] ; do
+    ls=`ls -ld "$PRG"`
+    link=`expr "$ls" : '.*-> \(.*\)$'`
+    if expr "$link" : '/.*' > /dev/null; then
+      PRG="$link"
+    else
+      PRG="`dirname "$PRG"`/$link"
+    fi
+  done
+
+  saveddir=`pwd`
+
+  M2_HOME=`dirname "$PRG"`/..
+
+  # make it fully qualified
+  M2_HOME=`cd "$M2_HOME" && pwd`
+
+  cd "$saveddir"
+  # echo Using m2 at $M2_HOME
+fi
+
+# For Cygwin, ensure paths are in UNIX format before anything is touched
+if $cygwin ; then
+  [ -n "$M2_HOME" ] &&
+    M2_HOME=`cygpath --unix "$M2_HOME"`
+  [ -n "$JAVA_HOME" ] &&
+    JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
+  [ -n "$CLASSPATH" ] &&
+    CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
+fi
+
+# For Mingw, ensure paths are in UNIX format before anything is touched
+if $mingw ; then
+  [ -n "$M2_HOME" ] &&
+    M2_HOME="`(cd "$M2_HOME"; pwd)`"
+  [ -n "$JAVA_HOME" ] &&
+    JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`"
+  # TODO classpath?
+fi
+
+if [ -z "$JAVA_HOME" ]; then
+  javaExecutable="`which javac`"
+  if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then
+    # readlink(1) is not available as standard on Solaris 10.
+    readLink=`which readlink`
+    if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then
+      if $darwin ; then
+        javaHome="`dirname \"$javaExecutable\"`"
+        javaExecutable="`cd \"$javaHome\" && pwd -P`/javac"
+      else
+        javaExecutable="`readlink -f \"$javaExecutable\"`"
+      fi
+      javaHome="`dirname \"$javaExecutable\"`"
+      javaHome=`expr "$javaHome" : '\(.*\)/bin'`
+      JAVA_HOME="$javaHome"
+      export JAVA_HOME
+    fi
+  fi
+fi
+
+if [ -z "$JAVACMD" ] ; then
+  if [ -n "$JAVA_HOME"  ] ; then
+    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+      # IBM's JDK on AIX uses strange locations for the executables
+      JAVACMD="$JAVA_HOME/jre/sh/java"
+    else
+      JAVACMD="$JAVA_HOME/bin/java"
+    fi
+  else
+    JAVACMD="`which java`"
+  fi
+fi
+
+if [ ! -x "$JAVACMD" ] ; then
+  echo "Error: JAVA_HOME is not defined correctly." >&2
+  echo "  We cannot execute $JAVACMD" >&2
+  exit 1
+fi
+
+if [ -z "$JAVA_HOME" ] ; then
+  echo "Warning: JAVA_HOME environment variable is not set."
+fi
+
+CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher
+
+# traverses directory structure from process work directory to filesystem root
+# first directory with .mvn subdirectory is considered project base directory
+find_maven_basedir() {
+
+  if [ -z "$1" ]
+  then
+    echo "Path not specified to find_maven_basedir"
+    return 1
+  fi
+
+  basedir="$1"
+  wdir="$1"
+  while [ "$wdir" != '/' ] ; do
+    if [ -d "$wdir"/.mvn ] ; then
+      basedir=$wdir
+      break
+    fi
+    # workaround for JBEAP-8937 (on Solaris 10/Sparc)
+    if [ -d "${wdir}" ]; then
+      wdir=`cd "$wdir/.."; pwd`
+    fi
+    # end of workaround
+  done
+  echo "${basedir}"
+}
+
+# concatenates all lines of a file
+concat_lines() {
+  if [ -f "$1" ]; then
+    echo "$(tr -s '\n' ' ' < "$1")"
+  fi
+}
+
+BASE_DIR=`find_maven_basedir "$(pwd)"`
+if [ -z "$BASE_DIR" ]; then
+  exit 1;
+fi
+
+##########################################################################################
+# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
+# This allows using the maven wrapper in projects that prohibit checking in binary data.
+##########################################################################################
+if [ -r "$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" ]; then
+    if [ "$MVNW_VERBOSE" = true ]; then
+      echo "Found .mvn/wrapper/maven-wrapper.jar"
+    fi
+else
+    if [ "$MVNW_VERBOSE" = true ]; then
+      echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..."
+    fi
+    jarUrl="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.4.2/maven-wrapper-0.4.2.jar"
+    while IFS="=" read key value; do
+      case "$key" in (wrapperUrl) jarUrl="$value"; break ;;
+      esac
+    done < "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties"
+    if [ "$MVNW_VERBOSE" = true ]; then
+      echo "Downloading from: $jarUrl"
+    fi
+    wrapperJarPath="$BASE_DIR/.mvn/wrapper/maven-wrapper.jar"
+
+    if command -v wget > /dev/null; then
+        if [ "$MVNW_VERBOSE" = true ]; then
+          echo "Found wget ... using wget"
+        fi
+        wget "$jarUrl" -O "$wrapperJarPath"
+    elif command -v curl > /dev/null; then
+        if [ "$MVNW_VERBOSE" = true ]; then
+          echo "Found curl ... using curl"
+        fi
+        curl -o "$wrapperJarPath" "$jarUrl"
+    else
+        if [ "$MVNW_VERBOSE" = true ]; then
+          echo "Falling back to using Java to download"
+        fi
+        javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java"
+        if [ -e "$javaClass" ]; then
+            if [ ! -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then
+                if [ "$MVNW_VERBOSE" = true ]; then
+                  echo " - Compiling MavenWrapperDownloader.java ..."
+                fi
+                # Compiling the Java class
+                ("$JAVA_HOME/bin/javac" "$javaClass")
+            fi
+            if [ -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then
+                # Running the downloader
+                if [ "$MVNW_VERBOSE" = true ]; then
+                  echo " - Running MavenWrapperDownloader.java ..."
+                fi
+                ("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$MAVEN_PROJECTBASEDIR")
+            fi
+        fi
+    fi
+fi
+##########################################################################################
+# End of extension
+##########################################################################################
+
+export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"}
+if [ "$MVNW_VERBOSE" = true ]; then
+  echo $MAVEN_PROJECTBASEDIR
+fi
+MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS"
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin; then
+  [ -n "$M2_HOME" ] &&
+    M2_HOME=`cygpath --path --windows "$M2_HOME"`
+  [ -n "$JAVA_HOME" ] &&
+    JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
+  [ -n "$CLASSPATH" ] &&
+    CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
+  [ -n "$MAVEN_PROJECTBASEDIR" ] &&
+    MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"`
+fi
+
+WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
+
+exec "$JAVACMD" \
+  $MAVEN_OPTS \
+  -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \
+  "-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
+  ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@"

+ 161 - 0
carbon-bank-service/mvnw.cmd

@@ -0,0 +1,161 @@
+@REM ----------------------------------------------------------------------------
+@REM Licensed to the Apache Software Foundation (ASF) under one
+@REM or more contributor license agreements.  See the NOTICE file
+@REM distributed with this work for additional information
+@REM regarding copyright ownership.  The ASF licenses this file
+@REM to you under the Apache License, Version 2.0 (the
+@REM "License"); you may not use this file except in compliance
+@REM with the License.  You may obtain a copy of the License at
+@REM
+@REM    https://www.apache.org/licenses/LICENSE-2.0
+@REM
+@REM Unless required by applicable law or agreed to in writing,
+@REM software distributed under the License is distributed on an
+@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+@REM KIND, either express or implied.  See the License for the
+@REM specific language governing permissions and limitations
+@REM under the License.
+@REM ----------------------------------------------------------------------------
+
+@REM ----------------------------------------------------------------------------
+@REM Maven2 Start Up Batch script
+@REM
+@REM Required ENV vars:
+@REM JAVA_HOME - location of a JDK home dir
+@REM
+@REM Optional ENV vars
+@REM M2_HOME - location of maven2's installed home dir
+@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands
+@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a key stroke before ending
+@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven
+@REM     e.g. to debug Maven itself, use
+@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
+@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files
+@REM ----------------------------------------------------------------------------
+
+@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on'
+@echo off
+@REM set title of command window
+title %0
+@REM enable echoing my setting MAVEN_BATCH_ECHO to 'on'
+@if "%MAVEN_BATCH_ECHO%" == "on"  echo %MAVEN_BATCH_ECHO%
+
+@REM set %HOME% to equivalent of $HOME
+if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%")
+
+@REM Execute a user defined script before this one
+if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre
+@REM check for pre script, once with legacy .bat ending and once with .cmd ending
+if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat"
+if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd"
+:skipRcPre
+
+@setlocal
+
+set ERROR_CODE=0
+
+@REM To isolate internal variables from possible post scripts, we use another setlocal
+@setlocal
+
+@REM ==== START VALIDATION ====
+if not "%JAVA_HOME%" == "" goto OkJHome
+
+echo.
+echo Error: JAVA_HOME not found in your environment. >&2
+echo Please set the JAVA_HOME variable in your environment to match the >&2
+echo location of your Java installation. >&2
+echo.
+goto error
+
+:OkJHome
+if exist "%JAVA_HOME%\bin\java.exe" goto init
+
+echo.
+echo Error: JAVA_HOME is set to an invalid directory. >&2
+echo JAVA_HOME = "%JAVA_HOME%" >&2
+echo Please set the JAVA_HOME variable in your environment to match the >&2
+echo location of your Java installation. >&2
+echo.
+goto error
+
+@REM ==== END VALIDATION ====
+
+:init
+
+@REM Find the project base dir, i.e. the directory that contains the folder ".mvn".
+@REM Fallback to current working directory if not found.
+
+set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR%
+IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir
+
+set EXEC_DIR=%CD%
+set WDIR=%EXEC_DIR%
+:findBaseDir
+IF EXIST "%WDIR%"\.mvn goto baseDirFound
+cd ..
+IF "%WDIR%"=="%CD%" goto baseDirNotFound
+set WDIR=%CD%
+goto findBaseDir
+
+:baseDirFound
+set MAVEN_PROJECTBASEDIR=%WDIR%
+cd "%EXEC_DIR%"
+goto endDetectBaseDir
+
+:baseDirNotFound
+set MAVEN_PROJECTBASEDIR=%EXEC_DIR%
+cd "%EXEC_DIR%"
+
+:endDetectBaseDir
+
+IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig
+
+@setlocal EnableExtensions EnableDelayedExpansion
+for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a
+@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS%
+
+:endReadAdditionalConfig
+
+SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"
+set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar"
+set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
+
+set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.4.2/maven-wrapper-0.4.2.jar"
+FOR /F "tokens=1,2 delims==" %%A IN (%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties) DO (
+	IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B 
+)
+
+@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
+@REM This allows using the maven wrapper in projects that prohibit checking in binary data.
+if exist %WRAPPER_JAR% (
+    echo Found %WRAPPER_JAR%
+) else (
+    echo Couldn't find %WRAPPER_JAR%, downloading it ...
+	echo Downloading from: %DOWNLOAD_URL%
+    powershell -Command "(New-Object Net.WebClient).DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')"
+    echo Finished downloading %WRAPPER_JAR%
+)
+@REM End of extension
+
+%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %*
+if ERRORLEVEL 1 goto error
+goto end
+
+:error
+set ERROR_CODE=1
+
+:end
+@endlocal & set ERROR_CODE=%ERROR_CODE%
+
+if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost
+@REM check for post script, once with legacy .bat ending and once with .cmd ending
+if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat"
+if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd"
+:skipRcPost
+
+@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on'
+if "%MAVEN_BATCH_PAUSE%" == "on" pause
+
+if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE%
+
+exit /B %ERROR_CODE%

+ 272 - 0
carbon-bank-service/pom.xml

@@ -0,0 +1,272 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>com.hcloud.microserver</groupId>
+        <artifactId>common-parent</artifactId>
+        <version>0.0.1-SNAPSHOT</version>
+        <relativePath>../common-parent/pom.xml</relativePath>
+    </parent>
+    <groupId>com.hcloud.microserver</groupId>
+    <artifactId>carbon-bank-service</artifactId>
+    <version>0.0.1-SNAPSHOT</version>
+    <name>carbon-bank-service</name>
+    <description>Demo project for Spring Boot</description>
+
+    <properties>
+        <java.version>1.8</java.version>
+    </properties>
+
+    <dependencies>
+        <dependency>
+            <groupId>com.hcloud.microserver</groupId>
+            <artifactId>common-core</artifactId>
+            <version>${common.core.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>com.hcloud.microserver</groupId>
+            <artifactId>carbon-manager-client</artifactId>
+            <version>0.0.1-SNAPSHOT</version>
+        </dependency>
+        <dependency>
+            <groupId>org.mybatis</groupId>
+            <artifactId>mybatis</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.mybatis.spring.boot</groupId>
+            <artifactId>mybatis-spring-boot-starter</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.google.code.gson</groupId>
+            <artifactId>gson</artifactId>
+            <version>2.8.5</version>
+        </dependency>
+        <dependency>
+            <groupId>net.sf.json-lib</groupId>
+            <artifactId>json-lib</artifactId>
+            <version>2.2.3</version>
+            <classifier>jdk15</classifier><!-- 指定jdk版本 -->
+        </dependency>
+
+        <dependency>
+            <groupId>org.springframework.cloud</groupId>
+            <artifactId>spring-cloud-starter-eureka</artifactId>
+        </dependency>
+        <!--druid -->
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>druid</artifactId>
+        </dependency>
+        <!-- 分页支持pageHelper -->
+        <dependency>
+            <groupId>com.github.pagehelper</groupId>
+            <artifactId>pagehelper-spring-boot-starter</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.mybatis.spring.boot</groupId>
+            <artifactId>mybatis-spring-boot-starter</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>mysql</groupId>
+            <artifactId>mysql-connector-java</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-cache</artifactId>
+            <version>1.5.18.RELEASE</version>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-data-redis</artifactId>
+        </dependency>
+        <!-- Ribbon依赖 -->
+        <dependency>
+            <groupId>org.springframework.cloud</groupId>
+            <artifactId>spring-cloud-starter-ribbon</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shiro</groupId>
+            <artifactId>shiro-core</artifactId>
+            <version>1.4.0</version>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.codehaus.groovy</groupId>
+            <artifactId>groovy</artifactId>
+        </dependency>
+        <!-- https://mvnrepository.com/artifact/commons-httpclient/commons-httpclient -->
+        <dependency>
+            <groupId>commons-httpclient</groupId>
+            <artifactId>commons-httpclient</artifactId>
+            <version>3.1</version>
+        </dependency>
+
+        <!-- https://mvnrepository.com/artifact/com.alibaba/easyexcel -->
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>easyexcel</artifactId>
+            <version>2.2.6</version>
+        </dependency>
+        <dependency>
+            <groupId>dom4j</groupId>
+            <artifactId>dom4j</artifactId>
+        </dependency>
+
+
+    </dependencies>
+
+    <build>
+        <plugins>
+            <!-- 打JAR包 -->
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-jar-plugin</artifactId>
+                <configuration>
+                    <!-- 不打包资源文件(配置文件和依赖包分开) -->
+                    <excludes>
+                        <exclude>*.**</exclude>
+                        <exclude>*/*.xml</exclude>
+                    </excludes>
+                    <archive>
+                        <manifest>
+                            <addClasspath>true</addClasspath>
+                            <!-- MANIFEST.MF 中 Class-Path 加入前缀 -->
+                            <classpathPrefix>lib/</classpathPrefix>
+                            <!-- jar包不包含唯一版本标识 -->
+                            <useUniqueVersions>false</useUniqueVersions>
+                            <!--指定入口类 -->
+                            <mainClass>com.hcloud.microserver.bank.CarbonManagerServiceApplication</mainClass>
+                        </manifest>
+                        <manifestEntries>
+                            <!--MANIFEST.MF 中 Class-Path 加入资源文件目录 -->
+                            <Class-Path>./resources/</Class-Path>
+                        </manifestEntries>
+                    </archive>
+                    <outputDirectory>${project.build.directory}</outputDirectory>
+                </configuration>
+            </plugin>
+
+            <!-- 该插件的作用是用于复制依赖的jar包到指定的文件夹里 -->
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-dependency-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>copy-dependencies</id>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>copy-dependencies</goal>
+                        </goals>
+                        <configuration>
+                            <outputDirectory>${project.build.directory}/lib/</outputDirectory>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+
+            <!-- 该插件的作用是用于复制指定的文件 -->
+            <plugin>
+                <artifactId>maven-resources-plugin</artifactId>
+                <executions>
+                    <execution> <!-- 复制配置文件 -->
+                        <id>copy-resources</id>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>copy-resources</goal>
+                        </goals>
+                        <configuration>
+                            <resources>
+                                <resource>
+                                    <directory>src/main/resources</directory>
+                                    <includes>
+                                        <!-- <include>*.properties</include> -->
+                                    </includes>
+                                </resource>
+                            </resources>
+                            <outputDirectory>${project.build.directory}/resources</outputDirectory>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+
+            <!-- SpringBoot 打包插件,把 maven-jar-plugin 打成的jar包重新打成可运行jar包 -->
+            <plugin>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-maven-plugin</artifactId>
+                <configuration>
+                    <!--重写包含依赖,包含不存在的依赖,jar里没有pom里的依赖 -->
+                    <includes>
+                        <include>
+                            <groupId>null</groupId>
+                            <artifactId>null</artifactId>
+                        </include>
+                    </includes>
+                    <layout>ZIP</layout>
+                    <!--使用外部配置文件,jar包里没有资源文件 -->
+                    <addResources>true</addResources>
+                    <outputDirectory>${project.build.directory}/resources</outputDirectory>
+                </configuration>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>repackage</goal>
+                        </goals>
+                        <configuration>
+                            <!--配置jar包特殊标识 配置后,保留原文件,生成新文件 *-run.jar -->
+                            <!--配置jar包特殊标识 不配置,原文件命名为 *.jar.original,生成新文件 *.jar -->
+                            <classifier>run</classifier>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-surefire-plugin</artifactId>
+                <version>2.18.1</version>
+                <configuration>
+                    <skipTests>true</skipTests>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.mybatis.generator</groupId>
+                <artifactId>mybatis-generator-maven-plugin</artifactId>
+                <version>1.3.5</version>
+                <dependencies>
+                    <dependency>
+                        <groupId> mysql</groupId>
+                        <artifactId> mysql-connector-java</artifactId>
+                        <version>5.1.39</version>
+                    </dependency>
+                    <dependency>
+                        <groupId>org.mybatis.generator</groupId>
+                        <artifactId>mybatis-generator-core</artifactId>
+                        <version>1.3.5</version>
+                    </dependency>
+                </dependencies>
+                <executions>
+                    <execution>
+                        <id>Generate MyBatis Artifacts</id>
+                        <phase>deploy</phase>
+                        <goals>
+                            <goal>generate</goal>
+                        </goals>
+                    </execution>
+                </executions>
+                <configuration>
+                    <!--允许移动生成的文件 -->
+                    <verbose>true</verbose>
+                    <!-- 是否覆盖 -->
+                    <overwrite>true</overwrite>
+                    <!-- 自动生成的配置 -->
+                    <configurationFile>src/main/resources/generatorConfig.xml</configurationFile>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>

+ 28 - 0
carbon-bank-service/src/main/java/com/hcloud/microserver/bank/CarbonManagerServiceApplication.java

@@ -0,0 +1,28 @@
+package com.hcloud.microserver.bank;
+
+import org.mybatis.spring.annotation.MapperScan;
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
+import org.springframework.cloud.netflix.feign.EnableFeignClients;
+import org.springframework.context.annotation.ComponentScan;
+import org.springframework.scheduling.annotation.EnableAsync;
+import org.springframework.transaction.annotation.EnableTransactionManagement;
+
+/**
+ * @author xiezt
+ */
+@EnableAsync
+@EnableDiscoveryClient
+@EnableFeignClients(basePackages = {"com.hcloud.microserver"})
+@EnableTransactionManagement
+@ComponentScan(basePackages = "com.hcloud")
+@MapperScan(basePackages = {"com.hcloud.microserver.bank.dao"})
+@SpringBootApplication
+public class CarbonManagerServiceApplication {
+
+    public static void main(String[] args) {
+        SpringApplication.run(CarbonManagerServiceApplication.class, args);
+    }
+
+}

+ 14 - 0
carbon-bank-service/src/main/java/com/hcloud/microserver/bank/bo/BankLoginUserReqParam.java

@@ -0,0 +1,14 @@
+package com.hcloud.microserver.bank.bo;
+
+import lombok.Data;
+
+/**
+ * 用户登录请求参数实体类
+ */
+@Data
+public class BankLoginUserReqParam {
+    private String userID;
+    private String userPWD;
+    private String systemId;
+
+}

+ 9 - 0
carbon-bank-service/src/main/java/com/hcloud/microserver/bank/bo/BankLoginUserRespBO.java

@@ -0,0 +1,9 @@
+package com.hcloud.microserver.bank.bo;
+
+import lombok.Data;
+
+@Data
+public class BankLoginUserRespBO extends BankResponseBase {
+    private String corpName;
+
+}

+ 18 - 0
carbon-bank-service/src/main/java/com/hcloud/microserver/bank/bo/BankQueryBaseParam.java

@@ -0,0 +1,18 @@
+package com.hcloud.microserver.bank.bo;
+
+import lombok.Data;
+
+@Data
+public class BankQueryBaseParam<T> {
+    /** 1.	sessionId为会话编号,每次登录之后会产生一个唯一的编号,用于标识这次会话。用户每次进行交易时都必须上送该Id。如果是登录交易,则请求报文头中的sessionId传-1即可**/
+    private String sessionId;
+    /** 12.	serviceId为服务编号,用以区分不同的操作,见具体交易格式说明,如登录交易的服务编号为: CL0001。**/
+    private String serviceId;
+    /** 3.	serialNo为交易序列号,客户端唯一标识,返回时原样返回。**/
+    private String serialNo;
+    /** 3.	serialNo为交易序列号,客户端唯一标识,返回时原样返回。**/
+    private String reqTime;
+
+    private T data;
+
+}

+ 19 - 0
carbon-bank-service/src/main/java/com/hcloud/microserver/bank/bo/BankResponseBase.java

@@ -0,0 +1,19 @@
+package com.hcloud.microserver.bank.bo;
+
+import lombok.Data;
+
+/**
+ * 银行系统响应参数公共实体类
+ */
+@Data
+public class BankResponseBase {
+
+    private String sessionId;
+    private String serialNo;
+    private String retCode;
+    private String errorMsg;
+
+
+
+
+}

+ 12 - 0
carbon-bank-service/src/main/java/com/hcloud/microserver/bank/bo/BankUpdateUserPwdParam.java

@@ -0,0 +1,12 @@
+package com.hcloud.microserver.bank.bo;
+
+import lombok.Data;
+
+/**
+ * 修改密码请求参数实体类
+ */
+@Data
+public class BankUpdateUserPwdParam {
+    private String OLDPWD;
+    private String NEWPWD;
+}

+ 45 - 0
carbon-bank-service/src/main/java/com/hcloud/microserver/bank/bo/CurrentAccountDetailQueryParam.java

@@ -0,0 +1,45 @@
+package com.hcloud.microserver.bank.bo;
+
+import com.alibaba.fastjson.annotation.JSONField;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * 2.5.	账务查询:活期账户明细查询CL0004
+ */
+
+@Data
+public class CurrentAccountDetailQueryParam implements Serializable {
+    /**账户号	19A	必输*/
+    @JSONField(name = "I1ACNO")
+    private String  I1ACNO;
+    /**币种	3A	暂不使用*/
+    @JSONField(name = "I1CYTP")
+    private String  I1CYTP;
+    /**起始日期	8P0	必输*/
+    @JSONField(name = "I1STDT")
+    private String  I1STDT;
+    /**终止日期	8P0	必输*/
+    @JSONField(name = "I1EDDT")
+    private String  I1EDDT;
+    /**起始金额	15P2	非必输*/
+    @JSONField(name = "I1BGAT")
+    private String  I1BGAT;
+    /**终止金额	15P2	非必输*/
+    @JSONField(name = "I1EDAT")
+    private String  I1EDAT;
+    /**借贷标志	1A	空:全部;0:支出;1:收入*/
+    @JSONField(name = "I1JDBZ")
+    private String  I1JDBZ;
+    /**查询标志	1A	0-顺查1-倒查*/
+    @JSONField(name = "I1QYFG")
+    private String  I1QYFG;
+    /**起始条数	5P0	可选*/
+    @JSONField(name = "Num")
+    private String  Num;
+    /**查询条数	4P0	可选(最大2000)*/
+    @JSONField(name = "QryNum")
+    private String  QryNum;
+}

+ 13 - 0
carbon-bank-service/src/main/java/com/hcloud/microserver/bank/bo/CurrentAccountHistoricalBalanceQueryParam.java

@@ -0,0 +1,13 @@
+package com.hcloud.microserver.bank.bo;
+
+import java.math.BigDecimal;
+
+/**
+ * 活期账户历史余额查询
+ */
+public class CurrentAccountHistoricalBalanceQueryParam {
+    /**账户号;必输;32A;*/
+    private String accNo;
+    /**日期;必输;8P0;*/
+    private BigDecimal date;
+}

+ 16 - 0
carbon-bank-service/src/main/java/com/hcloud/microserver/bank/bo/CurrentAccountHistoricalBalanceQueryResp.java

@@ -0,0 +1,16 @@
+package com.hcloud.microserver.bank.bo;
+
+import lombok.Data;
+
+import java.math.BigDecimal;
+
+/**
+ * 获取账户历史余额查询
+ */
+@Data
+public class CurrentAccountHistoricalBalanceQueryResp {
+    /**账户名称;null;100*O;*/
+    private String accName;
+    /**账户余额;null;15P2;*/
+    private BigDecimal balance;
+}

+ 53 - 0
carbon-bank-service/src/main/java/com/hcloud/microserver/bank/bo/CurrentAccountQueryDetailResp.java

@@ -0,0 +1,53 @@
+package com.hcloud.microserver.bank.bo;
+
+import lombok.Data;
+
+import java.math.BigDecimal;
+
+/**
+ * 活期账户明细返回参数
+ */
+@Data
+public class CurrentAccountQueryDetailResp {
+    /**交易日期 	8P0	*/
+    private String O2TRDT;
+    /**交易时间 	6P0	*/
+    private String O2TRTM;
+    /**币种	3A	*/
+    private String O2CYTP;
+    /**币种中文描述	10*O	*/
+    private String O2CYMS;
+    /**借贷标记 	2*O	*/
+    private String O2AMCD;
+    /**交易金额 	15P2	*/
+    private BigDecimal O2NGAM;
+    /**账户余额 	15P2	*/
+    private BigDecimal O2ACBL;
+    /**核心流水号	15A	*/
+    private String O2TLSQ;
+    /**摘要	15*O	*/
+    private String O2SMCD;
+    /**备注	200*O	*/
+    private String O2DESC;
+    /**交易渠道	3*O	*/
+    private String O2CHAN;
+    /**对方账号	30A	*/
+    private String O2REAC;
+    /**对方户名	62*O	*/
+    private String O2RENM;
+    /**对方开户行	100*O	*/
+    private String O2REKH;
+    /**手续费	15P2	*/
+    private BigDecimal O2SHXF;
+    /**用途	100*O	*/
+    private String O2YOTU;
+    /**账号1	32A	*/
+    private String O2AC1;
+    /**账户户名1	100*O	*/
+    private String O2NM1;
+    /**业务种类	1A	*/
+    private String O2YWZL;
+    /**记录信息	200*O	*/
+    private String O2JLXX;
+
+}

+ 14 - 0
carbon-bank-service/src/main/java/com/hcloud/microserver/bank/bo/CurrentAccountQueryDetailRespRecord.java

@@ -0,0 +1,14 @@
+package com.hcloud.microserver.bank.bo;
+
+import lombok.Data;
+
+import java.math.BigDecimal;
+
+/**
+ * 活期账户明细返回参数
+ */
+@Data
+public class CurrentAccountQueryDetailRespRecord {
+   private CurrentAccountQueryDetailResp RECORD;
+
+}

+ 28 - 0
carbon-bank-service/src/main/java/com/hcloud/microserver/bank/bo/CurrentAccountQueryDetailTotalResp.java

@@ -0,0 +1,28 @@
+package com.hcloud.microserver.bank.bo;
+
+import lombok.Data;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.List;
+
+@Data
+public class CurrentAccountQueryDetailTotalResp extends BankResponseBase implements Serializable {
+    /**总笔数	5P0*/
+    private String O1TLNM;
+    /**汇出总笔数	4P0*/
+    private String O1OTNM;
+    /**汇出总金额	15P2*/
+    private BigDecimal O1OTAT;
+    /**汇入总笔数	4P0*/
+    private String O1INNM;
+    /**汇入总金额	15P2*/
+    private BigDecimal O1INAT;
+    /**查询明细*/
+    private List<CurrentAccountQueryDetailRespRecord> list;
+
+
+
+
+
+}

+ 16 - 0
carbon-bank-service/src/main/java/com/hcloud/microserver/bank/bo/CurrentAccountQueryParam.java

@@ -0,0 +1,16 @@
+package com.hcloud.microserver.bank.bo;
+
+import com.alibaba.fastjson.annotation.JSONField;
+import com.fasterxml.jackson.annotation.JsonFilter;
+import lombok.Data;
+
+/**
+ * 活期账户查询请求参数
+ */
+@Data
+public class CurrentAccountQueryParam {
+    //账号
+
+    @JSONField(name = "I1ACNO")
+    private String I1ACNO;
+}

+ 40 - 0
carbon-bank-service/src/main/java/com/hcloud/microserver/bank/bo/CurrentAccountQueryResp.java

@@ -0,0 +1,40 @@
+package com.hcloud.microserver.bank.bo;
+
+import lombok.Data;
+
+import java.math.BigDecimal;
+
+/**
+ * 活期账户查询返回
+ */
+@Data
+public class CurrentAccountQueryResp extends BankResponseBase {
+    /**账户号                     	19A	*/
+    private String O1ACNO;
+    /**客户号                     	10A	*/
+    private String O1CUNO;
+    /**客户中文名	62*O	*/
+    private String O1CUNM;
+    /**保留余额 	15P2	*/
+    private BigDecimal O1HOBL;
+    /**可用余额 	15P2	*/
+    private BigDecimal O1KYYE;
+    /**账户余额 	15P2	*/
+    private BigDecimal O1ACBL;
+    /**开户日期 	8P0	*/
+    private BigDecimal O1OPDT;
+    /**账务归属机构 	6A	*/
+    private String O1ACSB;
+    /**账户状态中文描述	10*O	*/
+    private String O1STCD;
+    /**币种	2A	*/
+    private String O1CRTP;
+    /**币种中文描述	10*O	*/
+    private String O1BZZW;
+    /**开户机构	6A	*/
+    private String O1OPOG;
+    /**开户机构名称	62*O	*/
+    private String O1OPPL;
+    /**协定存款标志	2*O	*/
+    private String O1XDFG;
+}

+ 33 - 0
carbon-bank-service/src/main/java/com/hcloud/microserver/bank/bo/InquiryOfWithholdingInstructionDetailsParam.java

@@ -0,0 +1,33 @@
+package com.hcloud.microserver.bank.bo;
+
+import lombok.Data;
+
+import java.math.BigDecimal;
+
+/**
+ * 2.15.	账务支付:代发/代扣指令详情信息查询CL0034
+ */
+@Data
+public class InquiryOfWithholdingInstructionDetailsParam {
+
+    /**交易类型;可选01-代发、02-代扣;2A;*/
+    private String BsnType;
+    /**账号1;可选,交易类型为“01”时,账号1为付款账号;交易类型为“02”时,账号1为收款账号;;32A;*/
+    private String AcctNo;
+    /**账号2;可选,交易类型为“01”时,账号2为收款账号;交易类型为“02”时,账号2为付款账号;;32A;*/
+    private String AnAcctNo;
+    /**操作方式;默认:0;0:账务处理1:数据校验;1A;*/
+    private String OperFlg;
+    /**开始金额;可选;15P2;*/
+    private BigDecimal StartAmt;
+    /**结束金额;可选;15P2;*/
+    private BigDecimal EndAmt;
+    /**起始日期;必输;8P0;*/
+    private BigDecimal StartDt;
+    /**终止日期;必输;8P0;*/
+    private BigDecimal EndDt;
+    /**起始条数;必输域;6P0;*/
+    private BigDecimal Num;
+    /**查询条数;必输域;4P0;*/
+    private BigDecimal QryNum;
+}

+ 12 - 0
carbon-bank-service/src/main/java/com/hcloud/microserver/bank/bo/InquiryOfWithholdingInstructionDetailsRecord.java

@@ -0,0 +1,12 @@
+package com.hcloud.microserver.bank.bo;
+
+import lombok.Data;
+
+/**
+ * 2.15.	账务支付:代发/代扣指令详情信息查询CL0034
+ */
+@Data
+public class InquiryOfWithholdingInstructionDetailsRecord {
+    private InquiryOfWithholdingInstructionDetailsRespDetail RECORD;
+
+}

+ 19 - 0
carbon-bank-service/src/main/java/com/hcloud/microserver/bank/bo/InquiryOfWithholdingInstructionDetailsResp.java

@@ -0,0 +1,19 @@
+package com.hcloud.microserver.bank.bo;
+
+import lombok.Data;
+
+import java.math.BigDecimal;
+import java.util.List;
+
+/**
+ * 2.15.	账务支付:代发/代扣指令详情信息查询CL0034
+ */
+@Data
+public class InquiryOfWithholdingInstructionDetailsResp {
+    /**返回笔数;返回笔数;3P0;*/
+    private BigDecimal returnNum;
+    /**查询总条数;满足条件总记录数;5P0;*/
+    private BigDecimal totalNum;
+
+    private List<InquiryOfWithholdingInstructionDetailsRecord> list;
+}

+ 67 - 0
carbon-bank-service/src/main/java/com/hcloud/microserver/bank/bo/InquiryOfWithholdingInstructionDetailsRespDetail.java

@@ -0,0 +1,67 @@
+package com.hcloud.microserver.bank.bo;
+
+import lombok.Data;
+
+import java.math.BigDecimal;
+
+/**
+ * 2.15.	账务支付:代发/代扣指令详情信息查询CL0034
+ */
+@Data
+public class InquiryOfWithholdingInstructionDetailsRespDetail {
+    /**提交日期;null;14P0;*/
+    private BigDecimal TxnDt;
+    /**交易类型;01-代发、02-代扣;2A;*/
+    private String BsnType;
+    /**账号1;null;32A;*/
+    private String AcctNo;
+    /**账号1名称;null;100*O;*/
+    private String AcctName;
+    /**账号2;null;32A;*/
+    private String AnAcctNo;
+    /**账号2名称;null;100*O;*/
+    private String AnAcctName;
+    /**币种;01-人民币;2A;*/
+    private String Ccy;
+    /**交易总金额;null;15P2;*/
+    private BigDecimal BatAmt;
+    /**批次号;null;15A;*/
+    private String BatFlow;
+    /**批次状态;批次成功时,交易结果以明细状态为准; 批次失败时,所有明细均失败;2A;*/
+    private String BatState;
+    /**批次状态描述;null;20*O;*/
+    private String BatDesc;
+    /**批次错误代码;null;20A;*/
+    private String BatCode;
+    /**批次错误信息;null;100*O;*/
+    private String BatMsg;
+    /**企业流水号;null;20A;*/
+    private String CstFlow;
+    /**商户号;null;30A;*/
+    private String CstNo;
+    /**业务类型;当交易类型为01时,101:代发
+     102:代报销
+     103:预借
+     104:行内代付
+     当交易类型为02时,
+     0:批量扣个人
+     1:批量扣企业
+     仅交易类型为02时,该项为空;3A;*/
+    private String BusType;
+    /**月份;仅交易类型为02时,该项为空;6P0;*/
+    private BigDecimal Month;
+    /**明细序号;null;20A;*/
+    private BigDecimal DetFlow;
+    /**明细交易状态;0-交易成功
+     1-交易失败
+     2-入账中;1A;*/
+    private String DetState;
+    /**明细金额;null;15P2;*/
+    private BigDecimal DetAmt;
+    /**明细错误代码;null;20A;*/
+    private String DetCode;
+    /**明细错误信息;null;100*O;*/
+    private String DetMsg;
+    /**备注;null;42*O;*/
+    private String DetRem;
+}

+ 19 - 0
carbon-bank-service/src/main/java/com/hcloud/microserver/bank/bo/InterbankNumberInformationParam.java

@@ -0,0 +1,19 @@
+package com.hcloud.microserver.bank.bo;
+
+import lombok.Data;
+
+/**
+ * 2.16.	获取联行号信息 CL0101
+ */
+@Data
+public class InterbankNumberInformationParam {
+    /**银行行名;必输;8-100*O;*/
+    private String bankName;
+    /**渠道号;至少四个汉字
+     非必输,不送查询所有
+     0:大小额
+     1:大小额
+     2:同城农信银;1A;*/
+    private String channel;
+
+}

+ 10 - 0
carbon-bank-service/src/main/java/com/hcloud/microserver/bank/bo/InterbankNumberInformationResp.java

@@ -0,0 +1,10 @@
+package com.hcloud.microserver.bank.bo;
+
+import lombok.Data;
+
+/**
+ * 2.16.	获取联行号信息 CL0101
+ */
+@Data
+public class InterbankNumberInformationResp {
+}

+ 10 - 0
carbon-bank-service/src/main/java/com/hcloud/microserver/bank/bo/InterbankNumberInformationRespDetail.java

@@ -0,0 +1,10 @@
+package com.hcloud.microserver.bank.bo;
+
+import lombok.Data;
+
+/**
+ * 2.16.	获取联行号信息 CL0101
+ */
+@Data
+public class InterbankNumberInformationRespDetail {
+}

+ 10 - 0
carbon-bank-service/src/main/java/com/hcloud/microserver/bank/bo/InterbankNumberInformationRespRecord.java

@@ -0,0 +1,10 @@
+package com.hcloud.microserver.bank.bo;
+
+import lombok.Data;
+
+/**
+ * 2.16.	获取联行号信息 CL0101
+ */
+@Data
+public class InterbankNumberInformationRespRecord {
+}

+ 70 - 0
carbon-bank-service/src/main/java/com/hcloud/microserver/bank/bo/IntrabankTransferParam.java

@@ -0,0 +1,70 @@
+package com.hcloud.microserver.bank.bo;
+
+import com.alibaba.fastjson.annotation.JSONField;
+import lombok.Data;
+
+import java.math.BigDecimal;
+
+/***
+ * 2.6.	转账:行内转账CL0005(需签名)
+ */
+@Data
+public class IntrabankTransferParam {
+    /**企业流水号;必输域,企业自己生成的流水号,在企业内部唯一;20A;*/
+    @JSONField(name = "I1QYLS")
+    private String I1QYLS;
+    /**提交人ID;null;30A;*/
+    @JSONField(name = "I1SMID")
+    private String I1SMID;
+    /**最后授权人ID;null;30A;*/
+    @JSONField(name = "I1ATID")
+    private String I1ATID;
+    /**付款账号;必输域;32A;*/
+    @JSONField(name = "I1FKAC")
+    private String I1FKAC;
+    /**付款方户名;null;60*O;*/
+    @JSONField(name = "I1FKNM")
+    private String I1FKNM;
+    /**收款方户名;必输域;60*O;*/
+    @JSONField(name = "I1CUNM")
+    private String I1CUNM;
+    /**收款账号;必输域;32A;*/
+    @JSONField(name = "I1SKAC")
+    private String I1SKAC;
+    /**金额;必输域;15P2;*/
+    @JSONField(name = "I1TRAM")
+    private BigDecimal I1TRAM;
+    /**币种;必输域(固定值01);2A;*/
+    @JSONField(name = "I1TRCY")
+    private BigDecimal I1TRCY;
+    /**用途;必输域;30*O;*/
+    @JSONField(name = "I1PUPS")
+    private BigDecimal I1PUPS;
+    /**备注;null;150*O;*/
+    @JSONField(name = "I1REM")
+    private String I1REM;
+    /**交易类型;0:集团账号转账1:普通转账;1A;*/
+    @JSONField(name = "IJYLX")
+    private String IJYLX;
+    /**企业指令内部编号;null;30A;*/
+    @JSONField(name = "I1NBBH")
+    private String I1NBBH;
+    /**校验标志;0:无(默认)1:招标账户校验;1A;*/
+    @JSONField(name = "I1JYBZ")
+    private String I1JYBZ;
+    /**原明细序号;null;8A;*/
+    @JSONField(name = "I1MXXH")
+    private String I1MXXH;
+    /**账号1;null;32A;*/
+    @JSONField(name = "I1AC1")
+    private String I1AC1;
+    /**账户户名1;null;100*O;*/
+    @JSONField(name = "I1NM1")
+    private String I1NM1;
+    /**业务种类;1-代理支付;1A;*/
+    @JSONField(name = "I1YWZL")
+    private String I1YWZL;
+    /**记录信息;null;200*O;*/
+    @JSONField(name = "I1JLXX")
+    private String I1JLXX;
+}

+ 26 - 0
carbon-bank-service/src/main/java/com/hcloud/microserver/bank/bo/IntrabankTransferResp.java

@@ -0,0 +1,26 @@
+package com.hcloud.microserver.bank.bo;
+
+import lombok.Data;
+
+import java.math.BigDecimal;
+
+@Data
+public class IntrabankTransferResp extends BankResponseBase {
+
+    /**渠道流水号;null;15A;*/
+    private String O1TLSQ;
+    /**交易状态;见数据字典说明;2A;*/
+    private String O1JYZT;
+    /**状态描述;null;20*O;*/
+    private String O1ZTMS;
+    /**交易应答代码;null;20A;*/
+    private String O1JYYD;
+    /**失败原因;null;100*O;*/
+    private String O1SBYY;
+    /**付款账户余额;null;15P2;*/
+    private BigDecimal O1ZHYE;
+    /**手续费;null;15P2;*/
+    private BigDecimal O1PCDF;
+    /**邮电费;null;15P2;*/
+    private BigDecimal O1PSTF;
+}

+ 22 - 0
carbon-bank-service/src/main/java/com/hcloud/microserver/bank/bo/MyX509Manager.java

@@ -0,0 +1,22 @@
+package com.hcloud.microserver.bank.bo;
+
+import javax.net.ssl.X509TrustManager;
+import java.security.cert.CertificateException;
+import java.security.cert.X509Certificate;
+
+public class MyX509Manager implements X509TrustManager {
+    @Override
+    public void checkClientTrusted(X509Certificate[] x509Certificates, String s) throws CertificateException {
+
+    }
+
+    @Override
+    public void checkServerTrusted(X509Certificate[] x509Certificates, String s) throws CertificateException {
+
+    }
+
+    @Override
+    public X509Certificate[] getAcceptedIssuers() {
+        return new X509Certificate[0];
+    }
+}

+ 67 - 0
carbon-bank-service/src/main/java/com/hcloud/microserver/bank/bo/OutOfBankTransferParam.java

@@ -0,0 +1,67 @@
+package com.hcloud.microserver.bank.bo;
+
+import lombok.Data;
+
+import java.math.BigDecimal;
+
+/**
+ * 2.7.	转账:行外转账CL0006(需签名)
+ */
+@Data
+public class OutOfBankTransferParam {
+
+    /**企业流水号;必输域;20A;*/
+    private String I1QYLS;
+    /**提交人ID;null;30A;*/
+    private String I1SMID;
+    /**最后授权人ID;null;30A;*/
+    private String I1ATID;
+    /**货币符号;必输域币种表人民币01;2A;*/
+    private String CYNO;
+    /**付款金额;必输域;15P2;*/
+    private BigDecimal HBJE;
+    /**付款人开户行;必输域;12A;*/
+    private String FKKH;
+    /**付款人账号;必输域;32A;*/
+    private String FKZH;
+    /**付款人名称;必输域;60*O;*/
+    private String FKRM;
+    /**收款人开户行;当加急标志为0,1时必输;12A;*/
+    private String SKKH;
+    /**收款人开户行名;当加急标志为2时必输;100*O;*/
+    private String SKHM;
+    /**收款人账号;必输域;32A;*/
+    private String SKZH;
+    /**收款人名称;必输域;60*O;*/
+    private String SKRM;
+    /**付款用途;必输域;30*O;*/
+    private String FYAN;
+    /**付款人备注;null;30*O;*/
+    private String FKBZ;
+    /**加急标志;必输域0:普通(小额),1:加急(大额),2:支付平台;1A;*/
+    private String JJBZ;
+    /**交易类型;必输域0:集团账号转账1:普通转账;1A;*/
+    private String IJYLX;
+    /**核心流水号;null;15A;*/
+    private String I1TLSQ;
+    /**交易日期;null;8A;*/
+    private String I1TRDT;
+    /**交易序号;null;15A;*/
+    private String I1ZFXH;
+    /**企业指令内部编号;null;30A;*/
+    private String I1NBBH;
+    /**手续费支付方;0:付款人支付(默认);1A;*/
+    private String I1SXZF;
+    /**校验标志;0:无(默认)1:招标账户校验;1A;*/
+    private String I1JYBZ;
+    /**原明细序号;null;8A;*/
+    private String I1MXXH;
+    /**账号1;null;32A;*/
+    private String I1AC1;
+    /**账户户名1;null;100*O;*/
+    private String I1NM1;
+    /**业务种类;1-代理支付;1A;*/
+    private String I1YWZL;
+    /**记录信息;null;200*O;*/
+    private String I1JLXX;
+}

+ 28 - 0
carbon-bank-service/src/main/java/com/hcloud/microserver/bank/bo/OutOfBankTransferResp.java

@@ -0,0 +1,28 @@
+package com.hcloud.microserver.bank.bo;
+
+import lombok.Data;
+
+import java.math.BigDecimal;
+
+/**
+ * 2.7.	转账:行外转账CL0006(需签名)
+ */
+@Data
+public class OutOfBankTransferResp {
+    /**渠道流水号;null;15A;*/
+    private String O1TLSQ;
+    /**交易状态;见数据字典说明;2A;*/
+    private String O1JYZT;
+    /**状态描述;null;10*O;*/
+    private String O1ZTMS;
+    /**交易应答代码;null;7A;*/
+    private String O1JYYD;
+    /**失败原因;null;60*O;*/
+    private String O1SBYY;
+    /**付款账户余额;null;15P2;*/
+    private BigDecimal O1ZHYE;
+    /**手续费;null;15P2;*/
+    private BigDecimal O1PCDF;
+    /**邮电费;null;15P2;*/
+    private BigDecimal O1PSTF;
+}

+ 18 - 0
carbon-bank-service/src/main/java/com/hcloud/microserver/bank/bo/PayWagesOrReimbursementDetail.java

@@ -0,0 +1,18 @@
+package com.hcloud.microserver.bank.bo;
+
+import lombok.Data;
+
+import java.math.BigDecimal;
+
+@Data
+public class PayWagesOrReimbursementDetail {
+    /**收款人账号;必输域;19A;*/
+    private String O2SKZH;
+    /**收款人姓名;必输域;62*O;*/
+    private String O2SKXM;
+    /**金额;必输域;15P2;*/
+    private BigDecimal O2JYJE;
+    /**备注/用途;null;42*O;*/
+    private String O2JYBZ;
+
+}

+ 43 - 0
carbon-bank-service/src/main/java/com/hcloud/microserver/bank/bo/PayWagesOrReimbursementParam.java

@@ -0,0 +1,43 @@
+package com.hcloud.microserver.bank.bo;
+
+import lombok.Data;
+
+import java.math.BigDecimal;
+import java.util.List;
+
+/**
+ * 2.12.	账务支付:代发工资/代报销CL0033(需签名)
+ */
+@Data
+public class PayWagesOrReimbursementParam {
+
+    /**企业流水号;必输域;20A;*/
+    private String I1QYLS;
+    /**提交人ID;null;30A;*/
+    private String I1SMID;
+    /**最后授权人ID;null;30A;*/
+    private String I1ATID;
+    /**业务类型;必输域;3A;*/
+    private String O1YWLX;
+    /**代发月份;必输域;6P0;*/
+    private BigDecimal O1DFYF;
+    /**付款账号;必输域;19A;*/
+    private String O1FKAC;
+    /**总笔数;必输域;3P0;*/
+    private BigDecimal O1TRCT;
+    /**总金额;必输域;15P2;*/
+    private BigDecimal O1TRAM;
+    /**批次备注;null;32*O;*/
+    private BigDecimal O1PCBZ;
+    /**企业指令内部编号;null;30A;*/
+    private BigDecimal I1NBBH;
+    /**操作方式;默认:0;0:账务处理1:数据校验;1A;*/
+    private String O1FLAG;
+    /**明细展示;0:隐藏明细;1:显示明细;默认:0;1A;*/
+    private String O1SHOW;
+    /**交易类型;0:集团账号转账;1:普通转账;默认:0;1A;*/
+    private String IJYLX;
+    /**明细组合*/
+    private List<PayWagesOrReimbursementRecord> list;
+
+}

+ 8 - 0
carbon-bank-service/src/main/java/com/hcloud/microserver/bank/bo/PayWagesOrReimbursementRecord.java

@@ -0,0 +1,8 @@
+package com.hcloud.microserver.bank.bo;
+
+import lombok.Data;
+
+@Data
+public class PayWagesOrReimbursementRecord {
+    private PayWagesOrReimbursementDetail RECORD;
+}

+ 20 - 0
carbon-bank-service/src/main/java/com/hcloud/microserver/bank/bo/PayWagesOrReimbursementResp.java

@@ -0,0 +1,20 @@
+package com.hcloud.microserver.bank.bo;
+
+import lombok.Data;
+
+/**
+ * 2.12.	账务支付:代发工资/代报销CL0033(需签名)
+ */
+@Data
+public class PayWagesOrReimbursementResp extends BankResponseBase{
+    /**渠道流水号;null;15A;*/
+    private String O1TLSQ;
+    /**交易状态;见数据字典说明;2A;*/
+    private String O1JYZT;
+    /**状态描述;null;20*O;*/
+    private String O1ZTMS;
+    /**交易应答代码;null;20A;*/
+    private String O1JYYD;
+    /**失败原因;null;100*O;*/
+    private String O1SBYY;
+}

+ 32 - 0
carbon-bank-service/src/main/java/com/hcloud/microserver/bank/bo/ReimbursementInstructionQureyParam.java

@@ -0,0 +1,32 @@
+package com.hcloud.microserver.bank.bo;
+
+import lombok.Data;
+
+import java.math.BigDecimal;
+
+/**
+ * 2.13.	账务支付:代发/代报销指令列表查询CL0031
+ */
+@Data
+public class ReimbursementInstructionQureyParam {
+    /**业务类型;101:代发、102:代报销;3A;*/
+    private String I1YWLX;
+    /**付款账号;可选;19A;*/
+    private String I1FKAC;
+    /**指令状态;可选,0:全部、1:等待企业处理、2:银行处理中、3:处理完成;1A;*/
+    private String I1STT;
+    /**操作方式;默认:0、0:账务处理、1:数据校验;1A;*/
+    private String O1FLAG;
+    /**起始日期;必输域;8P0;*/
+    private BigDecimal I1STDT;
+    /**终止日期;必输域;8P0;*/
+    private BigDecimal I1EDDT;
+    /**起始金额;可选;15P2;*/
+    private BigDecimal I1BGAT;
+    /**终止金额;可选;15P2;*/
+    private BigDecimal I1EDAT;
+    /**起始条数;必输域;5P0;*/
+    private BigDecimal Num;
+    /**查询条数;必输域;3P0;*/
+    private BigDecimal QryNum;
+}

+ 19 - 0
carbon-bank-service/src/main/java/com/hcloud/microserver/bank/bo/ReimbursementInstructionResp.java

@@ -0,0 +1,19 @@
+package com.hcloud.microserver.bank.bo;
+
+import lombok.Data;
+
+import java.math.BigDecimal;
+import java.util.List;
+
+/**
+ * 2.13.	账务支付:代发/代报销指令列表查询CL0031
+ */
+@Data
+public class ReimbursementInstructionResp {
+    /**返回笔数;返回笔数;3P0;*/
+    private BigDecimal O1TLNM;
+    /**查询总条数;满足条件总记录数;5P0;*/
+    private BigDecimal totalNum;
+    /**返回笔数的明细*/
+    private List<ReimbursementInstructionRespRecord> list;
+}

+ 42 - 0
carbon-bank-service/src/main/java/com/hcloud/microserver/bank/bo/ReimbursementInstructionRespDetail.java

@@ -0,0 +1,42 @@
+package com.hcloud.microserver.bank.bo;
+
+import lombok.Data;
+
+import java.math.BigDecimal;
+
+/**
+ * 2.13.	账务支付:代发/代报销指令列表查询CL0031
+ */
+@Data
+public class ReimbursementInstructionRespDetail {
+
+    /**提交日期;null;14P0;*/
+    private BigDecimal O2TRDT;
+    /**代发账号;null;19A;*/
+    private String O2FKAC;
+    /**总笔数;null;4P0;*/
+    private BigDecimal O2TRCT;
+    /**总金额;null;15P2;*/
+    private BigDecimal O2TRAM;
+    /**流水号;null;15A;*/
+    private String O2TLSQ;
+    /**交易状态;见数据字典说明;2A;*/
+    private String O2JYZT;
+    /**指令状态;状态中文描述;20*O;*/
+    private String O2STT;
+    /**业务类型;101:代发102:代报销;3A;*/
+    private String O2YWLX;
+    /**企业流水号;null;20A;*/
+    private String O2QYLS;
+    /**月份;null;6P0;*/
+    private BigDecimal O2DFYF;
+    /**错误代码;null;20A;*/
+    private String code;
+    /**错误信息;null;100*O;*/
+    private String msg;
+    /**成功总笔数;null;4P0;*/
+    private BigDecimal O1SUCT;
+    /**成功总金额;null;15P2;*/
+    private BigDecimal O1SUAM;
+
+}

+ 11 - 0
carbon-bank-service/src/main/java/com/hcloud/microserver/bank/bo/ReimbursementInstructionRespRecord.java

@@ -0,0 +1,11 @@
+package com.hcloud.microserver.bank.bo;
+
+import lombok.Data;
+
+/**
+ * 2.13.	账务支付:代发/代报销指令列表查询CL0031
+ */
+@Data
+public class ReimbursementInstructionRespRecord {
+    private ReimbursementInstructionRespDetail RECORD;
+}

+ 18 - 0
carbon-bank-service/src/main/java/com/hcloud/microserver/bank/bo/ReimbursementInstructionsDetailQueryParam.java

@@ -0,0 +1,18 @@
+package com.hcloud.microserver.bank.bo;
+
+import lombok.Data;
+
+/***
+ * 2.14.	账务支付:代发/代报销指令详细查询CL0032
+ */
+@Data
+public class ReimbursementInstructionsDetailQueryParam {
+
+    /**企业流水号;二选一;20A;*/
+    private String I1QYLS;
+    /**渠道流水号;null;15A;*/
+    private String I1TLSQ;
+    /**操作方式;默认:0、0:账务处理、1:数据校验;1A;*/
+    private String O1FLAG;
+
+}

+ 47 - 0
carbon-bank-service/src/main/java/com/hcloud/microserver/bank/bo/ReimbursementInstructionsDetailQueryResp.java

@@ -0,0 +1,47 @@
+package com.hcloud.microserver.bank.bo;
+
+import lombok.Data;
+
+import java.math.BigDecimal;
+import java.util.List;
+
+/***
+ * 2.14.	账务支付:代发/代报销指令详细查询CL0032
+ */
+@Data
+public class ReimbursementInstructionsDetailQueryResp {
+    /**明细列表*/
+    private List<ReimbursementInstructionsDetailQueryRespRecord> list;
+
+
+    /**提交日期;null;14P0;*/
+    private BigDecimal O2TRDT;
+    /**代发账号;null;19A;*/
+    private String O2FKAC;
+    /**总笔数;null;4P0;*/
+    private BigDecimal O2TRCT;
+    /**总金额;null;15P2;*/
+    private BigDecimal O2TRAM;
+    /**流水号;null;15A;*/
+    private String O2TLSQ;
+    /**交易状态;见数据字典说明;2A;*/
+    private String O2JYZT;
+    /**指令状态;状态中文描述;20*O;*/
+    private String O2STT;
+    /**业务类型;101:代发、102:代报销;3A;*/
+    private String O2YWLX;
+    /**企业流水号;null;20A;*/
+    private String O2QYLS;
+    /**月份;null;6P0;*/
+    private BigDecimal O2DFYF;
+    /**错误代码;null;20A;*/
+    private String code;
+    /**错误信息;null;100*O;*/
+    private String msg;
+    /**成功总笔数;null;4P0;*/
+    private BigDecimal O1SUCT;
+    /**成功总金额;null;15P2;*/
+    private BigDecimal O1SUAM;
+    /**银行落地备注;null;100*O;*/
+    private String O1BKRM;
+}

+ 33 - 0
carbon-bank-service/src/main/java/com/hcloud/microserver/bank/bo/ReimbursementInstructionsDetailQueryRespDetail.java

@@ -0,0 +1,33 @@
+package com.hcloud.microserver.bank.bo;
+
+import lombok.Data;
+
+import java.math.BigDecimal;
+
+/***
+ * 2.14.	账务支付:代发/代报销指令详细查询CL0032
+ */
+@Data
+public class ReimbursementInstructionsDetailQueryRespDetail {
+    /**收款人账号;null;19A;*/
+    private String O2SKZH;
+    /**收款人姓名;null;62*O;*/
+    private String O2SKXM;
+    /**金额;null;15P2;*/
+    private BigDecimal O2JYJE;
+    /**备注/用途;null;42*O;*/
+    private String O2JYBZ;
+    /**交易结果;处理成功:0、处理失败:1、处理中:2;1A;*/
+    private String O2JYJG;
+    /**错误代码;null;20A;*/
+    private String code;
+    /**错误信息;null;100*O;*/
+    private String msg;
+    /**入账日期;null;8P0;*/
+    private BigDecimal date;
+    /**入账时间;null;6P0;*/
+    private BigDecimal time;
+    /**核心流水;null;15A;*/
+    private BigDecimal flowno;
+
+}

+ 11 - 0
carbon-bank-service/src/main/java/com/hcloud/microserver/bank/bo/ReimbursementInstructionsDetailQueryRespRecord.java

@@ -0,0 +1,11 @@
+package com.hcloud.microserver.bank.bo;
+
+import lombok.Data;
+
+/***
+ * 2.14.	账务支付:代发/代报销指令详细查询CL0032
+ */
+@Data
+public class ReimbursementInstructionsDetailQueryRespRecord {
+    private ReimbursementInstructionsDetailQueryRespDetail RECORD;
+}

+ 55 - 0
carbon-bank-service/src/main/java/com/hcloud/microserver/bank/bo/SingleTransferInstructionQueryResp.java

@@ -0,0 +1,55 @@
+package com.hcloud.microserver.bank.bo;
+
+import lombok.Data;
+
+import java.math.BigDecimal;
+
+/**
+ * 2.11.	指令查询:查询支付单笔指令详细(转账单笔指令详细)CL0008
+ * 请求类型用TransactionOrderStatusQueryParam不加业务类型
+ */
+@Data
+public class SingleTransferInstructionQueryResp {
+    /**提交日期;null;14;*/
+    private String O1TRDT;
+    /**交易类型;0:行内转账1:行外转账;1A;*/
+    private String O2JYLX;
+    /**付款账号;null;19A;*/
+    private String O1FKAC;
+    /**付款户名;null;300O;*/
+    private String O1FKNM;
+    /**付款行行号;null;12A;*/
+    private String O1FKHH;
+    /**收款账号;null;19A;*/
+    private String O1SKAC;
+    /**收款户名;null;300O;*/
+    private String O1SKNM;
+    /**收款方开户行联行号;他行使用;12A;*/
+    private String O1CTNO;
+    /**交易金额;null;15P2;*/
+    private BigDecimal O1TRAM;
+    /**加急标志;null;2*O;*/
+    private BigDecimal O1EGFG;
+    /**交易币种;null;3A;*/
+    private String O1CYTP;
+    /**币种中文描述;null;10*O;*/
+    private String O1BZZW;
+    /**付款用途;null;100*O;*/
+    private String O1FKYT;
+    /**备注;null;300O;*/
+    private String O1REM;
+    /**银行落地备注;null;300O;*/
+    private String O1BKRM;
+    /**手续费;null;15P2;*/
+    private BigDecimal O1PCDF;
+    /**邮电费;null;15P2;*/
+    private BigDecimal O1PSTF;
+    /**渠道流水号;null;15A;*/
+    private BigDecimal O1TLSQ;
+    /**指令状态;见数据字典说明;10*O;*/
+    private BigDecimal O1STT;
+    /**主机返回码;null;20A;*/
+    private BigDecimal O1HTCD;
+    /**主机返回错误信息;null;300O;*/
+    private String O1HTMG;
+}

+ 18 - 0
carbon-bank-service/src/main/java/com/hcloud/microserver/bank/bo/TransactionOrderStatusQueryParam.java

@@ -0,0 +1,18 @@
+package com.hcloud.microserver.bank.bo;
+
+import lombok.Data;
+
+/***
+ *2.9.	指令查询:交易指令状态查询CL0042
+ */
+@Data
+public class TransactionOrderStatusQueryParam {
+
+    /**企业流水号;二选一I1TLSQ;20A;*/
+    private String I1QYLS;
+    /**渠道流水号;二选一I1QYLS;15A;*/
+    private String I1TLSQ;
+    /**业务类型;必输,如行内转账的业务类型为:CL0005;6A;*/
+    private String I1YWLX;
+
+}

+ 15 - 0
carbon-bank-service/src/main/java/com/hcloud/microserver/bank/bo/TransactionOrderStatusQueryResp.java

@@ -0,0 +1,15 @@
+package com.hcloud.microserver.bank.bo;
+
+import lombok.Data;
+
+@Data
+public class TransactionOrderStatusQueryResp {
+    /**交易状态;见数据字典说明;2A;*/
+    private String O1JYZT;
+    /**状态描述;状态中文描述;10*O;*/
+    private String O1ZTMS;
+    /**交易应答代码;null;7A;*/
+    private String O1JYYD;
+    /**失败原因;null;60*O;*/
+    private String O1SBYY;
+}

+ 33 - 0
carbon-bank-service/src/main/java/com/hcloud/microserver/bank/bo/TransferTransactionInstructionDetail.java

@@ -0,0 +1,33 @@
+package com.hcloud.microserver.bank.bo;
+
+import lombok.Data;
+
+import java.math.BigDecimal;
+
+/**
+ * 转账交易指令明细
+ */
+@Data
+public class TransferTransactionInstructionDetail {
+    /**提交日期;null;8P0;*/
+    private BigDecimal O2TRDT;
+    /**交易类型;交易类型中文描述;10*O;*/
+    private BigDecimal O2JYLX;
+    /**付款账号;null;19A;*/
+    private BigDecimal O2FKAC;
+    /**收款账号;null;19A;*/
+    private BigDecimal O2SKAC;
+    /**交易金额;null;15P2;*/
+    private BigDecimal O2TRAM;
+    /**手续费;null;15P2;*/
+    private BigDecimal O2PCDF;
+    /**邮电费;null;15P2;*/
+    private BigDecimal O2PSTF;
+    /**渠道流水号;null;15A;*/
+    private BigDecimal O2TLSQ;
+    /**指令状态;状态中文描述;10*O;*/
+    private BigDecimal O2STT;
+    /**企业流水号;null;20A;*/
+    private BigDecimal O2QYLS;
+
+}

+ 32 - 0
carbon-bank-service/src/main/java/com/hcloud/microserver/bank/bo/TransferTransactionInstructionQueryParam.java

@@ -0,0 +1,32 @@
+package com.hcloud.microserver.bank.bo;
+
+import lombok.Data;
+
+import java.math.BigDecimal;
+
+/**
+ * 2.10.	指令查询:查询支付单笔指令列表(转账交易指令查询)CL0007
+ */
+@Data
+public class TransferTransactionInstructionQueryParam {
+    /**交易类型;必输域0:行内转账1:行外转账;1A;*/
+    private String I1JYLX;
+    /**付款账号;可选;19A;*/
+    private String I1FKAC;
+    /**收款账号;可选;19A;*/
+    private String I1SKAC;
+    /**指令状态;可选;1A;*/
+    private String I1STT;
+    /**起始日期;必输域;8P0;*/
+    private BigDecimal I1STDT;
+    /**终止日期;必输域;8P0;*/
+    private BigDecimal I1EDDT;
+    /**起始金额;可选;15P2;*/
+    private BigDecimal I1BGAT;
+    /**终止金额;可选;15P2;*/
+    private BigDecimal I1EDAT;
+    /**起始条数;可选;5P0;*/
+    private BigDecimal Num;
+    /**查询条数;可选(最大2000);4P0;*/
+    private BigDecimal QryNum;
+}

+ 20 - 0
carbon-bank-service/src/main/java/com/hcloud/microserver/bank/bo/TransferTransactionInstructionQueryResp.java

@@ -0,0 +1,20 @@
+package com.hcloud.microserver.bank.bo;
+
+import lombok.Data;
+
+import java.math.BigDecimal;
+import java.util.List;
+
+/**
+ * 2.10.	指令查询:查询支付单笔指令列表(转账交易指令查询)CL0007
+ */
+@Data
+public class TransferTransactionInstructionQueryResp {
+
+    /**总笔数;本次查询总笔数;5P0;*/
+    private BigDecimal O1TLNM;
+    /**查询总条数;满足条件总记录数;5P0;*/
+    private BigDecimal ResReserved1;
+    /**明细*/
+    private List<TransferTransactionInstructionDetail> list;
+}

+ 42 - 0
carbon-bank-service/src/main/java/com/hcloud/microserver/bank/service/BankTransactionService.java

@@ -0,0 +1,42 @@
+package com.hcloud.microserver.bank.service;
+
+import com.hcloud.microserver.bank.bo.*;
+
+public interface BankTransactionService {
+
+    /**
+     * 2.4.	账务查询:活期账户查询CL0003
+     * @param param
+     * @return
+     */
+    public CurrentAccountQueryResp currentAccountQuery(CurrentAccountQueryParam param);
+
+    /**
+     *
+     * 2.5.	账务查询:活期账户明细查询CL0004
+     * @param param
+     * @return
+     */
+    public CurrentAccountQueryDetailTotalResp currentAccountDetailQuery(CurrentAccountDetailQueryParam param);
+
+    /**
+     * 2.6.	转账:行内转账CL0005(需签名)
+     * @param param
+     * @return
+     */
+    public  IntrabankTransferResp intrabankTransfer(IntrabankTransferParam param);
+    /**
+     * 2.14.	账务支付:代发/代报销指令详细查询CL0032
+     * @param param
+     * @return
+     */
+    public ReimbursementInstructionsDetailQueryResp reimbursementInstructionsDetailQuery(ReimbursementInstructionsDetailQueryParam param);
+
+    /**
+     * 2.15.	账务支付:代发/代扣指令详情信息查询CL0034
+     * @param param
+     * @return
+     */
+    public InquiryOfWithholdingInstructionDetailsResp inquiryOfWithholdingInstructionDetails(InquiryOfWithholdingInstructionDetailsParam param);
+
+}

+ 17 - 0
carbon-bank-service/src/main/java/com/hcloud/microserver/bank/service/BankUserService.java

@@ -0,0 +1,17 @@
+package com.hcloud.microserver.bank.service;
+
+import com.hcloud.microserver.bank.bo.BankLoginUserReqParam;
+import com.hcloud.microserver.bank.bo.BankLoginUserRespBO;
+
+/**
+ * 银行用户
+ */
+public interface BankUserService {
+    /**
+     * serviceId为CL0001
+     * @param reqBO
+     * @return
+     */
+    public BankLoginUserRespBO loginUser(BankLoginUserReqParam reqBO);
+
+}

+ 6 - 0
carbon-bank-service/src/main/java/com/hcloud/microserver/bank/service/SocketService.java

@@ -0,0 +1,6 @@
+package com.hcloud.microserver.bank.service;
+
+public interface SocketService {
+
+    public String sendSignRequestTCP(String oriData);
+}

+ 100 - 0
carbon-bank-service/src/main/java/com/hcloud/microserver/bank/service/impl/BankTransactionServiceImpl.java

@@ -0,0 +1,100 @@
+package com.hcloud.microserver.bank.service.impl;
+
+import com.alibaba.fastjson.JSONObject;
+import com.hcloud.microserver.bank.bo.*;
+import com.hcloud.microserver.bank.service.BankTransactionService;
+import com.hcloud.microserver.bank.util.BankNoUtial;
+import com.hcloud.microserver.bank.util.BankUtil;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.Date;
+@Slf4j
+@Service
+public class BankTransactionServiceImpl implements BankTransactionService {
+    @Autowired
+    private BankUtil bankUtil;
+    @Override
+    public CurrentAccountQueryResp currentAccountQuery(CurrentAccountQueryParam param) {
+
+        if (param == null){
+            return null;
+        }
+        String num = BankNoUtial.NextOrderNo();
+        String time = bankUtil.getTime(new Date());
+        String serviceId = "CL0003";
+//        String sessionId="-1";
+        BankLoginUserRespBO loginSession = bankUtil.getLoginSession();
+        String sessionId = loginSession.getSessionId();
+
+        BankQueryBaseParam<CurrentAccountQueryParam> paramReq = new BankQueryBaseParam<>();
+        paramReq.setData(param);
+        paramReq.setReqTime(time);
+        paramReq.setServiceId(serviceId);
+        paramReq.setSessionId(sessionId);
+        paramReq.setSerialNo(num);
+        CurrentAccountQueryResp currentAccountQueryResp =(CurrentAccountQueryResp) bankUtil.bankRequst(paramReq, 0, CurrentAccountQueryResp.class);
+        log.info(JSONObject.toJSONString(currentAccountQueryResp));
+
+        return currentAccountQueryResp;
+
+    }
+
+    @Override
+    public CurrentAccountQueryDetailTotalResp currentAccountDetailQuery(CurrentAccountDetailQueryParam param) {
+        if (param == null){
+            return null;
+        }
+        String num = BankNoUtial.NextOrderNo();
+        String time = bankUtil.getTime(new Date());
+        String serviceId = "CL0004";
+//        String sessionId="-1";
+        BankLoginUserRespBO loginSession = bankUtil.getLoginSession();
+        String sessionId = loginSession.getSessionId();
+
+        BankQueryBaseParam<CurrentAccountDetailQueryParam> paramReq = new BankQueryBaseParam<>();
+        paramReq.setData(param);
+        paramReq.setReqTime(time);
+        paramReq.setServiceId(serviceId);
+        paramReq.setSessionId(sessionId);
+        paramReq.setSerialNo(num);
+        CurrentAccountQueryDetailTotalResp curDetailTotal =(CurrentAccountQueryDetailTotalResp) bankUtil.bankRequst(paramReq, 0, CurrentAccountQueryDetailTotalResp.class);
+        log.info(JSONObject.toJSONString(curDetailTotal));
+        return curDetailTotal;
+    }
+
+    @Override
+    public IntrabankTransferResp intrabankTransfer(IntrabankTransferParam param) {
+        if (param == null){
+            return null;
+        }
+        String num = BankNoUtial.NextOrderNo();
+        String time = bankUtil.getTime(new Date());
+        String serviceId = "CL0004";
+//        String sessionId="-1";
+        BankLoginUserRespBO loginSession = bankUtil.getLoginSession();
+        String sessionId = loginSession.getSessionId();
+
+        BankQueryBaseParam<IntrabankTransferParam> paramReq = new BankQueryBaseParam<>();
+        paramReq.setData(param);
+        paramReq.setReqTime(time);
+        paramReq.setServiceId(serviceId);
+        paramReq.setSessionId(sessionId);
+        paramReq.setSerialNo(num);
+        IntrabankTransferResp intrabankTransferResp =(IntrabankTransferResp) bankUtil.bankRequst(paramReq, 1, IntrabankTransferResp.class);
+        log.info(JSONObject.toJSONString(intrabankTransferResp));
+        return intrabankTransferResp;
+
+    }
+
+    @Override
+    public ReimbursementInstructionsDetailQueryResp reimbursementInstructionsDetailQuery(ReimbursementInstructionsDetailQueryParam param) {
+        return null;
+    }
+
+    @Override
+    public InquiryOfWithholdingInstructionDetailsResp inquiryOfWithholdingInstructionDetails(InquiryOfWithholdingInstructionDetailsParam param) {
+        return null;
+    }
+}

+ 53 - 0
carbon-bank-service/src/main/java/com/hcloud/microserver/bank/service/impl/BankUserServiceImpl.java

@@ -0,0 +1,53 @@
+package com.hcloud.microserver.bank.service.impl;
+
+import com.alibaba.fastjson.JSONObject;
+import com.hcloud.microserver.bank.bo.BankLoginUserReqParam;
+import com.hcloud.microserver.bank.bo.BankLoginUserRespBO;
+import com.hcloud.microserver.bank.bo.BankQueryBaseParam;
+import com.hcloud.microserver.bank.service.BankUserService;
+import com.hcloud.microserver.bank.util.BankNoUtial;
+import com.hcloud.microserver.bank.util.BankUtil;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.data.redis.core.RedisTemplate;
+import org.springframework.stereotype.Service;
+
+import java.util.Date;
+
+@Slf4j
+@Service
+public class BankUserServiceImpl implements BankUserService {
+
+
+
+    @Autowired
+    private BankUtil bankUtil;
+
+    @Autowired
+    private RedisTemplate redisTemplate;
+
+
+
+    @Override
+    public BankLoginUserRespBO loginUser(BankLoginUserReqParam reqBO) {
+        if (reqBO == null){
+            return null;
+        }
+        String num = BankNoUtial.NextOrderNo();
+        String time = bankUtil.getTime(new Date());
+        String serviceId = "CL0001";
+        String sessionId="-1";
+        BankQueryBaseParam<BankLoginUserReqParam> param = new BankQueryBaseParam<>();
+        param.setData(reqBO);
+        param.setReqTime(time);
+        param.setServiceId(serviceId);
+        param.setSessionId(sessionId);
+        param.setSerialNo(num);
+        BankLoginUserRespBO bankResponseBase =(BankLoginUserRespBO) bankUtil.bankRequst(param, 1, BankLoginUserRespBO.class);
+        log.info(JSONObject.toJSONString(bankResponseBase));
+        if ("00000000".equals(bankResponseBase.getRetCode())){
+            bankUtil.cacheLoginSession(bankResponseBase);
+        }
+        return bankResponseBase;
+    }
+}

+ 76 - 0
carbon-bank-service/src/main/java/com/hcloud/microserver/bank/service/impl/SocketServiceImpl.java

@@ -0,0 +1,76 @@
+package com.hcloud.microserver.bank.service.impl;
+
+import com.hcloud.microserver.bank.service.SocketService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.stereotype.Service;
+
+import java.io.BufferedInputStream;
+import java.io.BufferedOutputStream;
+import java.net.Socket;
+
+@Service
+public class SocketServiceImpl implements SocketService {
+
+    private String charset="UTF-8";
+
+    @Value("${cqrcb.bank.sign.ip}")
+    private String ip;
+
+    @Value("${cqrcb.bank.sign.port}")
+    private int port;
+
+    @Override
+    public String sendSignRequestTCP(String oriData) {
+        StringBuffer sb = new StringBuffer("");
+        Socket socket = null;
+        BufferedInputStream in = null;
+        BufferedOutputStream out = null;
+        try {
+            int length = oriData.getBytes(charset).length;
+            byte[] buf = new byte[length + 5];
+            String lenValue = String.valueOf(length);
+            System.arraycopy(oriData.getBytes(charset), 0, buf, 5, length);
+            for (int i = 0; i < 5; i++)
+                buf[i] = '0';
+            int idx = 0;
+            for (int i = 5 - lenValue.length(); i < 5; i++) {
+                buf[i] = (byte) lenValue.charAt(idx++);
+            }
+            socket = new Socket(ip, port);
+            out = new BufferedOutputStream(socket.getOutputStream());
+            out.write(buf);
+            out.flush();
+            in = new BufferedInputStream(socket.getInputStream());
+            byte[] buffer = new byte[1024];
+            int len = 0;
+            while ((len = in.read(buffer)) != -1) {
+                sb.append(new String(buffer, 0, len, charset));
+            }
+        } catch (Exception e) {
+            sb = new StringBuffer("-1");
+            e.printStackTrace();
+        } finally {
+            try {
+                if (null != socket) {
+                    socket.close();
+                }
+            } catch (Exception e) {
+                e.printStackTrace();
+            }
+            try {
+                if (out != null)
+                    out.close();
+            } catch (Exception e) {
+                e.printStackTrace();
+            }
+            try {
+                if (in != null)
+                    in.close();
+            } catch (Exception e) {
+                e.printStackTrace();
+            }
+        }
+        return sb.toString();
+    }
+}

+ 47 - 0
carbon-bank-service/src/main/java/com/hcloud/microserver/bank/util/BankNoUtial.java

@@ -0,0 +1,47 @@
+package com.hcloud.microserver.bank.util;
+
+import java.text.DateFormat;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+public class BankNoUtial {
+    private static int sn = 0;
+
+    public static String NextOrderNo(){
+        if(sn == 999999999)
+            sn = 0;
+        else
+            sn++;
+        DateFormat df = new SimpleDateFormat("yyyyMMddHHmmss");
+        return df.format(new Date()) + padRight(String.valueOf(sn),9, '0');
+    }
+    public static String padLeft(String src, int len, char ch) {
+        int diff = len - src.length();
+        if (diff <= 0) {
+            return src;
+        }
+
+        char[] charr = new char[len];
+        System.arraycopy(src.toCharArray(), 0, charr, 0, src.length());
+        for (int i = src.length(); i < len; i++) {
+            charr[i] = ch;
+        }
+        return new String(charr);
+    }
+    public static String padRight(String src, int len, char ch) {
+        int diff = len - src.length();
+        if (diff <= 0) {
+            return src;
+        }
+
+        char[] charr = new char[len];
+        System.arraycopy(src.toCharArray(), 0, charr, diff, src.length());
+        for (int i = 0; i < diff; i++) {
+            charr[i] = ch;
+        }
+        return new String(charr);
+    }
+    // 防止创建类的实例
+    private BankNoUtial(){}
+
+}

+ 396 - 0
carbon-bank-service/src/main/java/com/hcloud/microserver/bank/util/BankUtil.java

@@ -0,0 +1,396 @@
+package com.hcloud.microserver.bank.util;
+
+import com.alibaba.fastjson.JSONObject;
+import com.hcloud.microserver.bank.bo.BankLoginUserRespBO;
+import com.hcloud.microserver.bank.bo.BankQueryBaseParam;
+import com.hcloud.microserver.bank.bo.BankResponseBase;
+import com.hcloud.microserver.commoncore.util.string.StringUtils;
+import lombok.Data;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.httpclient.HttpClient;
+import org.apache.commons.httpclient.HttpStatus;
+import org.apache.commons.httpclient.methods.PostMethod;
+import org.dom4j.DocumentException;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.data.redis.core.RedisTemplate;
+import org.springframework.data.redis.core.ValueOperations;
+import org.springframework.stereotype.Component;
+import java.io.*;
+import java.net.Socket;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.concurrent.TimeUnit;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+@Slf4j
+@Data
+@Component
+public class BankUtil {
+
+    private final static SimpleDateFormat format = new SimpleDateFormat("yyyyMMddHHmmss");
+
+    private String charset="gb2312";
+
+    @Value("${cqrcb.bank.sign.ip}")
+    private String ipSign;
+
+    @Value("${cqrcb.bank.sign.port}")
+    private int portSign;
+
+    @Value("${cqrcb.bank.sslclient.ip}")
+    private String ip;
+
+    @Value("${cqrcb.bank.sslclient.port}")
+    private int port;
+
+    @Autowired
+    private RedisTemplate redisTemplate;
+
+    /**
+     * 根据传入实体进行业务接口对接
+     * @param param
+     * @param type 0 为不签名  1 为签名
+     * @param clazz
+     * @return
+     */
+    public BankResponseBase  bankRequst(BankQueryBaseParam param, int type,Class<? extends BankResponseBase> clazz) {
+        if (param==null||param.getData()==null){
+            return null;
+        }
+        Object paramData = param.getData();
+        Map<String,Object> reqParam= new HashMap<>();
+        reqParam.put("ReqParam",paramData);
+        Map<String,Object> opReq = new HashMap<>();
+        opReq.put("opReq",reqParam);
+        Map<String,Object> CQRCBBankData = new HashMap<>();
+        CQRCBBankData.put("CQRCBBankData",opReq);
+        try {
+            if (type ==1){
+                String s = packSignXml(paramData);
+                opReq.put("signData",s);
+            }
+
+            Object o = JSONObject.toJSON(CQRCBBankData);
+            RemoveNullAttr re = new RemoveNullAttr();
+            Object o1 = re.traverseJson(o);
+            String s = JsonAndXmlUtils.jsonToPrettyXml((JSONObject)o1);
+            String url1 = "http://"+ip+":"+port+"/corporLink";
+            String h = param.getSessionId()+"|"+param.getServiceId()+"|"+param.getSerialNo()+"|"+param.getReqTime()+"|#";
+
+            log.info("request cqcrb url:"+url1);
+            log.info(param.getServiceId()+" request cqcrb content:"+h+s);
+            String resp = sendPost(url1, h + s);
+            log.info("cqcrb response content:"+resp);
+            return xmlStringToEntity(resp,clazz);
+//            return resp;
+        }catch (Exception e){
+            log.info("fail to request "+param.getServiceId()+"{}",paramData);
+        }
+        return null;
+    }
+
+    /**
+     * 解析xml文件维对应的实体
+     * @param xmlString
+     * @param clazz
+     * @return
+     */
+    public BankResponseBase xmlStringToEntity(String xmlString,Class<? extends BankResponseBase> clazz) throws Exception {
+        if (StringUtils.isEmpty(xmlString)){
+            return null;
+        }
+
+        String [] split;
+        if (xmlString.contains("|#")){
+            String name = clazz.getName();
+            BankResponseBase responseBase = clazz.newInstance();
+
+
+            String headString = xmlString.substring(0, xmlString.lastIndexOf("|#"));
+            String xml = xmlString.substring(xmlString.lastIndexOf("|#")+2);
+
+            split = headString.split("\\|");
+            int length = split.length;
+            if (length <3){
+                return null;
+            }
+
+
+
+            JSONObject jsonObject = JsonAndXmlUtils.xmlToJson(xml);
+            log.info(xml);
+            if (jsonObject.containsKey("CQRCBBankData")){
+                JSONObject CQRCBBankDataJSON = (JSONObject) jsonObject.get("CQRCBBankData");
+                if (CQRCBBankDataJSON.containsKey("opRep")){
+                    JSONObject opRepJSON = (JSONObject) CQRCBBankDataJSON.get("opRep");
+                    if (opRepJSON.containsKey("opResult")){
+                        Object opResultObject =  opRepJSON.get("opResult");
+//                        net.sf.json.JSONObject jsonObject1 = net.sf.json.JSONObject.fromObject(opResultObject);
+//                        responseBase = (BankResponseBase) net.sf.json.JSONObject.toBean(jsonObject1, clazz);
+                        responseBase = JSONObject.parseObject(JSONObject.toJSONString(opResultObject), clazz);
+                        responseBase.setSessionId(split[0]);
+                        responseBase.setSerialNo(split[1]);
+                        responseBase.setRetCode(split[2]);
+                        if (length > 3){
+                            responseBase.setErrorMsg(split[3]);
+                        }
+                    }
+                }
+            }
+            return responseBase;
+
+        }
+
+
+        return null;
+    }
+
+    /**
+     * 发送xml请求到server端
+     * @param url xml请求数据地址
+     * @param xmlString 发送的xml数据流
+     * @return null发送失败,否则返回响应内容
+     */
+    public  String sendPost(String url,String xmlString){
+        //创建httpclient工具对象
+        HttpClient client = new HttpClient();
+        //创建post请求方法
+        PostMethod myPost = new PostMethod(url);
+        //设置请求超时时间
+//        client.setConnectionTimeout(3000*1000);
+        String responseString = null;
+        try{
+            //设置请求头部类型
+            myPost.setRequestHeader("Content-Type","text/xml;charset=utf-8");
+
+            //设置请求体,即xml文本内容,一种是直接获取xml内容字符串,一种是读取xml文件以流的形式
+            myPost.setRequestBody(xmlString);
+            int statusCode = client.executeMethod(myPost);
+            //只有请求成功200了,才做处理
+            if(statusCode == HttpStatus.SC_OK){
+                InputStream inputStream = myPost.getResponseBodyAsStream();
+//                BufferedReader br = new BufferedReader(new InputStreamReader(inputStream,"UTF-8"));
+//                StringBuffer stringBuffer = new StringBuffer();
+//                String str = "";
+//                while ((str = br.readLine()) != null) {
+//                    stringBuffer.append(str);
+//                }
+//                responseString = stringBuffer.toString();
+                responseString = convertStreamToString(inputStream);
+            }
+        }catch (Exception e) {
+            e.printStackTrace();
+        }finally{
+            myPost.releaseConnection();
+        }
+        return responseString;
+    }
+
+
+    public  String convertStreamToString(InputStream is) {
+        StringBuilder sb1 = new StringBuilder();
+        byte[] bytes = new byte[4096];
+        int size = 0;
+
+        try {
+            while ((size = is.read(bytes)) > 0) {
+                String str = new String(bytes, 0, size, "UTF-8");
+                sb1.append(str);
+            }
+        } catch (IOException e) {
+            e.printStackTrace();
+        } finally {
+            try {
+                is.close();
+            } catch (IOException e) {
+                e.printStackTrace();
+            }
+        }
+        return sb1.toString();
+    }
+
+
+    /**
+     * 1.	sessionId为会话编号,每次登录之后会产生一个唯一的编号,用于标识这次会话。用户每次进行交易时都必须上送该Id。如果是登录交易,则请求报文头中的sessionId传-1即可。
+     * 2.	serviceId为服务编号,用以区分不同的操作,见具体交易格式说明,如登录交易的服务编号为: CL0001。
+     * 3.	serialNo为交易序列号,客户端唯一标识,返回时原样返回。
+     * 4.	reqTime为请求时间,yyyyMMddHHmmss。
+     * 5.	retCode和errorMsg为响应代码和错误信息,请求处理成功时,返回代码为’00000000’,错误信息留空;其它情况均视为请求处理失败。
+     * 6.	请求报文体和响应报文体为XML格式,封装了具体的交易数据,格式请参见下一章节描述。
+     * 7.	对于登录和转账等交易,请求报文体需要进行签名。
+     * 8.	登录后,企业客户如果在设定时间之内没有进行任何请求,该会话将被自动清理,需要重新登录后才可以进行一般交易请求。(目前暂定:设置超时时间为12小时)
+     * 9.	如果sessionId对应的会话是超时或者非法的时候,服务端只会返回响应报文头“-1|EBLN0000|会话已超时,请重新登录|#”,不会返回报文体。
+     * 10.	如果请求的XML包格式不正确,或者opName指定的交易名称不正确时,服务器端也只会返回响应报文头,不会返回报文体。
+     * @param sessionId
+     * @param serviceId
+     * @return
+     */
+    public String getRequestUrl(String ip,int port,String sessionId,String serviceId,String serialNo){
+        String url = "http://"+ip+":"+port;
+        return url;
+    }
+
+    public  String getTime(Date date){
+        return format.format(date);
+    }
+
+    public String sendSignRequestTCP(String oriData) {
+        StringBuffer sb = new StringBuffer("");
+        Socket socket = null;
+        BufferedInputStream in = null;
+        BufferedOutputStream out = null;
+        log.info("sign ip:"+ipSign);
+        log.info("sign port:"+portSign);
+        log.info("sign content:"+oriData);
+        try {
+            int length = oriData.getBytes(charset).length;
+            byte[] buf = new byte[length + 5];
+            String lenValue = String.valueOf(length);
+            System.arraycopy(oriData.getBytes(charset), 0, buf, 5, length);
+            for (int i = 0; i < 5; i++)
+                buf[i] = '0';
+            int idx = 0;
+            for (int i = 5 - lenValue.length(); i < 5; i++) {
+                buf[i] = (byte) lenValue.charAt(idx++);
+            }
+            socket = new Socket(ipSign, portSign);
+            out = new BufferedOutputStream(socket.getOutputStream());
+            out.write(buf);
+            out.flush();
+            in = new BufferedInputStream(socket.getInputStream());
+            byte[] buffer = new byte[1024];
+            int len = 0;
+            while ((len = in.read(buffer)) != -1) {
+                sb.append(new String(buffer, 0, len, charset));
+            }
+        } catch (Exception e) {
+            sb = new StringBuffer("-1");
+            e.printStackTrace();
+        } finally {
+            try {
+                if (null != socket) {
+                    socket.close();
+                }
+            } catch (Exception e) {
+                e.printStackTrace();
+            }
+            try {
+                if (out != null)
+                    out.close();
+            } catch (Exception e) {
+                e.printStackTrace();
+            }
+            try {
+                if (in != null)
+                    in.close();
+            } catch (Exception e) {
+                e.printStackTrace();
+            }
+        }
+        return sb.toString();
+    }
+
+    /**
+     * <msg>
+     * <msg_head>
+     * <msg_type>0</msg_type>
+     * <msg_id>1005</msg_id>
+     * <msg_sn>0</msg_sn>
+     * <version>1</version>
+     * </msg_head>
+     * <msg_body>
+     * <origin_data_len>签名原文的长度</origin_data_len>
+     * <origin_data>签名原文</origin_data>
+     * </msg_body>
+     * </msg>
+     * @param paramData
+     * @return
+     */
+    public String packSignXml(Object paramData) throws Exception {
+        if (paramData == null){
+            return null;
+        }
+        JSONObject si = new JSONObject();
+        si.put("ReqParam",JSONObject.toJSON(paramData));
+
+            String sJson = JsonAndXmlUtils.JsonToXml((JSONObject) JSONObject.parse(JSONObject.toJSONString(si)));
+            String substring = sJson.substring(sJson.lastIndexOf("<ReqParam>"));
+
+
+            log.info("签名后的数据:"+substring);
+            JSONObject head =new JSONObject();
+            head.put("msg_type",0);
+            head.put("msg_id",1005);
+            head.put("msg_sn",0);
+            head.put("version",1);
+            JSONObject body = new JSONObject();
+            body.put("origin_data_len",substring.length());
+            body.put("origin_data","dataDataJxml");
+            JSONObject msg = new JSONObject();
+            msg.put("msg_head",head);
+            msg.put("msg_body",body);
+            JSONObject req = new JSONObject();
+            req.put("msg",msg);
+            String s = JsonAndXmlUtils.JsonToXml(req);
+            String dataDataJxml = s.replace("dataDataJxml", substring);
+            String s1 = sendSignRequestTCP(dataDataJxml);
+            String s2 = xmlToSignData(s1);
+            log.info("sign return data :"+s1);
+            log.info("data sign content :"+s2);
+            return s2;
+
+    }
+
+    public String xmlToSignData(String xmlString) throws DocumentException {
+        JSONObject jsonObject = JsonAndXmlUtils.xmlToJson(xmlString);
+        if (jsonObject.containsKey("msg")){
+            JSONObject msg = (JSONObject)jsonObject.get("msg");
+            if (msg.containsKey("msg_body")){
+                JSONObject msg_body = (JSONObject)msg.get("msg_body");
+                if (msg_body.containsKey("signed_data")){
+                    String signed_data = msg_body.get("signed_data").toString();
+
+                    return replaceBlank(signed_data);
+                }
+            }
+        }
+        return null;
+    }
+
+
+
+    public  String replaceBlank(String str) {
+
+        String dest = "";
+        if (str!=null) {
+            Pattern p = Pattern.compile("\\s*|\t|\r|\n");
+            Matcher m = p.matcher(str);
+            dest = m.replaceAll("");
+        }
+        return dest;
+
+    }
+
+
+    public void cacheLoginSession(BankLoginUserRespBO bankLoginUserRespBO){
+        ValueOperations ops = redisTemplate.opsForValue();
+        ops.set("cqcarbon.bank.user.sessionId",bankLoginUserRespBO,12*3600, TimeUnit.SECONDS);
+    }
+
+    public BankLoginUserRespBO getLoginSession(){
+        ValueOperations ops = redisTemplate.opsForValue();
+        BankLoginUserRespBO o = (BankLoginUserRespBO)ops.get("cqcarbon.bank.user.sessionId");
+        if (o != null){
+            return o;
+        }
+        return null;
+    }
+
+
+
+
+}

+ 81 - 0
carbon-bank-service/src/main/java/com/hcloud/microserver/bank/util/HttpSSLUtil.java

@@ -0,0 +1,81 @@
+package com.hcloud.microserver.bank.util;
+
+import com.hcloud.microserver.bank.bo.MyX509Manager;
+import lombok.extern.slf4j.Slf4j;
+
+import javax.net.ssl.*;
+import java.io.*;
+import java.net.URL;
+import java.security.SecureRandom;
+@Slf4j
+public class HttpSSLUtil {
+    /**
+     * 发送https请求共用体
+     */
+    public static   String  sendPost(String url,String xml) {
+
+        PrintWriter out = null;
+        BufferedReader in = null;
+        String result = "";
+        URL realUrl;
+        javax.net.ssl.HttpsURLConnection conn;
+        String method = "POST";
+        BufferedOutputStream o = null;
+
+
+
+        try {
+            TrustManager[] tm = {new MyX509Manager()};
+            SSLContext aDefault = SSLContext.getInstance("SSL");
+            aDefault.init(null,tm,new SecureRandom());
+            SSLSocketFactory ssf = aDefault.getSocketFactory();
+
+//        SSLSocketFactory ssf= HttpsClientUtils.getSSFactory();
+            realUrl= new URL(null, url, new sun.net.www.protocol.https.Handler());
+            conn = (javax.net.ssl.HttpsURLConnection)realUrl.openConnection();
+            conn.setSSLSocketFactory(ssf);
+            conn.setRequestProperty("Content-Type","text/xml;Charset=UTF-8");
+            conn.setRequestMethod(method);
+            conn.setDoOutput(true);
+            conn.setDoInput(true);
+            conn.setUseCaches(false);
+            conn.setHostnameVerifier(new HostnameVerifier() {
+                @Override
+                public boolean verify(String s, SSLSession sslSession) {
+                    return true;
+                }
+            });
+            o = new BufferedOutputStream(conn.getOutputStream());
+            o.write(xml.getBytes("UTF-8"));
+//            out = new PrintWriter(conn.getOutputStream());
+//            out.print(xml);
+//            out.flush();
+            o.flush();
+
+            in = new BufferedReader(
+                    new InputStreamReader(conn.getInputStream(),"utf-8"));
+
+
+            String line;
+            while ((line = in.readLine()) != null) {
+                log.info(line);
+                result += line;
+            }
+//            json = JSONObject.fromObject(result);
+        }catch (Exception e){
+            e.printStackTrace();
+        }finally {
+            try {
+                if (out != null) {
+                    out.close();
+                }
+                if (in != null) {
+                    in.close();
+                }
+            } catch (IOException ex) {
+                ex.printStackTrace();
+            }
+        }
+        return result;
+    }
+}

+ 288 - 0
carbon-bank-service/src/main/java/com/hcloud/microserver/bank/util/JsonAndXmlUtils.java

@@ -0,0 +1,288 @@
+package com.hcloud.microserver.bank.util;
+
+
+import java.io.File;
+import java.io.IOException;
+import java.io.StringReader;
+import java.io.StringWriter;
+import java.lang.reflect.Field;
+import java.lang.reflect.Method;
+import java.net.URL;
+import java.nio.file.Paths;
+
+import org.apache.commons.io.FileUtils;
+import org.apache.commons.io.IOUtils;
+import org.dom4j.Document;
+import org.dom4j.DocumentException;
+import org.dom4j.DocumentHelper;
+import org.dom4j.Element;
+import org.dom4j.io.OutputFormat;
+import org.dom4j.io.SAXReader;
+import org.dom4j.io.XMLWriter;
+import org.xml.sax.SAXException;
+
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONObject;
+
+/**
+ * JSON对象与XML相互转换工具类
+ *
+ * @author Logan
+ * @createDate 2019-02-12
+ * @version 1.0.0
+ *
+ */
+public class JsonAndXmlUtils {
+
+    private static final String ENCODING = "UTF-8";
+
+    /**
+     * JSON对象转漂亮的xml字符串
+     *
+     * @param json JSON对象
+     * @return 漂亮的xml字符串
+     * @throws IOException
+     * @throws SAXException
+     */
+    public static String jsonToPrettyXml(JSONObject json) throws IOException, SAXException {
+        Document document = jsonToDocument(json);
+
+        /* 格式化xml */
+        OutputFormat format = OutputFormat.createPrettyPrint();
+
+        // 设置缩进为4个空格
+        format.setIndent(" ");
+        format.setIndentSize(4);
+
+        StringWriter formatXml = new StringWriter();
+        XMLWriter writer = new XMLWriter(formatXml, format);
+        writer.write(document);
+
+        return formatXml.toString();
+    }
+
+    /**
+     * JSON对象转xml字符串
+     *
+     * @param json JSON对象
+     * @return xml字符串
+     * @throws SAXException
+     */
+    public static String JsonToXml(JSONObject json) throws SAXException {
+        return jsonToDocument(json).asXML();
+    }
+
+    /**
+     * JSON对象转Document对象
+     *
+     * @param json JSON对象
+     * @return Document对象
+     * @throws SAXException
+     */
+    public static Document jsonToDocument(JSONObject json) throws SAXException {
+        Document document = DocumentHelper.createDocument();
+        document.setXMLEncoding(ENCODING);
+
+        // root对象只能有一个
+        for (String rootKey : json.keySet()) {
+            Element root = jsonToElement(json.getJSONObject(rootKey), rootKey);
+            document.add(root);
+            break;
+        }
+        return document;
+    }
+
+    /**
+     * JSON对象转Element对象
+     *
+     * @param json JSON对象
+     * @param nodeName 节点名称
+     * @return Element对象
+     */
+    public static Element jsonToElement(JSONObject json, String nodeName) {
+        Element node = DocumentHelper.createElement(nodeName);
+        for (String key : json.keySet()) {
+            Object child = json.get(key);
+            if (child instanceof JSONObject) {
+                node.add(jsonToElement(json.getJSONObject(key), key));
+            }
+
+            else {
+                Element element = DocumentHelper.createElement(key);
+                element.setText(json.getString(key));
+                node.add(element);
+            }
+        }
+        return node;
+    }
+
+    /**
+     * XML字符串转JSON对象
+     *
+     * @param xml xml字符串
+     * @return JSON对象
+     * @throws DocumentException
+     */
+    public static JSONObject xmlToJson(String xml) throws DocumentException {
+        JSONObject json = new JSONObject();
+
+        SAXReader reader = new SAXReader();
+        Document document = reader.read(new StringReader(xml));
+        Element root = document.getRootElement();
+
+        json.put(root.getName(), elementToJson(root));
+
+        return json;
+    }
+
+    /**
+     * Element对象转JSON对象
+     *
+     * @param element Element对象
+     * @return JSON对象
+     */
+    public static JSONObject elementToJson(Element element) {
+        JSONObject json = new JSONObject();
+        for (Object child : element.elements()) {
+            Element e = (Element) child;
+            if (e.elements().isEmpty()) {
+                json.put(e.getName(), e.getText());
+            }
+
+            else {
+                json.put(e.getName(), elementToJson(e));
+            }
+        }
+
+        return json;
+    }
+
+    /**
+     * 文件内容转换成字符串
+     *
+     * @param filePath 文件路径
+     * @return 内容字符串
+     * @throws IOException
+     */
+    public static String fileToString(URL filePath) throws IOException {
+        return IOUtils.toString(filePath, ENCODING);
+    }
+
+    /**
+     * 文件内容转换成字符串
+     *
+     * @param filePath 文件路径
+     * @return 内容字符串
+     * @throws IOException
+     */
+    public static String fileToString(String filePath) throws IOException {
+        return IOUtils.toString(Paths.get(filePath).toUri(), ENCODING);
+    }
+
+    /**
+     * 字符串输出到文件
+     *
+     * @param str 字符串内容
+     * @param filePath 文件路径
+     * @throws IOException
+     */
+    public static void stringToFile(String str, String filePath) throws IOException {
+        FileUtils.writeStringToFile(Paths.get(filePath).toFile(), str, ENCODING);
+    }
+
+    /**
+     * 字符串输出到文件
+     *
+     * @param str 字符串内容
+     * @param filePath 文件路径
+     * @throws IOException
+     */
+    public static void stringToFile(String str, URL filePath) throws IOException {
+        FileUtils.writeStringToFile(new File(filePath.getPath()), str, ENCODING);
+    }
+
+    /**
+     * 字符串输出到文件
+     *
+     * @param str 字符串内容
+     * @param file 输出文件
+     * @throws IOException
+     */
+    public static void stringToFile(String str, File file) throws IOException {
+        FileUtils.writeStringToFile(file, str, ENCODING);
+    }
+
+
+    /**
+     * 对象转xml文件
+     *
+     * @param b
+     * @return
+     */
+    public static Document getDocument(Object b) {
+        Document document = DocumentHelper.createDocument();
+        try {
+            // 创建根节点元素
+            Element root = document.addElement(b.getClass().getSimpleName());
+            Field[] field = b.getClass().getDeclaredFields(); // 获取实体类b的所有属性,返回Field数组
+            for (int j = 0; j < field.length; j++) { // 遍历所有有属性
+                String name = field[j].getName(); // 获取属属性的名字
+                if (!name.equals("serialVersionUID")) {//去除串行化序列属性
+                    String methodName = name.substring(0, 1).toUpperCase() + name.substring(1); // 将属性的首字符大写,方便构造get,set方法
+                    Method m = b.getClass().getMethod("get" + methodName);
+                    //System.out.println("属性get方法返回值类型:" + m.getReturnType());
+                    String propertievalue = (String) m.invoke(b);// 获取属性值
+                    Element propertie = root.addElement(name);
+                    if (propertievalue == null) {
+                        propertie.setText("");
+                    } else {
+                        propertie.setText(propertievalue);
+                    }
+                }
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+
+        return document;
+    }
+
+    /**
+     * 对象转xml格式的字符串
+     *
+     * @param b
+     * @return
+     */
+    public static String getXmlString(Object b) {
+        return getDocument(b).asXML();
+    }
+
+
+        public static void main(String[] args) {
+        try {
+            String filePath = "/User.xml";
+            URL url = JsonAndXmlUtils.class.getResource(filePath);
+            String content = JsonAndXmlUtils.fileToString(url);
+            // System.out.println(content);
+
+            JSONObject json = xmlToJson(content);
+            System.out.println(JSON.toJSONString(json, true));
+
+            String xml = JsonToXml(json);
+            System.out.println(xml);
+
+            System.out.println("----------------------------------------\n\n");
+            xml = jsonToPrettyXml(json);
+            System.out.println(xml);
+
+            stringToFile(xml, "C:\\Users\\Administrator\\Desktop\\User.xml");
+        } catch (IOException e) {
+            e.printStackTrace();
+        } catch (DocumentException e) {
+            e.printStackTrace();
+        } catch (SAXException e) {
+            e.printStackTrace();
+        }
+    }
+
+}

+ 105 - 0
carbon-bank-service/src/main/java/com/hcloud/microserver/bank/util/RemoveNullAttr.java

@@ -0,0 +1,105 @@
+package com.hcloud.microserver.bank.util;
+
+
+import java.util.ArrayList;
+import java.util.List;
+
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import com.hcloud.microserver.commoncore.util.string.StringUtil;
+
+public class RemoveNullAttr {
+    public static void main(String[] args) {
+
+        String s = "{\"employees\": [{ \"firstName\":\"\" , \"lastName\":\"Doe\" },{ \"firstName\":\"\" , \"lastName\":\"Smith\" },{ \"firstName\":\"Peter\" , \"lastName\":\"Jones\" }]}";
+        String a = "{ \"firstName\":\"John\" , \"lastName\":\"\" }";
+        String b = "{ \"firstName\":\"\" , \"lastName\":\"Doe\" }";
+        String test = "{\"ka\":\"va\",\"kb\":{\"kbk\":\"kbv\",\"kbkk\":\"\",\"kbkkk\":{\"aaa\":\"bbb\",\"bbb\":\"\"},\"suzu\":[{\"sz\":\"sz\",\"szk\":\"\"}]},\"kc\":\"kcv\"}";
+        JSONObject js = JSONObject.parseObject(test);
+
+        RemoveNullAttr r = new RemoveNullAttr();
+        Object o = r.traverseJson(js);
+        System.out.println(o);
+    }
+
+    public Object traverseJson(Object json) {
+// check null
+        if (json == null) {
+            return null;
+        }
+
+        try {
+
+            if (json instanceof JSONObject) {// if json is a Map
+
+                JSONObject jsonObj = (JSONObject) json;
+                List<String> keyList = new ArrayList<>();
+                for (String k : jsonObj.keySet()) {
+                    String value = jsonObj.get(k).toString();
+                    if (StringUtil.isEmpty(value)) {
+                        keyList.add(k);
+//jsonObj.remove(k);
+                    } else {
+                        if (isJsonObj(value)) {
+                            jsonObj.put(k, traverseJson(JSONObject.parseObject(value)));
+                        } else {
+                            if (isJsonArr(value)) {
+//value=;
+                                jsonObj.put(k, traverseJson(JSONArray.parseArray(value)));
+                            }
+
+                        }
+
+                    }
+                }
+                for (String k : keyList) {
+                    jsonObj.remove(k);
+                }
+
+                return jsonObj;
+
+            } else if (json instanceof JSONArray) {// if json is an Array
+                JSONArray jsonArr = (JSONArray) json;
+                int len = jsonArr.size();
+                for (int i = 0; i < len; ++i) {
+// TODO: do something here
+                    jsonArr.set(i, traverseJson(jsonArr.get(i)));
+                }
+//        return retArr;
+//       
+//      } else {// if json is just a raw element
+//       
+//        // TODO: do something here
+//        return json;
+                return jsonArr;
+//       
+            }
+
+        } catch (Exception e) {
+            e.printStackTrace();// deal Exception or throw it
+        }
+
+        return null;
+    }
+
+    public boolean isJsonObj(Object o) {
+        try {
+            JSONObject js = JSONObject.parseObject(o.toString());
+            return true;
+
+        } catch (Exception e) {
+            return false;
+        }
+    }
+
+    public boolean isJsonArr(Object o) {
+        try {
+            JSONArray js = JSONArray.parseArray(o.toString());
+            return true;
+
+        } catch (Exception e) {
+            return false;
+        }
+    }
+
+}

+ 258 - 0
carbon-bank-service/src/main/java/com/hcloud/microserver/bank/util/SHAEncrytp.java

@@ -0,0 +1,258 @@
+package com.hcloud.microserver.bank.util;
+
+
+public class SHAEncrytp {
+
+    private final int[] abcde = { 0x67452301, 0xefcdab89, 0x98badcfe,
+            0x10325476, 0xc3d2e1f0 };
+
+    // 摘要数据存储数组
+    private int[] digestInt = new int[5];
+
+    // 计算过程中的临时数据存储数组
+    private int[] tmpData = new int[80];
+
+    // 计算sha-1摘要,返回相应的十六进制字符串
+    public String getDigestOfString(byte[] byteData)
+    {
+        return byteArrayToHexString(getDigestOfBytes(byteData));
+    }
+
+    // 计算sha-1摘要,返回相应的字节数组
+    public byte[] getDigestOfBytes(byte[] byteData)
+    {
+        process_input_bytes(byteData);
+        byte[] digest = new byte[20];
+        for (int i = 0; i < digestInt.length; i++)
+        {
+            intToByteArray(digestInt[i], digest, i * 4);
+        }
+        return digest;
+    }
+
+    // 计算sha-1摘要
+    private int process_input_bytes(byte[] bytedata)
+    {
+        // 初试化常量
+        System.arraycopy(abcde, 0, digestInt, 0, abcde.length);
+        // 格式化输入字节数组,补10及长度数据
+        byte[] newbyte = byteArrayFormatData(bytedata);
+        // 获取数据摘要计算的数据单元个数
+        int MCount = newbyte.length / 64;
+        // 循环对每个数据单元进行摘要计算
+        for (int pos = 0; pos < MCount; pos++)
+        {
+            // 将每个单元的数据转换成16个整型数据,并保存到tmpData的前16个数组元素中
+            for (int j = 0; j < 16; j++)
+            {
+                tmpData[j] = byteArrayToInt(newbyte, (pos * 64) + (j * 4));
+            }
+            // 摘要计算函数
+            encrypt();
+        }
+        return 20;
+    }
+
+    // 格式化输入字节数组格式
+    private byte[] byteArrayFormatData(byte[] bytedata)
+    {
+        // 补0数量
+        int zeros = 0;
+        // 补位后总位数
+        int size = 0;
+        // 原始数据长度
+        int n = bytedata.length;
+        // 模64后的剩余位数
+        int m = n % 64;
+        // 计算添加0的个数以及添加10后的总长度
+        if (m < 56)
+        {
+            zeros = 55 - m;
+            size = n - m + 64;
+        }
+        else if (m == 56)
+        {
+            zeros = 63;
+            size = n + 8 + 64;
+        }
+        else
+        {
+            zeros = 63 - m + 56;
+            size = (n + 64) - m + 64;
+        }
+        // 补位后生成的新数组内容
+        byte[] newbyte = new byte[size];
+        // 复制数组的前面部分
+        System.arraycopy(bytedata, 0, newbyte, 0, n);
+        // 获得数组Append数据元素的位置
+        int l = n;
+        // 补1操作
+        newbyte[l++] = (byte) 0x80;
+        // 补0操作
+        for (int i = 0; i < zeros; i++)
+        {
+            newbyte[l++] = (byte) 0x00;
+        }
+        // 计算数据长度,补数据长度位共8字节,长整型
+        long N = (long) n * 8;
+        byte h8 = (byte) (N & 0xFF);
+        byte h7 = (byte) ((N >> 8) & 0xFF);
+        byte h6 = (byte) ((N >> 16) & 0xFF);
+        byte h5 = (byte) ((N >> 24) & 0xFF);
+        byte h4 = (byte) ((N >> 32) & 0xFF);
+        byte h3 = (byte) ((N >> 40) & 0xFF);
+        byte h2 = (byte) ((N >> 48) & 0xFF);
+        byte h1 = (byte) (N >> 56);
+        newbyte[l++] = h1;
+        newbyte[l++] = h2;
+        newbyte[l++] = h3;
+        newbyte[l++] = h4;
+        newbyte[l++] = h5;
+        newbyte[l++] = h6;
+        newbyte[l++] = h7;
+        newbyte[l++] = h8;
+        return newbyte;
+    }
+
+    private int f1(int x, int y, int z)
+    {
+        return (x & y) | (~x & z);
+    }
+
+    private int f2(int x, int y, int z)
+    {
+        return x ^ y ^ z;
+    }
+
+    private int f3(int x, int y, int z)
+    {
+        return (x & y) | (x & z) | (y & z);
+    }
+
+    private int f4(int x, int y)
+    {
+        return (x << y) | x >>> (32 - y);
+    }
+
+    // 单元摘要计算函数
+    private void encrypt()
+    {
+        for (int i = 16; i <= 79; i++)
+        {
+            tmpData[i] = f4(tmpData[i - 3] ^ tmpData[i - 8] ^ tmpData[i - 14]
+                    ^ tmpData[i - 16], 1);
+        }
+        int[] tmpabcde = new int[5];
+        for (int i1 = 0; i1 < tmpabcde.length; i1++)
+        {
+            tmpabcde[i1] = digestInt[i1];
+        }
+        for (int j = 0; j <= 19; j++)
+        {
+            int tmp = f4(tmpabcde[0], 5)
+                    + f1(tmpabcde[1], tmpabcde[2], tmpabcde[3]) + tmpabcde[4]
+                    + tmpData[j] + 0x5a827999;
+            tmpabcde[4] = tmpabcde[3];
+            tmpabcde[3] = tmpabcde[2];
+            tmpabcde[2] = f4(tmpabcde[1], 30);
+            tmpabcde[1] = tmpabcde[0];
+            tmpabcde[0] = tmp;
+        }
+        for (int k = 20; k <= 39; k++)
+        {
+            int tmp = f4(tmpabcde[0], 5)
+                    + f2(tmpabcde[1], tmpabcde[2], tmpabcde[3]) + tmpabcde[4]
+                    + tmpData[k] + 0x6ed9eba1;
+            tmpabcde[4] = tmpabcde[3];
+            tmpabcde[3] = tmpabcde[2];
+            tmpabcde[2] = f4(tmpabcde[1], 30);
+            tmpabcde[1] = tmpabcde[0];
+            tmpabcde[0] = tmp;
+        }
+        for (int l = 40; l <= 59; l++)
+        {
+            int tmp = f4(tmpabcde[0], 5)
+                    + f3(tmpabcde[1], tmpabcde[2], tmpabcde[3]) + tmpabcde[4]
+                    + tmpData[l] + 0x8f1bbcdc;
+            tmpabcde[4] = tmpabcde[3];
+            tmpabcde[3] = tmpabcde[2];
+            tmpabcde[2] = f4(tmpabcde[1], 30);
+            tmpabcde[1] = tmpabcde[0];
+            tmpabcde[0] = tmp;
+        }
+        for (int m = 60; m <= 79; m++)
+        {
+            int tmp = f4(tmpabcde[0], 5)
+                    + f2(tmpabcde[1], tmpabcde[2], tmpabcde[3]) + tmpabcde[4]
+                    + tmpData[m] + 0xca62c1d6;
+            tmpabcde[4] = tmpabcde[3];
+            tmpabcde[3] = tmpabcde[2];
+            tmpabcde[2] = f4(tmpabcde[1], 30);
+            tmpabcde[1] = tmpabcde[0];
+            tmpabcde[0] = tmp;
+        }
+        for (int i2 = 0; i2 < tmpabcde.length; i2++)
+        {
+            digestInt[i2] = digestInt[i2] + tmpabcde[i2];
+        }
+        for (int n = 0; n < tmpData.length; n++)
+        {
+            tmpData[n] = 0;
+        }
+    }
+
+    // 4字节数组转换为整数
+    private int byteArrayToInt(byte[] bytedata, int i)
+    {
+        return ((bytedata[i] & 0xff) << 24) | ((bytedata[i + 1] & 0xff) << 16)
+                | ((bytedata[i + 2] & 0xff) << 8) | (bytedata[i + 3] & 0xff);
+    }
+
+    // 整数转换为4字节数组
+    private void intToByteArray(int intValue, byte[] byteData, int i)
+    {
+        byteData[i] = (byte) (intValue >>> 24);
+        byteData[i + 1] = (byte) (intValue >>> 16);
+        byteData[i + 2] = (byte) (intValue >>> 8);
+        byteData[i + 3] = (byte) intValue;
+    }
+
+    // 将字节转换为十六进制字符串
+    private static String byteToHexString(byte ib)
+    {
+        char[] Digit = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A',
+                'B', 'C', 'D', 'E', 'F' };
+        char[] ob = new char[2];
+        ob[0] = Digit[(ib >>> 4) & 0X0F];
+        ob[1] = Digit[ib & 0X0F];
+        String s = new String(ob);
+        return s;
+    }
+
+    // 将字节数组转换为十六进制字符串
+    private static String byteArrayToHexString(byte[] bytearray)
+    {
+        String strDigest = "";
+        for (int i = 0; i < bytearray.length; i++)
+        {
+            strDigest += byteToHexString(bytearray[i]);
+        }
+        return strDigest;
+    }
+
+
+    public static void main(String[] arg){
+//登录id
+        String logOnId = "2720525548";
+//登录密码
+        String pwd ="000000";
+        String origin = logOnId+pwd;
+        String pwdNew = "";
+        SHAEncrytp shaTest = new SHAEncrytp ();
+        //SHA1算出的哈希值结果
+        pwdNew = shaTest.getDigestOfString(origin.getBytes());
+        System.out.println(pwdNew);
+    }
+
+
+}

+ 368 - 0
carbon-bank-service/src/main/java/com/hcloud/microserver/bank/util/StringKit.java

@@ -0,0 +1,368 @@
+package com.hcloud.microserver.bank.util;
+
+import java.io.File;
+import java.math.BigDecimal;
+import java.security.MessageDigest;
+import java.security.NoSuchAlgorithmException;
+import java.util.*;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+
+public final class StringKit {
+
+	final static Map<Integer, String> zoneNum = new HashMap<Integer, String>();
+
+	final static Map<Integer, String> nationMap = new HashMap<Integer, String>();
+
+	//Currencyc
+	final static Map<String, String> currency = new HashMap<String, String>();
+
+
+	static {
+        zoneNum.put(11, "北京");
+        zoneNum.put(12, "天津");
+        zoneNum.put(13, "河北");
+        zoneNum.put(14, "山西");
+        zoneNum.put(15, "内蒙古");
+        zoneNum.put(21, "辽宁");
+        zoneNum.put(22, "吉林");
+        zoneNum.put(23, "黑龙江");
+        zoneNum.put(31, "上海");
+        zoneNum.put(32, "江苏");
+        zoneNum.put(33, "浙江");
+        zoneNum.put(34, "安徽");
+        zoneNum.put(35, "福建");
+        zoneNum.put(36, "江西");
+        zoneNum.put(37, "山东");
+        zoneNum.put(41, "河南");
+        zoneNum.put(42, "湖北");
+        zoneNum.put(43, "湖南");
+        zoneNum.put(44, "广东");
+        zoneNum.put(45, "广西");
+        zoneNum.put(46, "海南");
+        zoneNum.put(50, "重庆");
+        zoneNum.put(51, "四川");
+        zoneNum.put(52, "贵州");
+        zoneNum.put(53, "云南");
+        zoneNum.put(54, "西藏");
+        zoneNum.put(61, "陕西");
+        zoneNum.put(62, "甘肃");
+        zoneNum.put(63, "青海");
+        zoneNum.put(64, "新疆");
+        zoneNum.put(71, "台湾");
+        zoneNum.put(81, "香港");
+        zoneNum.put(82, "澳门");
+        zoneNum.put(91, "外国");
+
+		nationMap.put(1,"汉族");
+		nationMap.put(2,"土家族");
+		nationMap.put(3,"阿昌族");
+		nationMap.put(4,"白族");
+		nationMap.put(5,"保安族");
+		nationMap.put(6,"布朗族");
+		nationMap.put(7,"布依族");
+		nationMap.put(8,"朝鲜族");
+		nationMap.put(9,"达斡尔族");
+		nationMap.put(10,"傣族");
+		nationMap.put(11,"德昂族");
+		nationMap.put(12,"东乡族");
+		nationMap.put(13,"侗族");
+		nationMap.put(14,"独龙族");
+		nationMap.put(15,"鄂伦春族");
+		nationMap.put(16,"俄罗斯族");
+		nationMap.put(17,"鄂温克族");
+		nationMap.put(18,"高山族");
+		nationMap.put(19,"仡佬族");
+		nationMap.put(20,"哈尼族");
+		nationMap.put(21,"哈萨克族");
+		nationMap.put(22,"赫哲族");
+		nationMap.put(23,"回族");
+		nationMap.put(24,"基诺族");
+		nationMap.put(25,"景颇族");
+		nationMap.put(26,"京族");
+		nationMap.put(27,"柯尔克孜族");
+		nationMap.put(28,"拉祜族");
+		nationMap.put(29,"珞巴族");
+		nationMap.put(30,"傈僳族");
+		nationMap.put(31,"黎族");
+		nationMap.put(32,"满族");
+		nationMap.put(33,"毛南族");
+		nationMap.put(34,"门巴族");
+		nationMap.put(35,"蒙古族");
+		nationMap.put(36,"苗族");
+		nationMap.put(37,"仫佬族");
+		nationMap.put(38,"纳西族");
+		nationMap.put(39,"怒族");
+		nationMap.put(40,"普米族");
+		nationMap.put(41,"羌族");
+		nationMap.put(42,"撒拉族");
+		nationMap.put(43,"畲族");
+		nationMap.put(44,"水族");
+		nationMap.put(45,"塔吉克族");
+		nationMap.put(46,"塔塔尔族");
+		nationMap.put(47,"土族");
+		nationMap.put(48,"佤族");
+		nationMap.put(49,"维吾尔族");
+		nationMap.put(50,"乌孜别克族");
+		nationMap.put(51,"锡伯族");
+		nationMap.put(52,"瑶族");
+		nationMap.put(53,"彝族");
+		nationMap.put(54,"裕固族");
+		nationMap.put(55,"藏族");
+		nationMap.put(56,"壮族");
+		nationMap.put(99,"其他民族");
+
+
+		currency.put("01","人民币");
+		currency.put("12","英镑");
+		currency.put("13","港币");
+		currency.put("14","美元");
+		currency.put("15","瑞士法郎");
+		currency.put("16","德国马克");
+		currency.put("17","法国法郎");
+		currency.put("20","荷兰盾");
+		currency.put("27","日元");
+		currency.put("28","加拿大元");
+		currency.put("38","欧元");
+
+
+	}
+
+     
+    final static int[] PARITYBIT = {'1', '0', 'X', '9', '8', '7', '6', '5', '4', '3', '2'};
+    final static int[] POWER_LIST = { 7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2};
+    final static char[] UPPER_LIST = {'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'};
+    
+    /**
+     * 身份证验证
+     *@param s  号码内容
+     *@return 是否有效 null和"" 都是false 
+     */
+    public static boolean isIDCard(String certNo){
+        if(certNo == null || (certNo.length() != 15 && certNo.length() != 18))
+            return false;
+        final char[] cs = certNo.toUpperCase().toCharArray();
+        //校验位数
+        int power = 0;
+        for(int i=0; i<cs.length; i++){
+            if(i==cs.length-1 && cs[i] == 'X')
+                break;//最后一位可以 是X或x
+            if(cs[i]<'0' || cs[i]>'9')
+                return false;
+            if(i < cs.length -1){
+                power += (cs[i] - '0') * POWER_LIST[i];
+            }
+        }
+         
+        //校验区位码
+        if(!zoneNum.containsKey(Integer.valueOf(certNo.substring(0,2)))){
+            return false;
+        }
+         
+        //校验年份
+        String year = certNo.length() == 15 ? getIdcardCalendar() + certNo.substring(6,8) :certNo.substring(6, 10);
+         
+        final int iyear = Integer.parseInt(year);
+        if(iyear < 1900 || iyear > Calendar.getInstance().get(Calendar.YEAR))
+            return false;//1900年的PASS,超过今年的PASS
+         
+        //校验月份
+        String month = certNo.length() == 15 ? certNo.substring(8, 10) : certNo.substring(10,12);
+        final int imonth = Integer.parseInt(month);
+        if(imonth <1 || imonth >12){
+            return false;
+        }
+         
+        //校验天数      
+        String day = certNo.length() ==15 ? certNo.substring(10, 12) : certNo.substring(12, 14);
+        final int iday = Integer.parseInt(day);
+        if(iday < 1 || iday > 31)
+            return false;       
+         
+        //校验"校验码"
+        if(certNo.length() == 15)
+            return true;
+        return cs[cs.length -1 ] == PARITYBIT[power % 11];
+    }
+     
+    private static int getIdcardCalendar() {        
+         GregorianCalendar curDay = new GregorianCalendar();
+         int curYear = curDay.get(Calendar.YEAR);
+         int year2bit = Integer.parseInt(String.valueOf(curYear).substring(2));          
+         return  year2bit;
+    }     
+	
+	public static boolean isEmpty(String str) {
+		if (null == str || "".equals(str)) {
+			return true;
+		} else {
+			return false;
+		}
+	}
+
+	public static boolean isNotEmpty(String str) {
+		return !isEmpty(str);
+	}
+
+	/**
+	 * 通过文件路径得到文件后缀名。如:hello.txt得到.txt
+	 * 
+	 * @param filePath
+	 *            文件路径
+	 * @return
+	 */
+	public static String getFileSuffix(String filePath) {
+		int pointIndex = filePath.lastIndexOf(".");
+		return filePath.substring(pointIndex, filePath.length());
+	}
+
+	public static String getFileNameWithoutSuffix(File file){
+		String fileName = file.getName();
+		int pointIndex = fileName.lastIndexOf(".");
+		return fileName.substring(0, pointIndex);
+	}
+	
+	public static boolean isEmail(String str) {
+		if (StringKit.isEmpty(str)){
+			return false;
+		}
+		Pattern p = Pattern.compile("^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(\\.([a-zA-Z0-9_-])+)+$");
+		Matcher m = p.matcher(str);
+		return m.matches();
+	}
+
+	public static boolean isCellPhone(String str) {
+		if (isEmpty(str)) {
+			return false;
+		}
+		Pattern p = Pattern.compile("^(13[0-9]{9})|(18[0-9]{9})|(14[0-9]{9})|(17[0-9]{9})|(15[0-9]{9})$");
+		Matcher m = p.matcher(str);
+		return m.matches();
+	}
+
+	/**
+	 * 生成手机验证码
+	 * 
+	 * @return 长度为6的数字字符串
+	 */
+	public static String getVilidateCode() {
+		char[] codeSequence = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9' };
+		StringBuffer codeStr = new StringBuffer();
+		for (int i = 0; i < 6; i++) {
+			int j = (int) (Math.random() * 10);
+			codeStr.append(codeSequence[j]);
+		}
+		return codeStr.toString();
+	}
+
+	/**
+	 * MD5加密
+	 * 
+	 * @param 需要加密的字符串
+	 * @return 加密后的字符串
+	 */
+	public static String MD5(String s) {
+		char hexDigits[] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' };
+
+		try {
+			byte[] btInput = s.getBytes();
+			// 获得MD5摘要算法的 MessageDigest 对象
+			MessageDigest mdInst = MessageDigest.getInstance("MD5");
+			// 使用指定的字节更新摘要
+			mdInst.update(btInput);
+			// 获得密文
+			byte[] md = mdInst.digest();
+			// 把密文转换成十六进制的字符串形式
+			int j = md.length;
+			char str[] = new char[j * 2];
+			int k = 0;
+			for (int i = 0; i < j; i++) {
+				byte byte0 = md[i];
+				str[k++] = hexDigits[byte0 >>> 4 & 0xf];
+				str[k++] = hexDigits[byte0 & 0xf];
+			}
+			return new String(str);
+		} catch (Exception e) {
+			e.printStackTrace();
+			return null;
+		}
+	}
+
+	public static boolean isInteger(String str) {
+		if (isEmpty(str)) {
+			return false;
+		}
+		Pattern pattern = Pattern.compile("[0-9]*");
+		Matcher isNum = pattern.matcher(str);
+		return isNum.matches();
+	}
+
+	/**
+	 * 小数点保留方法
+	 * 
+	 * @param value
+	 *            需要处理的数值
+	 * @param scale
+	 *            需要保留的小数位数
+	 * @return
+	 */
+	public static float round(double value, int scale) {
+		if (scale < 0) {
+			throw new IllegalArgumentException("The scale must be a positive integer or zero");
+		}
+		BigDecimal bigDecimal = new BigDecimal(Double.toString(value));
+		BigDecimal one = new BigDecimal("1");
+		return bigDecimal.divide(one, scale, BigDecimal.ROUND_HALF_UP).floatValue();
+	}
+
+	public static String SHA1(String decript) {
+		try {
+			MessageDigest digest = MessageDigest.getInstance("SHA-1");
+			digest.update(decript.getBytes());
+			byte messageDigest[] = digest.digest();
+			StringBuffer hexString = new StringBuffer();
+			for (int i = 0; i < messageDigest.length; i++) {
+				String shaHex = Integer.toHexString(messageDigest[i] & 0xFF);
+				if (shaHex.length() < 2) {
+					hexString.append(0);
+				}
+				hexString.append(shaHex);
+			}
+			return hexString.toString();
+
+		} catch (NoSuchAlgorithmException e) {
+			e.printStackTrace();
+		}
+		return "";
+	}
+
+	
+	public static String getFieldName(String fieldName){
+		 return fieldName.replaceFirst(fieldName.substring(0), fieldName.substring(0).toLowerCase());
+	}
+	
+	/**
+	 * 根据oauth2入口参数找到定向到前端的路由
+	 * @param route
+	 * @return
+	 */
+	public static String translateRoute(String route){
+		route = StringKit.isEmpty(route) ? "" : route;
+		String redirectRoute = route.replaceAll("!", "/").replaceAll("~", "?");
+		return redirectRoute;
+	}
+	
+	public synchronized static String getRandomUpper(int lenght){
+		Random random = new Random();
+		StringBuffer upperStr = new StringBuffer();
+		for (int i = 0; i < lenght; i++) {
+			upperStr.append(UPPER_LIST[random.nextInt(UPPER_LIST.length)]);
+		}
+		return upperStr.toString();
+	}
+	
+	public static void main(String[] args) {
+		System.err.println(getRandomUpper(500));
+	}
+}

+ 76 - 0
carbon-bank-service/src/main/resources/application-dev.properties

@@ -0,0 +1,76 @@
+server.port=21884
+spring.application.name=bank-service
+spring.jackson.date-format=yyyy-MM-dd HH:mm:ss
+spring.jackson.time-zone=GMT+8
+#mysql datasource setting
+spring.datasource.driver-class-name=com.mysql.jdbc.Driver
+spring.datasource.type=com.alibaba.druid.pool.DruidDataSource
+spring.datasource.url=jdbc:mysql://172.16.90.253:3306/cq-carbon-platform?characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull&autoReconnect=true&useSSL=false&&allowMultiQueries=true
+#spring.datasource.url=jdbc:mysql://192.168.1.52:3306/carbon-platform?characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull&autoReconnect=true&useSSL=true&&allowMultiQueries=true
+spring.datasource.username=root
+spring.datasource.password=123456
+#spring.datasource.password=root
+spring.datasource.initialSize=5
+spring.datasource.minIdle=5
+spring.datasource.maxActive=20
+spring.datasource.maxWait=60000
+spring.datasource.timeBetweenEvictionRunsMillis=60000
+spring.datasource.minEvictableIdleTimeMillis=30000
+spring.datasource.validationQuery=SELECT 1
+spring.datasource.testWhileIdle=true
+spring.datasource.testOnBorrow=false
+spring.datasource.testOnReturn=false
+spring.datasource.poolPreparedStatements=true
+spring.datasource.maxPoolPreparedStatementPerConnectionSize=20
+spring.datasource.filters=stat,wall
+spring.datasource.connectionProperties=druid.stat.mergeSql=true;druid.stat.slowSqlMillis=2000
+#mybatis setting
+mybatis.type-aliases-package=com.hcloud.microserver.sys.facade.entity
+mybatis.mapper-locations=classpath:mappers/*.xml
+mybatis.check-config-location=true
+mybatis.executor-type=simple
+#pagehelper setting
+pagehelper.helperDialect=mysql
+pagehelper.reasonable=true
+pagehelper.supportMethodsArguments=true
+pagehelper.params=count=countSql
+# Max number of retries on the same server (excluding the first try)
+system-service.ribbon.MaxAutoRetries=1
+# Max number of next servers to retry (excluding the first server)
+system-service.ribbon.MaxAutoRetriesNextServer=1
+# Whether all operations can be retried for this client
+system-service.ribbon.OkToRetryOnAllOperations=true
+# Interval to refresh the server list from the source
+system-service.ribbon.ServerListRefreshInterval=2000
+# Connect timeout used by Apache HttpClient
+system-service.ribbon.ConnectTimeout=50000
+# Read timeout used by Apache HttpClient
+system-service.ribbon.ReadTimeout=50000
+#zuul timeout setting
+zuul.host.connect-timeout-millis=10000
+zuul.host.socket-timeout-millis=10000
+#hystix timeout setting
+hystrix.metrics.enabled=true
+hystrix.command.default.execution.isolation.thread.timeoutInMilliseconds=10000
+# eureka setting
+eureka.instance.preferIpAddress=true
+eureka.instance.hostname=localhost
+#eureka.client.service-url.defaultZone=http://192.168.1.58:8761/eureka/
+eureka.client.service-url.defaultZone=http://127.0.0.1:8761/eureka/
+###redis配置#########
+spring.redis.database=0
+spring.redis.host=172.16.90.64
+#spring.redis.host=192.168.56.101
+spring.redis.port=6379
+spring.redis.pool.max-idle=8
+spring.redis.pool.min-idle=0
+spring.redis.pool.max-active=10
+spring.redis.pool.max-wait=-1
+spring.redis.timeout=5000
+
+cqrcb.bank.sign.ip=172.16.90.102
+cqrcb.bank.sign.port=8853
+cqrcb.bank.sslclient.ip=172.16.90.102
+cqrcb.bank.sslclient.port=8852
+
+spring.jackson.default-property-inclusion=non_null

+ 72 - 0
carbon-bank-service/src/main/resources/application-pro.properties

@@ -0,0 +1,72 @@
+server.port=21882
+spring.application.name=carbon-service
+spring.jackson.date-format=yyyy-MM-dd HH:mm:ss
+spring.jackson.time-zone=GMT+8
+#mysql datasource setting
+spring.datasource.driver-class-name=com.mysql.jdbc.Driver
+spring.datasource.type=com.alibaba.druid.pool.DruidDataSource
+spring.datasource.url=jdbc:mysql://127.0.0.1:3306/carbon-platform?characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull&autoReconnect=true&useSSL=false
+#spring.datasource.url=jdbc:mysql://localhost:3306/food_security_db?characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull
+spring.datasource.username=root
+spring.datasource.password=Hywa@1234
+spring.datasource.initialSize=5
+spring.datasource.minIdle=5
+spring.datasource.maxActive=20
+spring.datasource.maxWait=60000
+spring.datasource.timeBetweenEvictionRunsMillis=60000
+spring.datasource.minEvictableIdleTimeMillis=30000
+spring.datasource.validationQuery=SELECT 1
+spring.datasource.testWhileIdle=true
+spring.datasource.testOnBorrow=false
+spring.datasource.testOnReturn=false
+spring.datasource.poolPreparedStatements=true
+spring.datasource.maxPoolPreparedStatementPerConnectionSize=20
+spring.datasource.filters=stat,wall
+spring.datasource.connectionProperties=druid.stat.mergeSql=true;druid.stat.slowSqlMillis=2000
+#mybatis setting
+mybatis.type-aliases-package=com.hcloud.microserver.sys.facade.entity
+mybatis.mapper-locations=classpath:mappers/*.xml
+mybatis.check-config-location=true
+mybatis.executor-type=simple
+#pagehelper setting
+pagehelper.helperDialect=mysql
+pagehelper.reasonable=true
+pagehelper.supportMethodsArguments=true
+pagehelper.params=count=countSql
+ribbon.ReadTimeout=60000
+ribbon.ConnectTimeout=60000
+#zuul timeout setting
+zuul.host.connect-timeout-millis=10000
+zuul.host.socket-timeout-millis=10000
+#hystix timeout setting
+hystrix.metrics.enabled=true
+hystrix.command.default.execution.isolation.thread.timeoutInMilliseconds=10000
+# eureka setting
+eureka.instance.hostname=localhost
+eureka.client.service-url.defaultZone=http://127.0.0.1:8761/eureka/
+
+###redis配置#########
+spring.redis.database=0
+spring.redis.host=127.0.0.1
+spring.redis.port=16335
+spring.redis.pool.max-idle=8
+spring.redis.pool.min-idle=0
+spring.redis.pool.max-active=10
+spring.redis.pool.max-wait=-1
+spring.redis.timeout=5000
+
+
+#wechat setting
+#(一个公众号的appid)
+wx.mp.configs.appId=wx04d471b59982c6ad
+#(公众号的appsecret)
+wx.mp.configs.secret=bd9279851f63af0c67e8bc1ef7e27257
+#(接口配置里的Token值)
+wx.mp.configs.token=123
+#(接口配置里的EncodingAESKey值)
+wx.mp.configs.aesKey=123
+#(获取code的认证回调接口)
+wx.auth.redirecturl=http://zljg.jscssui.cn/api/sys/wechat/doLogin
+#(认证成功后的跳转地址)
+wx.auth.forwardurl=http://spzl.xwnykzs.com/#/ready/
+

+ 62 - 0
carbon-bank-service/src/main/resources/application-test.properties

@@ -0,0 +1,62 @@
+server.port=21881
+spring.application.name=carbon-service
+spring.jackson.date-format=yyyy-MM-dd HH:mm:ss
+spring.jackson.time-zone=GMT+8
+#mysql datasource setting
+spring.datasource.type=com.alibaba.druid.pool.DruidDataSource
+spring.datasource.driver-class-name=com.mysql.jdbc.Driver
+spring.datasource.url=jdbc:mysql://127.0.0.1:3306/carbon-platform?characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull
+spring.datasource.username=root
+spring.datasource.password=root
+spring.datasource.initialSize=5
+spring.datasource.minIdle=5
+spring.datasource.maxActive=20
+spring.datasource.maxWait=60000
+spring.datasource.timeBetweenEvictionRunsMillis=60000
+spring.datasource.minEvictableIdleTimeMillis=30000
+spring.datasource.validationQuery=SELECT 1
+spring.datasource.testWhileIdle=true
+spring.datasource.testOnBorrow=false
+spring.datasource.testOnReturn=false
+spring.datasource.poolPreparedStatements=true
+spring.datasource.maxPoolPreparedStatementPerConnectionSize=20
+spring.datasource.filters=stat,wall
+spring.datasource.connectionProperties=druid.stat.mergeSql=true;druid.stat.slowSqlMillis=3000
+#mybatis setting
+mybatis.type-aliases-package=com.hcloud.microserver.sys.facade.entity
+mybatis.mapper-locations=classpath:mappers/*.xml
+mybatis.check-config-location=true
+mybatis.executor-type=simple
+#pagehelper setting
+pagehelper.helperDialect=mysql
+pagehelper.reasonable=true
+pagehelper.supportMethodsArguments=true
+pagehelper.params=count=countSql
+#hystix timeout setting
+hystrix.command.default.execution.isolation.thread.timeoutInMilliseconds=10000
+# eureka setting
+eureka.instance.preferIpAddress=true
+eureka.instance.hostname=localhost
+eureka.client.service-url.defaultZone=http://127.0.0.1:8761/eureka/
+###redis配置#########
+spring.redis.database=0
+spring.redis.host=127.0.0.1
+spring.redis.port=6379
+spring.redis.pool.max-idle=8
+spring.redis.pool.min-idle=0
+spring.redis.pool.max-active=10
+spring.redis.pool.max-wait=-1
+spring.redis.timeout=5000
+#wechat setting
+#(一个公众号的appid)
+wx.mp.configs.appId=wx04d471b59982c6ad
+#(公众号的appsecret)
+wx.mp.configs.secret=bd9279851f63af0c67e8bc1ef7e27257
+#(接口配置里的Token值)
+wx.mp.configs.token=123
+#(接口配置里的EncodingAESKey值)
+wx.mp.configs.aesKey=123
+#(获取code的认证回调接口)
+wx.auth.redirecturl=http://zljg.jscssui.cn/api/sys/wechat/doLogin
+#(认证成功后的跳转地址)
+wx.auth.forwardurl=http://spzl.xwnykzs.com/#/ready/

+ 3 - 0
carbon-bank-service/src/main/resources/application.properties

@@ -0,0 +1,3 @@
+spring.profiles.active=dev
+logging.level.com.hcloud=debug
+spring.devtools.restart.enabled=true

+ 45 - 0
carbon-bank-service/src/main/resources/generatorConfig.xml

@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE generatorConfiguration
+        PUBLIC "-//mybatis.org//DTD MyBatis Generator Configuration 1.0//EN"
+        "http://mybatis.org/dtd/mybatis-generator-config_1_0.dtd">
+<generatorConfiguration>
+    <context id="DB2Tables" targetRuntime="MyBatis3">
+        <commentGenerator>
+            <property name="suppressDate" value="true"/>
+            <property name="suppressAllComments" value="true"/>
+        </commentGenerator>
+        <!--数据库链接地址账号密码-->
+        <jdbcConnection driverClass="com.mysql.jdbc.Driver"
+                        connectionURL="jdbc:mysql://127.0.0.1:3306/carbon-platform?characterEncoding=UTF-8"
+                        userId="root" password="root">
+        </jdbcConnection>
+        <javaTypeResolver>
+            <property name="forceBigDecimals" value="false"/>
+        </javaTypeResolver>
+        <!--生成Model类存放位置-->
+        <javaModelGenerator targetPackage="com.hcloud.microserver.bank.entity"
+                            targetProject="src/main/java">
+            <property name="enableSubPackages" value="true"/>
+            <property name="trimStrings" value="true"/>
+        </javaModelGenerator>
+        <!--生成映射文件存放位置-->
+        <sqlMapGenerator targetPackage="mappers" targetProject="src/main/resources">
+            <property name="enableSubPackages" value="true"/>
+        </sqlMapGenerator>
+        <!--生成Dao类存放位置-->
+        <!-- 客户端代码,生成易于使用的针对Model对象和XML配置文件 的代码
+                type="ANNOTATEDMAPPER",生成Java Model 和基于注解的Mapper对象
+                type="MIXEDMAPPER",生成基于注解的Java Model 和相应的Mapper对象
+                type="XMLMAPPER",生成SQLMap XML文件和独立的Mapper接口
+        -->
+        <javaClientGenerator type="XMLMAPPER" targetPackage="com.hcloud.microserver.bank.dao"
+                             targetProject="src/main/java">
+            <property name="enableSubPackages" value="true"/>
+        </javaClientGenerator>
+        <!--生成对应表及类名-->
+        <table tableName="t_base_position" domainObjectName="BasePosition" enableCountByExample="false"
+               enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false"
+               selectByExampleQueryId="false"></table>
+
+    </context>
+</generatorConfiguration>

+ 24 - 0
carbon-bank-service/src/test/java/com/hcloud/microserver/bank/BankApiExcel.java

@@ -0,0 +1,24 @@
+package com.hcloud.microserver.bank;
+
+import com.alibaba.excel.annotation.ExcelProperty;
+import lombok.Data;
+
+@Data
+public class BankApiExcel {
+
+    @ExcelProperty(index = 0)
+    private String num;
+
+
+    @ExcelProperty(index = 1)
+    private String pro;
+
+    @ExcelProperty(index = 2)
+    private String chName;
+
+    @ExcelProperty(index = 3)
+    private String type;
+
+    @ExcelProperty(index = 4)
+    private String remark;
+}

+ 78 - 0
carbon-bank-service/src/test/java/com/hcloud/microserver/bank/BankSiginTest.java

@@ -0,0 +1,78 @@
+package com.hcloud.microserver.bank;
+
+import cn.hutool.core.util.RandomUtil;
+import com.alibaba.fastjson.JSONObject;
+import com.hcloud.microserver.bank.bo.BankLoginUserReqParam;
+import com.hcloud.microserver.bank.bo.CurrentAccountDetailQueryParam;
+import com.hcloud.microserver.bank.bo.CurrentAccountQueryParam;
+import com.hcloud.microserver.bank.bo.IntrabankTransferParam;
+import com.hcloud.microserver.bank.service.BankTransactionService;
+import com.hcloud.microserver.bank.service.SocketService;
+import com.hcloud.microserver.bank.service.impl.BankUserServiceImpl;
+import lombok.extern.slf4j.Slf4j;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.junit4.SpringRunner;
+import org.xml.sax.SAXException;
+
+import java.io.IOException;
+@Slf4j
+@RunWith(SpringRunner.class)
+@SpringBootTest(classes = {CarbonManagerServiceApplication.class})
+public class BankSiginTest {
+
+    @Autowired
+    private SocketService socketService;
+
+    @Autowired
+    private BankUserServiceImpl bankUserServiceImpl;
+
+    @Autowired
+    private BankTransactionService bankTransactionService;
+
+    @Test
+    public void testPage() throws IOException, SAXException {
+
+        BankLoginUserReqParam bo = new BankLoginUserReqParam();
+//        bo.setUserPWD("3F7EC50B5E904191D2C6B02744C45CEC7EE95E99");
+        bo.setUserPWD("E3B87EC1850E475490CBF623EEEA524AEA171A15");
+        bo.setUserID("2720525548");
+        bo.setSystemId("00001");
+        bankUserServiceImpl.loginUser(bo);
+//        Map<String, Object> requestMap = BankUtil.getRequestMap(bo);
+
+//        JSONObject jsonObject = JSON.toJSON(requestMap);
+//        String s1 = JSONObject.toJSONString(requestMap);
+//        JSONObject json = (JSONObject) JSONObject.parse(s1);
+//        String s = JsonAndXmlUtils.JsonToXml(json);
+//
+//        System.out.println(s);
+//        String ss = socketService.sendSignRequestTCP(s);
+//        System.out.println(ss);
+    }
+
+    @Test
+    public void testCurrent(){
+        CurrentAccountQueryParam cu = new CurrentAccountQueryParam();
+        cu.setI1ACNO("5001010120010000062");
+        bankTransactionService.currentAccountQuery(cu);
+    }
+
+    @Test
+    public void testCurrentDetail(){
+        CurrentAccountDetailQueryParam cu = new CurrentAccountDetailQueryParam();
+        cu.setI1ACNO("5001010120010000062");
+        cu.setI1STDT("20200101");
+        cu.setI1EDDT("20201101");
+        bankTransactionService.currentAccountDetailQuery(cu);
+    }
+    @Test
+    public void testIntrabankTransfer(){
+        IntrabankTransferParam param = new IntrabankTransferParam();
+        String s = "CRB"+RandomUtil.randomNumbers(17);
+        System.out.println(s);
+
+    }
+}

+ 82 - 0
carbon-bank-service/src/test/java/com/hcloud/microserver/bank/DemoDataListener.java

@@ -0,0 +1,82 @@
+package com.hcloud.microserver.bank;
+
+import com.alibaba.excel.context.AnalysisContext;
+import com.alibaba.excel.event.AnalysisEventListener;
+import com.alibaba.fastjson.JSONObject;
+import com.hcloud.microserver.commoncore.util.string.StringUtils;
+
+
+import java.util.ArrayList;
+import java.util.List;
+
+
+// 有个很重要的点 DemoDataListener 不能被spring管理,要每次读取excel都要new,然后里面用到spring可以构造方法传进去
+public class DemoDataListener extends AnalysisEventListener<BankApiExcel> {
+
+    /**
+     * 每隔5条存储数据库,实际使用中可以3000条,然后清理list ,方便内存回收
+     */
+    private static final int BATCH_COUNT = 5;
+    List<BankApiExcel> list = new ArrayList<BankApiExcel>();
+    /**
+     * 假设这个是一个DAO,当然有业务逻辑这个也可以是一个service。当然如果不用存储这个对象没用。
+     */
+    private BankApiExcel bankApiExcel;
+    public DemoDataListener() {
+        // 这里是demo,所以随便new一个。实际使用如果到了spring,请使用下面的有参构造函数
+        bankApiExcel = new BankApiExcel();
+    }
+    /**
+     * 如果使用了spring,请使用这个构造方法。每次创建Listener的时候需要把spring管理的类传进来
+     *
+     * @param bankApiExcel
+     */
+    public DemoDataListener(BankApiExcel bankApiExcel) {
+        this.bankApiExcel = bankApiExcel;
+    }
+    /**
+     * 这个每一条数据解析都会来调用
+     *
+     * @param bankApiExcel
+     *            one row value. Is is same as {@link AnalysisContext#readRowHolder()}
+     * @param context
+     */
+    @Override
+    public void invoke(BankApiExcel bankApiExcel, AnalysisContext context) {
+        list.add(bankApiExcel);
+        // 达到BATCH_COUNT了,需要去存储一次数据库,防止数据几万条数据在内存,容易OOM
+        if (list.size() >= BATCH_COUNT) {
+            saveData();
+            // 存储完成清理 list
+            list.clear();
+        }
+    }
+    /**
+     * 所有数据解析完成了 都会来调用
+     *
+     * @param context
+     */
+    @Override
+    public void doAfterAllAnalysed(AnalysisContext context) {
+        // 这里也要保存数据,确保最后遗留的数据也存储到数据库
+        saveData();
+    }
+    /**
+     * 加上存储数据库
+     */
+    private void saveData() {
+        String type = "String";
+        for (BankApiExcel bankApiExcel:list) {
+            String s = bankApiExcel.getType();
+            if ( StringUtils.isNotEmpty(s) &&s.contains("P")){
+                type = "BigDecimal";
+
+            }
+            System.out.println("/**"+bankApiExcel.getChName()+";"+bankApiExcel.getRemark()+";"+bankApiExcel.getType()+
+            ";*/");
+            System.out.println("private "+type+" "+bankApiExcel.getPro()+";");
+        }
+
+//        System.out.println(JSONObject.toJSONString(list));
+    }
+}

+ 29 - 0
carbon-bank-service/src/test/java/com/hcloud/microserver/bank/ExcelToEntityTest.java

@@ -0,0 +1,29 @@
+package com.hcloud.microserver.bank;
+
+import com.alibaba.excel.EasyExcel;
+import com.alibaba.excel.ExcelReader;
+import com.alibaba.excel.read.metadata.ReadSheet;
+
+public class ExcelToEntityTest {
+    public static void main(String[] args) {
+        // 有个很重要的点 DemoDataListener 不能被spring管理,要每次读取excel都要new,然后里面用到spring可以构造方法传进去
+        // 写法1:
+//        String fileName = TestFileUtil.getPath() + "demo" + File.separator + "demo.xlsx";
+        // 这里 需要指定读用哪个class去读,然后读取第一个sheet 文件流会自动关闭
+//        EasyExcel.read(fileName, DemoData.class, new DemoDataListener()).sheet().doRead();
+
+        // 写法2:
+//        fileName = TestFileUtil.getPath() + "demo" + File.separator + "demo.xlsx";
+        ExcelReader excelReader = null;
+        try {
+            excelReader = EasyExcel.read("C:\\Users\\Administrator\\Desktop\\123.xlsx", BankApiExcel.class, new DemoDataListener()).build();
+            ReadSheet readSheet = EasyExcel.readSheet(0).build();
+            excelReader.read(readSheet);
+        } finally {
+            if (excelReader != null) {
+                // 这里千万别忘记关闭,读的时候会创建临时文件,到时磁盘会崩的
+                excelReader.finish();
+            }
+        }
+    }
+}

+ 217 - 0
carbon-bank/carbon-bank-client/carbon-manager-client.iml

@@ -0,0 +1,217 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
+  <component name="FacetManager">
+    <facet type="Spring" name="Spring">
+      <configuration />
+    </facet>
+    <facet type="web" name="Web">
+      <configuration>
+        <webroots />
+        <sourceRoots>
+          <root url="file://$MODULE_DIR$/src/main/java" />
+          <root url="file://$MODULE_DIR$/src/main/resources" />
+        </sourceRoots>
+      </configuration>
+    </facet>
+  </component>
+  <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
+    <output url="file://$MODULE_DIR$/target/classes" />
+    <output-test url="file://$MODULE_DIR$/target/test-classes" />
+    <content url="file://$MODULE_DIR$">
+      <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
+      <sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
+      <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
+      <excludeFolder url="file://$MODULE_DIR$/target" />
+    </content>
+    <orderEntry type="inheritedJdk" />
+    <orderEntry type="sourceFolder" forTests="false" />
+    <orderEntry type="module" module-name="common-core" />
+    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-hystrix:1.4.6.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-netflix-hystrix:1.4.6.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter:1.3.5.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-context:1.3.5.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.security:spring-security-rsa:1.0.3.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-netflix-core:1.4.6.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-netflix-archaius:1.4.6.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: com.netflix.archaius:archaius-core:0.7.4" level="project" />
+    <orderEntry type="library" scope="RUNTIME" name="Maven: com.google.code.findbugs:jsr305:3.0.1" level="project" />
+    <orderEntry type="library" name="Maven: commons-configuration:commons-configuration:1.10" level="project" />
+    <orderEntry type="library" name="Maven: commons-lang:commons-lang:2.6" level="project" />
+    <orderEntry type="library" name="Maven: com.netflix.hystrix:hystrix-core:1.5.12" level="project" />
+    <orderEntry type="library" name="Maven: io.reactivex:rxjava:1.2.0" level="project" />
+    <orderEntry type="library" name="Maven: org.hdrhistogram:HdrHistogram:2.1.9" level="project" />
+    <orderEntry type="library" name="Maven: com.netflix.hystrix:hystrix-metrics-event-stream:1.5.12" level="project" />
+    <orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.hystrix:hystrix-serialization:1.5.12" level="project" />
+    <orderEntry type="library" scope="RUNTIME" name="Maven: com.fasterxml.jackson.module:jackson-module-afterburner:2.8.11" level="project" />
+    <orderEntry type="library" name="Maven: com.netflix.hystrix:hystrix-javanica:1.5.12" level="project" />
+    <orderEntry type="library" name="Maven: org.aspectj:aspectjweaver:1.8.13" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter:2.2.3.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-logging:1.5.18.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: ch.qos.logback:logback-classic:1.1.11" level="project" />
+    <orderEntry type="library" name="Maven: ch.qos.logback:logback-core:1.1.11" level="project" />
+    <orderEntry type="library" name="Maven: org.slf4j:jul-to-slf4j:1.7.25" level="project" />
+    <orderEntry type="library" name="Maven: org.slf4j:log4j-over-slf4j:1.7.25" level="project" />
+    <orderEntry type="library" name="Maven: jakarta.annotation:jakarta.annotation-api:1.3.5" level="project" />
+    <orderEntry type="library" scope="RUNTIME" name="Maven: org.yaml:snakeyaml:1.17" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-web:1.5.18.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-tomcat:1.5.18.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-core:8.5.35" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.tomcat:tomcat-annotations-api:8.5.35" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-el:8.5.35" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-websocket:8.5.35" level="project" />
+    <orderEntry type="library" name="Maven: org.hibernate:hibernate-validator:5.3.6.Final" level="project" />
+    <orderEntry type="library" name="Maven: javax.validation:validation-api:1.1.0.Final" level="project" />
+    <orderEntry type="library" name="Maven: org.jboss.logging:jboss-logging:3.3.2.Final" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.8.11.3" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.8.11" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-web:4.3.21.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-webmvc:4.3.21.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-expression:4.3.21.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-feign:1.4.6.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-openfeign:1.4.6.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-commons:1.3.5.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.security:spring-security-crypto:4.2.10.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: io.github.openfeign:feign-core:9.5.0" level="project" />
+    <orderEntry type="library" name="Maven: org.jvnet:animal-sniffer-annotation:1.0" level="project" />
+    <orderEntry type="library" name="Maven: io.github.openfeign:feign-slf4j:9.5.0" level="project" />
+    <orderEntry type="library" name="Maven: io.github.openfeign:feign-hystrix:9.5.0" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-netflix-ribbon:1.4.6.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: com.netflix.ribbon:ribbon:2.2.5" level="project" />
+    <orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.ribbon:ribbon-transport:2.2.5" level="project" />
+    <orderEntry type="library" scope="RUNTIME" name="Maven: io.reactivex:rxnetty-contexts:0.4.9" level="project" />
+    <orderEntry type="library" scope="RUNTIME" name="Maven: io.reactivex:rxnetty-servo:0.4.9" level="project" />
+    <orderEntry type="library" scope="RUNTIME" name="Maven: javax.inject:javax.inject:1" level="project" />
+    <orderEntry type="library" scope="RUNTIME" name="Maven: io.reactivex:rxnetty:0.4.9" level="project" />
+    <orderEntry type="library" name="Maven: com.netflix.ribbon:ribbon-core:2.2.5" level="project" />
+    <orderEntry type="library" name="Maven: com.netflix.ribbon:ribbon-httpclient:2.2.5" level="project" />
+    <orderEntry type="library" scope="RUNTIME" name="Maven: com.sun.jersey:jersey-client:1.19.1" level="project" />
+    <orderEntry type="library" scope="RUNTIME" name="Maven: com.sun.jersey:jersey-core:1.19.1" level="project" />
+    <orderEntry type="library" scope="RUNTIME" name="Maven: javax.ws.rs:jsr311-api:1.1.1" level="project" />
+    <orderEntry type="library" scope="RUNTIME" name="Maven: com.sun.jersey.contribs:jersey-apache-client4:1.19.1" level="project" />
+    <orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.servo:servo-core:0.10.1" level="project" />
+    <orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.servo:servo-internal:0.10.1" level="project" />
+    <orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.netflix-commons:netflix-commons-util:0.1.1" level="project" />
+    <orderEntry type="library" name="Maven: com.netflix.ribbon:ribbon-loadbalancer:2.2.5" level="project" />
+    <orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.netflix-commons:netflix-statistics:0.1.1" level="project" />
+    <orderEntry type="library" name="Maven: com.alibaba:fastjson:1.2.58" level="project" />
+    <orderEntry type="library" name="Maven: net.sf.dozer:dozer:5.5.1" level="project" />
+    <orderEntry type="library" name="Maven: commons-beanutils:commons-beanutils:1.9.3" level="project" />
+    <orderEntry type="library" name="Maven: commons-collections:commons-collections:3.2.2" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.commons:commons-lang3:3.6" level="project" />
+    <orderEntry type="library" name="Maven: org.slf4j:jcl-over-slf4j:1.7.25" level="project" />
+    <orderEntry type="library" name="Maven: io.jsonwebtoken:jjwt:0.9.0" level="project" />
+    <orderEntry type="library" name="Maven: net.sourceforge.jexcelapi:jxl:2.6.12" level="project" />
+    <orderEntry type="library" name="Maven: log4j:log4j:1.2.14" level="project" />
+    <orderEntry type="library" name="Maven: commons-net:commons-net:3.1" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-data-redis:1.5.18.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.data:spring-data-redis:1.8.17.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.data:spring-data-keyvalue:1.2.17.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.data:spring-data-commons:1.13.17.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-tx:4.3.21.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-oxm:4.3.21.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-context-support:4.3.21.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: redis.clients:jedis:2.9.0" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.commons:commons-pool2:2.4.3" level="project" />
+    <orderEntry type="library" name="Maven: com.github.binarywang:weixin-java-mp:3.1.0" level="project" />
+    <orderEntry type="library" name="Maven: com.github.binarywang:weixin-java-common:3.1.0" level="project" />
+    <orderEntry type="library" name="Maven: com.thoughtworks.xstream:xstream:1.4.10" level="project" />
+    <orderEntry type="library" name="Maven: xmlpull:xmlpull:1.1.3.1" level="project" />
+    <orderEntry type="library" name="Maven: xpp3:xpp3_min:1.1.4c" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.httpcomponents:httpmime:4.5.6" level="project" />
+    <orderEntry type="library" name="Maven: commons-io:commons-io:2.5" level="project" />
+    <orderEntry type="library" name="Maven: com.github.binarywang:weixin-java-pay:3.1.0" level="project" />
+    <orderEntry type="library" name="Maven: com.github.binarywang:qrcode-utils:1.1" level="project" />
+    <orderEntry type="library" name="Maven: org.jodd:jodd-http:3.7.1" level="project" />
+    <orderEntry type="library" name="Maven: org.jodd:jodd-core:3.7.1" level="project" />
+    <orderEntry type="library" name="Maven: org.jodd:jodd-upload:3.7.1" level="project" />
+    <orderEntry type="library" name="Maven: org.bouncycastle:bcpkix-jdk15on:1.59" level="project" />
+    <orderEntry type="library" name="Maven: org.bouncycastle:bcprov-jdk15on:1.59" level="project" />
+    <orderEntry type="library" name="Maven: com.google.zxing:core:3.3.0" level="project" />
+    <orderEntry type="library" name="Maven: com.google.zxing:javase:3.3.3" level="project" />
+    <orderEntry type="library" name="Maven: com.beust:jcommander:1.72" level="project" />
+    <orderEntry type="library" scope="RUNTIME" name="Maven: com.github.jai-imageio:jai-imageio-core:1.4.0" level="project" />
+    <orderEntry type="library" name="Maven: com.belerweb:pinyin4j:2.5.0" level="project" />
+    <orderEntry type="library" name="Maven: com.aliyun:aliyun-java-sdk-core:4.0.3" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.httpcomponents:httpclient:4.5.6" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.httpcomponents:httpcore:4.4.10" level="project" />
+    <orderEntry type="library" name="Maven: javax.xml.bind:jaxb-api:2.1" level="project" />
+    <orderEntry type="library" name="Maven: javax.xml.stream:stax-api:1.0-2" level="project" />
+    <orderEntry type="library" name="Maven: com.sun.xml.bind:jaxb-core:2.1.14" level="project" />
+    <orderEntry type="library" name="Maven: com.sun.xml.bind:jaxb-impl:2.1" level="project" />
+    <orderEntry type="library" name="Maven: javax.activation:activation:1.1.1" level="project" />
+    <orderEntry type="library" name="Maven: org.jsoup:jsoup:1.7.3" level="project" />
+    <orderEntry type="library" name="Maven: com.squareup.okhttp:okhttp:2.7.5" level="project" />
+    <orderEntry type="library" name="Maven: com.squareup.okio:okio:1.6.0" level="project" />
+    <orderEntry type="library" name="Maven: cn.hutool:hutool-captcha:5.4.7" level="project" />
+    <orderEntry type="library" name="Maven: cn.hutool:hutool-core:5.4.7" level="project" />
+    <orderEntry type="library" name="Maven: com.jcraft:jsch:0.1.54" level="project" />
+    <orderEntry type="library" name="Maven: dom4j:dom4j:1.6.1" level="project" />
+    <orderEntry type="library" name="Maven: xml-apis:xml-apis:1.4.01" level="project" />
+    <orderEntry type="library" name="Maven: com.github.pagehelper:pagehelper-spring-boot-starter:1.2.5" level="project" />
+    <orderEntry type="library" name="Maven: org.mybatis.spring.boot:mybatis-spring-boot-starter:1.3.1" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-jdbc:1.5.18.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.tomcat:tomcat-jdbc:8.5.35" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.tomcat:tomcat-juli:8.5.35" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-jdbc:4.3.21.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.mybatis.spring.boot:mybatis-spring-boot-autoconfigure:1.3.1" level="project" />
+    <orderEntry type="library" name="Maven: org.mybatis:mybatis:3.4.5" level="project" />
+    <orderEntry type="library" name="Maven: org.mybatis:mybatis-spring:1.3.1" level="project" />
+    <orderEntry type="library" name="Maven: com.github.pagehelper:pagehelper-spring-boot-autoconfigure:1.2.5" level="project" />
+    <orderEntry type="library" name="Maven: com.github.pagehelper:pagehelper:5.1.4" level="project" />
+    <orderEntry type="library" name="Maven: com.github.jsqlparser:jsqlparser:1.0" level="project" />
+    <orderEntry type="library" name="Maven: io.springfox:springfox-swagger2:2.6.1" level="project" />
+    <orderEntry type="library" name="Maven: io.swagger:swagger-annotations:1.5.10" level="project" />
+    <orderEntry type="library" name="Maven: io.swagger:swagger-models:1.5.10" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.8.0" level="project" />
+    <orderEntry type="library" name="Maven: io.springfox:springfox-spi:2.6.1" level="project" />
+    <orderEntry type="library" name="Maven: io.springfox:springfox-core:2.6.1" level="project" />
+    <orderEntry type="library" name="Maven: io.springfox:springfox-schema:2.6.1" level="project" />
+    <orderEntry type="library" name="Maven: io.springfox:springfox-swagger-common:2.6.1" level="project" />
+    <orderEntry type="library" name="Maven: io.springfox:springfox-spring-web:2.6.1" level="project" />
+    <orderEntry type="library" name="Maven: com.google.guava:guava:18.0" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml:classmate:1.3.4" level="project" />
+    <orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.25" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.plugin:spring-plugin-core:1.2.0.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-beans:4.3.21.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-context:4.3.21.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-aop:4.3.21.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.plugin:spring-plugin-metadata:1.2.0.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.mapstruct:mapstruct:1.0.0.Final" level="project" />
+    <orderEntry type="library" name="Maven: io.springfox:springfox-swagger-ui:2.6.1" level="project" />
+    <orderEntry type="library" name="Maven: org.projectlombok:lombok:1.16.18" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-starter-test:1.5.18.RELEASE" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-test:1.5.18.RELEASE" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-test-autoconfigure:1.5.18.RELEASE" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: com.jayway.jsonpath:json-path:2.2.0" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: net.minidev:json-smart:2.2.1" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: net.minidev:accessors-smart:1.1" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: junit:junit:4.12" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.assertj:assertj-core:2.6.0" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.mockito:mockito-core:1.10.19" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.objenesis:objenesis:2.1" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest-core:1.3" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest-library:1.3" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.skyscreamer:jsonassert:1.4.0" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: com.vaadin.external.google:android-json:0.0.20131108.vaadin1" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-core:4.3.21.RELEASE" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.springframework:spring-test:4.3.21.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-devtools:1.5.18.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot:1.5.18.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-autoconfigure:1.5.18.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: com.qiniu:qiniu-java-sdk:7.2.28" level="project" />
+    <orderEntry type="library" scope="RUNTIME" name="Maven: com.squareup.okhttp3:okhttp:3.8.1" level="project" />
+    <orderEntry type="library" name="Maven: com.google.code.gson:gson:2.8.5" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.poi:poi:3.17" level="project" />
+    <orderEntry type="library" name="Maven: commons-codec:commons-codec:1.10" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.commons:commons-collections4:4.1" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.poi:poi-ooxml:3.17" level="project" />
+    <orderEntry type="library" name="Maven: com.github.virtuald:curvesapi:1.04" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.poi:poi-ooxml-schemas:3.17" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.xmlbeans:xmlbeans:2.6.0" level="project" />
+    <orderEntry type="library" name="Maven: stax:stax-api:1.0.1" level="project" />
+    <orderEntry type="library" name="Maven: com.alibaba:easyexcel:2.2.3" level="project" />
+    <orderEntry type="library" name="Maven: cglib:cglib:3.1" level="project" />
+    <orderEntry type="library" name="Maven: org.ow2.asm:asm:4.2" level="project" />
+    <orderEntry type="library" name="Maven: org.ehcache:ehcache:3.2.3" level="project" />
+  </component>
+</module>

+ 63 - 0
carbon-bank/carbon-bank-client/pom.xml

@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <groupId>com.hcloud.microserver</groupId>
+    <artifactId>carbon-manager-client</artifactId>
+    <version>${carbon.managerclient.version}</version>
+    <name>carbon-manage-client</name>
+    <description>Demo project for Spring Boot</description>
+
+    <properties>
+        <java.version>1.8</java.version>
+    </properties>
+
+    <parent>
+        <groupId>com.hcloud.microserver</groupId>
+        <artifactId>carbon-bank</artifactId>
+        <version>0.0.1-SNAPSHOT</version>
+        <relativePath>../../carbon-bank/pom.xml</relativePath>
+    </parent>
+
+    <dependencies>
+        <dependency>
+            <groupId>com.hcloud.microserver</groupId>
+            <artifactId>common-core</artifactId>
+            <version>0.0.1-SNAPSHOT</version>
+        </dependency>
+
+        <dependency>
+            <groupId>com.github.pagehelper</groupId>
+            <artifactId>pagehelper-spring-boot-starter</artifactId>
+        </dependency>
+
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-surefire-plugin</artifactId>
+                <version>2.18.1</version>
+                <configuration>
+                    <skipTests>true</skipTests>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-maven-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>repackage</goal><!--可以把依赖的包都打包到生成的Jar包中 -->
+                        </goals>
+                        <!--可以生成不含依赖包的不可执行Jar包 -->
+                        <configuration>
+                            <classifier>exec</classifier>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>

+ 10 - 0
carbon-bank/carbon-bank-client/src/main/java/com/hcloud/microserver/facade/carbon/CarbonManageApplication.java

@@ -0,0 +1,10 @@
+package com.hcloud.microserver.facade.carbon;
+
+import org.springframework.boot.SpringApplication;
+
+
+public class CarbonManageApplication {
+    public static void main(String[] args) {
+        SpringApplication.run(CarbonManageApplication.class, args);
+    }
+}

+ 23 - 0
carbon-bank/carbon-bank-client/src/main/java/com/hcloud/microserver/facade/carbon/client/BasePositionClient.java

@@ -0,0 +1,23 @@
+package com.hcloud.microserver.facade.carbon.client;
+
+import com.hcloud.microserver.commoncore.base.ResultVO;
+import com.hcloud.microserver.facade.carbon.entity.BasePosition;
+import com.hcloud.microserver.facade.carbon.fallback.impl.BasePositionFallback;
+import org.springframework.cloud.netflix.feign.FeignClient;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+
+import java.util.List;
+
+@FeignClient(name = "carbon-service", path = "/basePosition", fallbackFactory = BasePositionFallback.class)
+public interface BasePositionClient {
+
+    @PostMapping("/findByCodeAndLevel")
+    ResultVO findByCodeAndLevel(@RequestBody BasePosition basePosition);
+
+    @PostMapping("/findByCodes")
+    ResultVO findByCodes(@RequestBody List<String> codes);
+
+    @PostMapping("/findChongqingArea")
+    ResultVO findChongqingArea(@RequestBody(required = false) BasePosition basePosition);
+}

+ 24 - 0
carbon-bank/carbon-bank-client/src/main/java/com/hcloud/microserver/facade/carbon/client/CollectiveFarmerClient.java

@@ -0,0 +1,24 @@
+package com.hcloud.microserver.facade.carbon.client;
+
+import com.hcloud.microserver.commoncore.base.ResultVO;
+import com.hcloud.microserver.facade.carbon.fallback.impl.CollectiveFarmerFallback;
+import com.hcloud.microserver.facade.carbon.forms.CollectiveFarmerForm;
+import org.springframework.cloud.netflix.feign.FeignClient;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+
+@FeignClient(name = "carbon-service", path = "/collectiveFarmer", fallbackFactory = CollectiveFarmerFallback.class)
+public interface CollectiveFarmerClient {
+
+    @PostMapping("/save")
+    ResultVO save(@RequestBody CollectiveFarmerForm collectiveFarmerForm);
+
+    @PostMapping("/delete")
+    ResultVO delete(@RequestBody CollectiveFarmerForm collectiveFarmerForm);
+
+    @PostMapping("/update")
+    ResultVO update(@RequestBody CollectiveFarmerForm collectiveFarmerForm);
+
+    @PostMapping("/searchByPage")
+    ResultVO searchByPage(@RequestBody CollectiveFarmerForm collectiveFarmerForm);
+}

+ 21 - 0
carbon-bank/carbon-bank-client/src/main/java/com/hcloud/microserver/facade/carbon/client/CompanyClient.java

@@ -0,0 +1,21 @@
+package com.hcloud.microserver.facade.carbon.client;
+
+import com.alibaba.fastjson.JSONObject;
+import com.hcloud.microserver.commoncore.base.ResultVO;
+import com.hcloud.microserver.facade.carbon.fallback.impl.CompanyFallback;
+import org.springframework.cloud.netflix.feign.FeignClient;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+
+@FeignClient(name = "carbon-service", path = "/company", fallbackFactory = CompanyFallback.class)
+public interface CompanyClient {
+
+    @PostMapping("/add")
+    ResultVO addCompany(@RequestBody JSONObject jsonObject);
+
+    @PostMapping("/update")
+    ResultVO updateCompany(@RequestBody JSONObject jsonObject);
+
+    @PostMapping("/delete")
+    ResultVO deleteCompany(@RequestBody JSONObject jsonObject);
+}

+ 136 - 0
carbon-bank/carbon-bank-client/src/main/java/com/hcloud/microserver/facade/carbon/client/CustomerClient.java

@@ -0,0 +1,136 @@
+package com.hcloud.microserver.facade.carbon.client;
+
+import com.hcloud.microserver.commoncore.base.ResultVO;
+import com.hcloud.microserver.facade.carbon.fallback.impl.CustomerFallback;
+import com.hcloud.microserver.facade.carbon.forms.CustomerCompanyInfoForm;
+import com.hcloud.microserver.facade.carbon.forms.CustomerInfoForm;
+import org.springframework.cloud.netflix.feign.FeignClient;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestParam;
+
+import javax.xml.transform.Result;
+
+/**
+ * @author xiezt
+ */
+@FeignClient(name = "carbon-service", path = "/customer",fallbackFactory = CustomerFallback.class)
+public interface CustomerClient {
+
+    /**
+     * 分页查询爱心用户信息
+     * @param customerInfoForm
+     * @return
+     */
+    @PostMapping("/searchCustomerByPage")
+    ResultVO searchCustomerInfoByPage(@RequestBody CustomerInfoForm customerInfoForm);
+
+    /**
+     * 查询爱心用户明细
+     * @param guid
+     * @return
+     */
+    @GetMapping("/getCustomerInfoById")
+    ResultVO getCustomerInfoById(@RequestParam("guid") String guid);
+
+    /**
+     * 保存爱心用户信息
+     * @param customerInfoForm
+     * @return
+     */
+    @PostMapping("/saveCustomerInfo")
+    ResultVO saveCustomerInfo(@RequestBody CustomerInfoForm customerInfoForm);
+
+    /**
+     * 修改爱心用户信息
+     * @param customerInfoForm
+     * @return
+     */
+    @PostMapping("/updateCustomerInfo")
+    ResultVO modifiedCustomerInfo(@RequestBody CustomerInfoForm customerInfoForm);
+
+    /**
+     * 通过登录账号查询爱心用户信息
+     * @param account
+     * @return
+     */
+    @GetMapping("/getCustomerInfoByAccount")
+    ResultVO getCustomerInfoByAccount(@RequestParam("account") String account);
+
+    /**
+     * 多条件查询爱心用户信息
+     * @param queryStr
+     * @return
+     */
+    @GetMapping("/getCustomerInfoByInfo")
+    ResultVO getCustomerInfoByInfo(@RequestParam("queryStr") String queryStr);
+
+    /**
+     * 通过爱心用户ID,查询爱心用户企业认证信息
+     * @param customerId
+     * @return
+     */
+    @GetMapping("/getCustomerCompanyInfo")
+    ResultVO getCustomerCompanyInfo(@RequestParam("customerId") String customerId);
+
+    /**
+     * 通过登录渠道编码查询用户信息
+     * @param type
+     * @param threeCode
+     * @return
+     */
+    @GetMapping("/getCustomerInfoByChannel")
+    ResultVO getCustomerInfoByChannelInfo(@RequestParam("channelType") Integer type, @RequestParam("code") String threeCode);
+
+    /**
+     * 获取离线支付凭证通过用户信息
+     * @param customerId
+     * @return
+     */
+    @GetMapping("/getOfflinePayVoucherById")
+    ResultVO getOfflinePayVoucherById(@RequestParam("customerId") String customerId);
+
+    /**
+     * 企业分页
+     * @param customerCompanyInfoForm
+     * @return
+     */
+    @PostMapping("/searchCompanyByPage")
+    ResultVO searchCompanyByPage(@RequestBody CustomerCompanyInfoForm customerCompanyInfoForm);
+
+
+    /**
+     * 验证爱心用户企业认证信息
+     * @param customerCompanyInfoForm
+     * @return
+     */
+    @PostMapping("/validateCompanyInfo")
+    ResultVO validateCustomerCompany(@RequestBody CustomerCompanyInfoForm customerCompanyInfoForm);
+
+    /**
+     * 重置密码
+     * @param customerInfoForm
+     * @return
+     */
+    @PostMapping("/resetPassword")
+    ResultVO resetPassword(@RequestBody CustomerInfoForm customerInfoForm);
+
+    /**
+     * 更新用户信息(微信登录渠道及用户信息内的微信支付信息)
+     * @param customerInfoForm
+     * @return
+     */
+    @PostMapping("/updateCustomerInfoForWeChat")
+    ResultVO updateCustomerInfoForWeChat(@RequestBody CustomerInfoForm customerInfoForm);
+
+    /**
+     * 绑定用户手机号,并合并订单相同手机号的订单信息
+     * @param customerId
+     * @param phone
+     * @return
+     */
+    @GetMapping("/bindCustomerPhone")
+    ResultVO bindCustomerPhone(@RequestParam("customerId") String customerId,
+                               @RequestParam("phone") String phone);
+}

+ 71 - 0
carbon-bank/carbon-bank-client/src/main/java/com/hcloud/microserver/facade/carbon/client/FarmerInfoClient.java

@@ -0,0 +1,71 @@
+package com.hcloud.microserver.facade.carbon.client;
+
+import com.hcloud.microserver.commoncore.base.ResultVO;
+import com.hcloud.microserver.facade.carbon.fallback.impl.FarmerInfoFallback;
+import com.hcloud.microserver.facade.carbon.forms.FarmerInfoForm;
+import com.hcloud.microserver.facade.carbon.forms.PovertyAreaForm;
+import org.springframework.cloud.netflix.feign.FeignClient;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestParam;
+
+@FeignClient(name = "carbon-service", path = "/farmer", fallbackFactory = FarmerInfoFallback.class)
+public interface FarmerInfoClient {
+
+    @PostMapping("/save")
+    ResultVO save(@RequestBody FarmerInfoForm farmerInfoForm);
+
+    @PostMapping("/delete")
+    ResultVO delete(@RequestBody FarmerInfoForm farmerInfoForm);
+
+    @PostMapping("/update")
+    ResultVO update(@RequestBody FarmerInfoForm farmerInfoForm);
+
+    @PostMapping("/searchByPage")
+    ResultVO searchByPage(@RequestBody FarmerInfoForm farmerInfoForm);
+
+    @PostMapping("/searchByCollectiveId")
+    ResultVO searchByCollectiveId(@RequestParam(name = "collectiveId") String collectiveId);
+
+    /**
+     * 查询贫困区域(分页查询)
+     * @param povertyAreaForm
+     * @return
+     */
+    @PostMapping("/searchAreaByPage")
+    ResultVO searchPovertyAreaByPage(@RequestBody PovertyAreaForm povertyAreaForm);
+
+    /**
+     * 通过贫困区域查询贫困户信息
+     * @param farmerInfoForm
+     * @return
+     */
+    @PostMapping("/getFarmerInfoByAreaId")
+    ResultVO getFarmerInfoByAreaId(@RequestBody FarmerInfoForm farmerInfoForm);
+
+    /**
+     * 查询贫困区域明细信息(含贫困户统计信息,贫困区域贫困户列表,贫困区域基本信息)
+     * @param areaId
+     * @return
+     */
+    @GetMapping("/getPovertyAreaById")
+    ResultVO getPovertyAreaById(@RequestParam("areaId") String areaId);
+
+    /**
+     * 获取农户信息通过产品Id
+     * @param productGuid
+     * @return
+     */
+    @PostMapping("/searchByProductGuid")
+    ResultVO searchByProductGuid(@RequestParam(name = "productGuid") String productGuid);
+
+
+    /**
+     * 获取农户明细信息
+     * @param farmerId
+     * @return
+     */
+    @GetMapping("/getFarmerInfoById")
+    ResultVO getFarmerInfoById(@RequestParam("guid") String farmerId);
+}

+ 79 - 0
carbon-bank/carbon-bank-client/src/main/java/com/hcloud/microserver/facade/carbon/client/GoodsInfoClient.java

@@ -0,0 +1,79 @@
+package com.hcloud.microserver.facade.carbon.client;
+
+import com.alibaba.fastjson.JSONObject;
+import com.hcloud.microserver.commoncore.base.ResultVO;
+import com.hcloud.microserver.facade.carbon.fallback.impl.GoodsInfoFallback;
+import com.hcloud.microserver.facade.carbon.forms.FarmerInfoForm;
+import com.hcloud.microserver.facade.carbon.forms.GoodsInfoForm;
+import org.springframework.cloud.netflix.feign.FeignClient;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestParam;
+
+import java.util.List;
+
+/**
+ * @author xiezt
+ */
+@FeignClient(name = "carbon-service", path = "/goods", fallbackFactory = GoodsInfoFallback.class)
+public interface GoodsInfoClient {
+
+    @PostMapping("/shelves")
+    ResultVO shelves(@RequestBody List<GoodsInfoForm> goodsInfoForms);
+
+    @PostMapping("/delete")
+    ResultVO delete(@RequestBody GoodsInfoForm goodsInfoForm);
+
+    @PostMapping("update")
+    ResultVO update(@RequestBody GoodsInfoForm goodsInfoForm);
+
+    @PostMapping("/searchByPage")
+    ResultVO searchByPage(@RequestBody GoodsInfoForm goodsInfoForm);
+
+    @PostMapping("/searchJoinListByPage")
+    ResultVO searchJoinListByPage(@RequestBody GoodsInfoForm goodsInfoForm);
+
+    /**
+     * 分页查询商品类型信息(移动端展示)
+     * @param goodsInfoForm
+     * @return
+     */
+    @PostMapping("/searchGoodsInfoByPage")
+    ResultVO searchGoodsInfoByPage(@RequestBody GoodsInfoForm goodsInfoForm);
+
+
+
+    /**
+     * 获取商品详情
+     * @param goodsId
+     * @return
+     */
+    @GetMapping("/getGoodsInfoById")
+    ResultVO getGoodsInfoById(@RequestParam("goodsId") String goodsId);
+
+    /**
+     * 根据需求碳汇量计算商品列表
+     * @param carbon
+     * @return
+     */
+    @GetMapping("/getGoodsInfoByCarbon")
+    ResultVO getGoodsInfoByCarbon(@RequestParam("carbon") String carbon);
+
+    /**
+     * 更新商品
+     * @param jsonObject
+     * @return
+     */
+    @PostMapping("/updateGoods")
+    ResultVO updateGoods(@RequestBody JSONObject jsonObject);
+
+    /**
+     * 通过农户Id查询所属商品
+     * @param farmerInfoForm
+     * @return
+     */
+    @PostMapping("/getGoodsInfoByFarmerId")
+    ResultVO getGoodsInfoByFarmerId(@RequestBody FarmerInfoForm farmerInfoForm);
+
+}

+ 137 - 0
carbon-bank/carbon-bank-client/src/main/java/com/hcloud/microserver/facade/carbon/client/OrderClient.java

@@ -0,0 +1,137 @@
+package com.hcloud.microserver.facade.carbon.client;
+
+import com.hcloud.microserver.commoncore.base.ResultVO;
+import com.hcloud.microserver.facade.carbon.fallback.impl.OrderFallback;
+import com.hcloud.microserver.facade.carbon.forms.GoodsCredentialInfoForm;
+import com.hcloud.microserver.facade.carbon.forms.GoodsOrderInfoForm;
+import org.springframework.cloud.netflix.feign.FeignClient;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestParam;
+
+/**
+ * @author JYJ
+ */
+@FeignClient(name = "carbon-service", path = "/order",fallbackFactory = OrderFallback.class)
+public interface OrderClient {
+    /**
+     * 分页查询订单信息
+     * @param goodsOrderInfoForm
+     * @return
+     */
+    @PostMapping("/searchOrderInfoPage")
+    ResultVO searchOrderInfoByPage(@RequestBody GoodsOrderInfoForm goodsOrderInfoForm);
+
+    /**
+     * 分页获取爱心用户订单信息
+     * @param goodsOrderInfoForm
+     * @return
+     */
+    @PostMapping("/getOrderInfoByCustomerId")
+    ResultVO getOrderInfoByCustomerId(@RequestBody GoodsOrderInfoForm goodsOrderInfoForm);
+
+    /**
+     * 查询订单明细信息
+     * @param orderId
+     * @return
+     */
+    @GetMapping("/getOrderDetail")
+    ResultVO getOrderDetailInfoByOrderId(@RequestParam("orderId") String orderId);
+
+    /**
+     * 获取某订单基本信息
+     * @param orderId
+     * @return
+     */
+    @GetMapping("/getOrderInfoById")
+    ResultVO getOrderInfoById(@RequestParam("guid") String orderId);
+
+    /**
+     * 删除订单信息
+     * @param orderId
+     * @return
+     */
+    @GetMapping("/delOderInfoById")
+    ResultVO delOrderInfo(@RequestParam("guid") String orderId);
+
+    /**
+     * 更新订单信息
+     * @param goodsOrderInfoForm
+     * @return
+     */
+    @PostMapping("/modifiedOrderInfo")
+    ResultVO updateOrderInfo(@RequestBody GoodsOrderInfoForm goodsOrderInfoForm);
+
+    /**
+     * 统一下单生成商品订单,并生成支付订单。返回支付订单信息
+     * @param goodsOrderInfoForm
+     * @return
+     */
+    @PostMapping("/insertOrderInfoForPay")
+    ResultVO saveOrderInfoAndPayOrderInfo(@RequestBody GoodsOrderInfoForm goodsOrderInfoForm);
+
+    /**
+     * 支付回调后,统一更新订单信息及支付订单信息
+     * @param payOrderNO
+     * @return
+     */
+    @GetMapping("/modifiedOrderInfoForPay")
+    ResultVO updateOrderInfoAndPayOrderInfo(@RequestParam("payNo") String payOrderNO);
+
+    /**
+     * 获取用户证书列表
+     * @param goodsCredentialInfoForm
+     * @return
+     */
+    @GetMapping("/getCustomerCredentialList")
+    ResultVO getCustomerCredentialList(@RequestBody GoodsCredentialInfoForm goodsCredentialInfoForm);
+
+    /**
+     * 订单支付超时取消
+     * @param orderId
+     * @return
+     */
+    @GetMapping("/callbackOrderInfo")
+    ResultVO callbackOrderInfo(@RequestParam("orderId") String orderId);
+
+    /**
+     * 通过订单编号查询订单信息
+     * @param orderNo
+     * @return
+     */
+    @GetMapping("/getOrderInfoByNo")
+    ResultVO getOrderInfoByOrderNo(@RequestParam("orderNo") String orderNo);
+
+    /**
+     * 取消用户订单
+     * @param orderId
+     * @return
+     */
+    @GetMapping("/cancelOrderInfo")
+    ResultVO cancelOrderInfo(@RequestParam("orderId") String orderId);
+
+    /**
+     * 通过碳汇需求量购买指定农户下的碳汇商品
+     * @param goodsOrderInfoForm
+     * @return
+     */
+    @PostMapping("/saveOrderInfoForFarmer")
+    ResultVO saveOrderInfoForFarmer(@RequestBody GoodsOrderInfoForm goodsOrderInfoForm);
+
+    /**
+     * 根据证书guid获取证书
+     * @param guid
+     * @return
+     */
+    @GetMapping("/getCredential")
+    ResultVO getCredentialInfo(@RequestParam(name = "guid") String guid);
+
+    /**
+     * 根据订单id返回证书
+     * @param orderId
+     * @return
+     */
+    @GetMapping("/getCredentialByOrderId")
+    ResultVO getCredentialByOrderId(@RequestParam(name = "orderId") String orderId);
+}

+ 14 - 0
carbon-bank/carbon-bank-client/src/main/java/com/hcloud/microserver/facade/carbon/client/OrderDetailClient.java

@@ -0,0 +1,14 @@
+package com.hcloud.microserver.facade.carbon.client;
+
+import com.hcloud.microserver.commoncore.base.ResultVO;
+import com.hcloud.microserver.facade.carbon.fallback.impl.OrderDetailFallback;
+import org.springframework.cloud.netflix.feign.FeignClient;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+
+@FeignClient(name = "carbon-service", path = "/orderDetail", fallbackFactory = OrderDetailFallback.class)
+public interface OrderDetailClient {
+
+    @PostMapping("/searchByOrderGuid")
+    ResultVO searchByOrderGuid(@RequestParam(name = "orderGuid") String orderGuid);
+}

+ 59 - 0
carbon-bank/carbon-bank-client/src/main/java/com/hcloud/microserver/facade/carbon/client/OrderPayApplyClient.java

@@ -0,0 +1,59 @@
+package com.hcloud.microserver.facade.carbon.client;
+
+import com.hcloud.microserver.commoncore.base.ResultVO;
+import com.hcloud.microserver.facade.carbon.fallback.impl.OrderPayApplyFallback;
+import com.hcloud.microserver.facade.carbon.forms.GoodsOrderInfoForm;
+import com.hcloud.microserver.facade.carbon.forms.OrderPayApplyForm;
+import com.hcloud.microserver.facade.carbon.forms.OrderPayVoucherForm;
+import org.springframework.cloud.netflix.feign.FeignClient;
+import org.springframework.web.bind.annotation.*;
+
+/**
+ * @author xiezt
+ */
+@FeignClient(name = "carbon-service", path = "/pay/apply", fallbackFactory = OrderPayApplyFallback.class)
+public interface OrderPayApplyClient {
+
+    /**
+     * 分页查询离线支付申请信息
+     * @param orderPayApplyForm
+     * @return
+     */
+    @PostMapping("/searchByPage")
+    ResultVO searchPayApplyByPage(@RequestBody OrderPayApplyForm orderPayApplyForm);
+
+    /**
+     * 更新离线支付申请信息
+     * @param orderPayApplyForm
+     * @return
+     */
+    @PostMapping("/updatePayApply")
+    ResultVO updatePayApplyById(@RequestBody OrderPayApplyForm orderPayApplyForm);
+
+
+    /**
+     * 删除离线支付申请信息
+     * @param guid
+     * @return
+     */
+    @GetMapping("/delPayApply")
+    ResultVO delPayApply(@RequestParam("guid") String guid);
+
+
+    /**
+     * 生成离线支付申请
+     * @param goodsOrderInfoForm
+     * @return
+     */
+    @PostMapping("/savePayApplyInfo")
+    ResultVO savePayApplyInfo(@RequestBody GoodsOrderInfoForm goodsOrderInfoForm);
+
+
+    /**
+     * 生成离线支付凭证
+     * @param payVoucherForm
+     * @return
+     */
+    @PostMapping("/saveOffLienVoucher")
+    ResultVO saveOffLienPayVoucher(@RequestBody OrderPayVoucherForm payVoucherForm);
+}

+ 55 - 0
carbon-bank/carbon-bank-client/src/main/java/com/hcloud/microserver/facade/carbon/client/OrderPayClient.java

@@ -0,0 +1,55 @@
+package com.hcloud.microserver.facade.carbon.client;
+
+import com.hcloud.microserver.commoncore.base.ResultVO;
+import com.hcloud.microserver.facade.carbon.fallback.impl.OrderPayFallback;
+import com.hcloud.microserver.facade.carbon.forms.GoodsOrderInfoForm;
+import com.hcloud.microserver.facade.carbon.forms.GoodsPayOrderForm;
+import com.hcloud.microserver.facade.carbon.forms.PaymentForm;
+import jdk.nashorn.internal.objects.annotations.Getter;
+import org.springframework.cloud.netflix.feign.FeignClient;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestParam;
+
+/**
+ * @author JYJ
+ */
+@FeignClient(name = "carbon-service", path = "/order/pay", fallbackFactory = OrderPayFallback.class)
+public interface OrderPayClient {
+
+    /**
+     * 查询某订单,支付流水明细
+     * @param orderId
+     * @return
+     */
+    @GetMapping("/getListById")
+    ResultVO getOrderPayListByOrderId(@RequestParam("orderId") String orderId);
+
+    /**
+     * 保存支付订单信息
+     * @param goodsPayOrderForm
+     * @return
+     */
+    @PostMapping("/saveOrderPayInfo")
+    ResultVO savePayOrderInfo(@RequestBody GoodsPayOrderForm goodsPayOrderForm);
+
+    /**
+     * 更新支付订单明细
+     * @param goodsPayOrderForm
+     * @return
+     */
+    @PostMapping("/modifiedOrderPayInfo")
+    ResultVO updateOrderPayInfo(@RequestBody GoodsPayOrderForm goodsPayOrderForm);
+
+    /**
+     * 通过支付订单编号查询支付信息
+     * @param payNo
+     * @return
+     */
+    @GetMapping("/getPayOrderInfoByNo")
+    ResultVO getPayOrderInfoByPayNo(@RequestParam("payNo") String payNo);
+
+    @PostMapping("/queryPaymentByPage")
+    ResultVO queryPaymentByPage(@RequestBody PaymentForm paymentForm);
+}

+ 20 - 0
carbon-bank/carbon-bank-client/src/main/java/com/hcloud/microserver/facade/carbon/client/PayApplyClient.java

@@ -0,0 +1,20 @@
+package com.hcloud.microserver.facade.carbon.client;
+
+import com.alibaba.fastjson.JSONObject;
+import com.hcloud.microserver.commoncore.base.ResultVO;
+import com.hcloud.microserver.facade.carbon.fallback.impl.PayApplyFallback;
+import com.hcloud.microserver.facade.carbon.forms.OrderPayApplyForm;
+import org.springframework.cloud.netflix.feign.FeignClient;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+
+@FeignClient(name = "carbon-service", path = "/payApply", fallbackFactory = PayApplyFallback.class)
+public interface PayApplyClient {
+
+    @PostMapping("/searchByPage")
+    ResultVO searchByPage(@RequestBody OrderPayApplyForm orderPayApplyForm);
+
+    @PostMapping("/audit")
+    ResultVO audit(@RequestBody JSONObject jsonObject);
+
+}

+ 15 - 0
carbon-bank/carbon-bank-client/src/main/java/com/hcloud/microserver/facade/carbon/client/PayVoucherClient.java

@@ -0,0 +1,15 @@
+package com.hcloud.microserver.facade.carbon.client;
+
+import com.hcloud.microserver.commoncore.base.ResultVO;
+import com.hcloud.microserver.facade.carbon.fallback.impl.PayVoucherFallback;
+import com.hcloud.microserver.facade.carbon.forms.OrderPayVoucherForm;
+import org.springframework.cloud.netflix.feign.FeignClient;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+
+@FeignClient(name = "carbon-service", path = "/voucher", fallbackFactory = PayVoucherFallback.class)
+public interface PayVoucherClient {
+
+    @PostMapping("/searchByPage")
+    ResultVO searchByPage(@RequestBody OrderPayVoucherForm orderPayVoucherForm);
+}

+ 29 - 0
carbon-bank/carbon-bank-client/src/main/java/com/hcloud/microserver/facade/carbon/client/PovertyAreaClient.java

@@ -0,0 +1,29 @@
+package com.hcloud.microserver.facade.carbon.client;
+
+import com.hcloud.microserver.commoncore.base.ResultVO;
+import com.hcloud.microserver.facade.carbon.fallback.impl.PovertyAreaFallback;
+import com.hcloud.microserver.facade.carbon.forms.PovertyAreaForm;
+import org.springframework.cloud.netflix.feign.FeignClient;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestParam;
+
+@FeignClient(name = "carbon-service", path = "/povertyArea", fallbackFactory = PovertyAreaFallback.class)
+public interface PovertyAreaClient {
+
+    @PostMapping("/searchByPage")
+    ResultVO searchByPage(@RequestBody PovertyAreaForm povertyAreaForm);
+
+    @PostMapping("/save")
+    ResultVO save(@RequestBody PovertyAreaForm povertyAreaForm);
+
+    @PostMapping("/update")
+    ResultVO update(@RequestBody PovertyAreaForm povertyAreaForm);
+
+    @PostMapping("/del")
+    ResultVO del(@RequestBody PovertyAreaForm povertyAreaForm);
+
+    @GetMapping("/findByGuid")
+    ResultVO findByGuid(@RequestParam(name = "guid") String guid);
+}

+ 41 - 0
carbon-bank/carbon-bank-client/src/main/java/com/hcloud/microserver/facade/carbon/client/ProductInfoClient.java

@@ -0,0 +1,41 @@
+package com.hcloud.microserver.facade.carbon.client;
+
+import com.alibaba.fastjson.JSONObject;
+import com.hcloud.microserver.commoncore.base.ResultVO;
+import com.hcloud.microserver.facade.carbon.fallback.impl.ProductInfoFallback;
+import com.hcloud.microserver.facade.carbon.forms.ProductInfoForm;
+import org.springframework.cloud.netflix.feign.FeignClient;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestParam;
+
+@FeignClient(name = "carbon-service", path = "/product", fallbackFactory = ProductInfoFallback.class)
+public interface ProductInfoClient {
+
+    @PostMapping("/save")
+    ResultVO save(@RequestBody ProductInfoForm productInfoForm);
+
+    @PostMapping("/delete")
+    ResultVO delete(@RequestBody ProductInfoForm productInfoForm);
+
+    @PostMapping("/update")
+    ResultVO update(@RequestBody ProductInfoForm productInfoForm);
+
+    @PostMapping("/searchByPage")
+    ResultVO searchByPage(@RequestBody ProductInfoForm productInfoForm);
+
+    @PostMapping("/expansions")
+    ResultVO expansions(@RequestParam(name = "guid") String guid);
+
+    @PostMapping("/belongs")
+    ResultVO belongs(@RequestParam(name = "guid") String guid);
+
+    @PostMapping("/publish")
+    ResultVO publish(@RequestBody JSONObject jsonObject);
+
+    @PostMapping("/publishGoods")
+    ResultVO publishGoods(@RequestBody JSONObject jsonObject);
+
+    @PostMapping("/findByGoodsInfoGuid")
+    ResultVO findByGoodsInfoGuid(@RequestParam("goodsInfoGuid") String goodsInfoGuid);
+}

+ 34 - 0
carbon-bank/carbon-bank-client/src/main/java/com/hcloud/microserver/facade/carbon/client/ProductTypeClient.java

@@ -0,0 +1,34 @@
+package com.hcloud.microserver.facade.carbon.client;
+
+import com.hcloud.microserver.commoncore.base.ResultVO;
+import com.hcloud.microserver.facade.carbon.fallback.impl.ProductTypeFallback;
+import com.hcloud.microserver.facade.carbon.forms.ProductTypeForm;
+import org.springframework.cloud.netflix.feign.FeignClient;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestParam;
+
+@FeignClient(name = "carbon-service", path = "/productType", fallbackFactory = ProductTypeFallback.class)
+public interface ProductTypeClient {
+
+    @PostMapping("/save")
+    ResultVO save(@RequestBody ProductTypeForm productTypeForm);
+
+    @PostMapping("/delete")
+    ResultVO delete(@RequestBody ProductTypeForm productTypeForm);
+
+    @PostMapping("/update")
+    ResultVO update(@RequestBody ProductTypeForm productTypeForm);
+
+    @PostMapping("/searchByPage")
+    ResultVO searchByPage(@RequestBody ProductTypeForm productTypeForm);
+
+    @PostMapping("/expansions")
+    ResultVO expansions(@RequestParam(name = "guid") String guid);
+
+    @PostMapping("/all")
+    ResultVO findAll(@RequestBody(required = false) ProductTypeForm productTypeForm);
+
+    @PostMapping("/checkTypeVal")
+    ResultVO checkTypeVal(@RequestParam(name = "typeVal") String typeVal);
+}

+ 24 - 0
carbon-bank/carbon-bank-client/src/main/java/com/hcloud/microserver/facade/carbon/entity/BasePosition.java

@@ -0,0 +1,24 @@
+package com.hcloud.microserver.facade.carbon.entity;
+
+import lombok.Data;
+
+@Data
+public class BasePosition {
+    private Integer id;
+
+    private String upCode;
+
+    private String name;
+
+    private Integer level;
+
+    private String pinyin;
+
+    private String acronym;
+
+    private String code;
+
+    private String areaCode;
+
+    private String zip;
+}

+ 125 - 0
carbon-bank/carbon-bank-client/src/main/java/com/hcloud/microserver/facade/carbon/entity/CarbonCalculateRule.java

@@ -0,0 +1,125 @@
+package com.hcloud.microserver.facade.carbon.entity;
+
+import java.util.Date;
+
+public class CarbonCalculateRule {
+    private String guid;
+
+    private String fkProductTypeId;
+
+    private String ruleName;
+
+    private String paramA;
+
+    private String paramB;
+
+    private String paramC;
+
+    private String paramD;
+
+    private String paramE;
+
+    private String paramR;
+
+    private Integer state;
+
+    private Date createTime;
+
+    private Date modifiedTime;
+
+    public String getGuid() {
+        return guid;
+    }
+
+    public void setGuid(String guid) {
+        this.guid = guid == null ? null : guid.trim();
+    }
+
+    public String getFkProductTypeId() {
+        return fkProductTypeId;
+    }
+
+    public void setFkProductTypeId(String fkProductTypeId) {
+        this.fkProductTypeId = fkProductTypeId == null ? null : fkProductTypeId.trim();
+    }
+
+    public String getRuleName() {
+        return ruleName;
+    }
+
+    public void setRuleName(String ruleName) {
+        this.ruleName = ruleName == null ? null : ruleName.trim();
+    }
+
+    public String getParamA() {
+        return paramA;
+    }
+
+    public void setParamA(String paramA) {
+        this.paramA = paramA == null ? null : paramA.trim();
+    }
+
+    public String getParamB() {
+        return paramB;
+    }
+
+    public void setParamB(String paramB) {
+        this.paramB = paramB == null ? null : paramB.trim();
+    }
+
+    public String getParamC() {
+        return paramC;
+    }
+
+    public void setParamC(String paramC) {
+        this.paramC = paramC == null ? null : paramC.trim();
+    }
+
+    public String getParamD() {
+        return paramD;
+    }
+
+    public void setParamD(String paramD) {
+        this.paramD = paramD == null ? null : paramD.trim();
+    }
+
+    public String getParamE() {
+        return paramE;
+    }
+
+    public void setParamE(String paramE) {
+        this.paramE = paramE == null ? null : paramE.trim();
+    }
+
+    public String getParamR() {
+        return paramR;
+    }
+
+    public void setParamR(String paramR) {
+        this.paramR = paramR == null ? null : paramR.trim();
+    }
+
+    public Integer getState() {
+        return state;
+    }
+
+    public void setState(Integer state) {
+        this.state = state;
+    }
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    public Date getModifiedTime() {
+        return modifiedTime;
+    }
+
+    public void setModifiedTime(Date modifiedTime) {
+        this.modifiedTime = modifiedTime;
+    }
+}

+ 213 - 0
carbon-bank/carbon-bank-client/src/main/java/com/hcloud/microserver/facade/carbon/entity/CollectiveFarmer.java

@@ -0,0 +1,213 @@
+package com.hcloud.microserver.facade.carbon.entity;
+
+import lombok.ToString;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.Date;
+import java.util.List;
+
+@ToString
+public class CollectiveFarmer implements Serializable {
+
+    private static final long serialVersionUID = -5328351127753129451L;
+    private String guid;
+
+    private String fkPovertyAreaId;
+
+    private String collectiveCode;
+
+    private String collectiveName;
+
+    private Integer collectivePersonNum;
+
+    private String orgUnit;
+
+    private String remark;
+
+    private String collectiveImages;
+
+    private String bankName;
+
+    private String bankCardNo;
+
+    private Integer isEnable;
+
+    private Integer state;
+
+    private String createUser;
+
+    private Date createTime;
+
+    private String modifiedUser;
+
+    private Date modifiedTime;
+
+    private BigDecimal recieveMoney;
+
+    private BigDecimal actualMoney;
+
+    private String phone;
+
+    private List<FarmerInfo> farmerInfos;
+
+    public String getGuid() {
+        return guid;
+    }
+
+    public void setGuid(String guid) {
+        this.guid = guid == null ? null : guid.trim();
+    }
+
+    public String getFkPovertyAreaId() {
+        return fkPovertyAreaId;
+    }
+
+    public void setFkPovertyAreaId(String fkPovertyAreaId) {
+        this.fkPovertyAreaId = fkPovertyAreaId == null ? null : fkPovertyAreaId.trim();
+    }
+
+    public String getCollectiveCode() {
+        return collectiveCode;
+    }
+
+    public void setCollectiveCode(String collectiveCode) {
+        this.collectiveCode = collectiveCode == null ? null : collectiveCode.trim();
+    }
+
+    public String getCollectiveName() {
+        return collectiveName;
+    }
+
+    public void setCollectiveName(String collectiveName) {
+        this.collectiveName = collectiveName == null ? null : collectiveName.trim();
+    }
+
+    public Integer getCollectivePersonNum() {
+        return collectivePersonNum;
+    }
+
+    public void setCollectivePersonNum(Integer collectivePersonNum) {
+        this.collectivePersonNum = collectivePersonNum;
+    }
+
+    public String getOrgUnit() {
+        return orgUnit;
+    }
+
+    public void setOrgUnit(String orgUnit) {
+        this.orgUnit = orgUnit == null ? null : orgUnit.trim();
+    }
+
+    public String getRemark() {
+        return remark;
+    }
+
+    public void setRemark(String remark) {
+        this.remark = remark == null ? null : remark.trim();
+    }
+
+    public String getCollectiveImages() {
+        return collectiveImages;
+    }
+
+    public void setCollectiveImages(String collectiveImages) {
+        this.collectiveImages = collectiveImages == null ? null : collectiveImages.trim();
+    }
+
+    public String getBankName() {
+        return bankName;
+    }
+
+    public void setBankName(String bankName) {
+        this.bankName = bankName == null ? null : bankName.trim();
+    }
+
+    public String getBankCardNo() {
+        return bankCardNo;
+    }
+
+    public void setBankCardNo(String bankCardNo) {
+        this.bankCardNo = bankCardNo == null ? null : bankCardNo.trim();
+    }
+
+    public Integer getIsEnable() {
+        return isEnable;
+    }
+
+    public void setIsEnable(Integer isEnable) {
+        this.isEnable = isEnable;
+    }
+
+    public Integer getState() {
+        return state;
+    }
+
+    public void setState(Integer state) {
+        this.state = state;
+    }
+
+    public String getCreateUser() {
+        return createUser;
+    }
+
+    public void setCreateUser(String createUser) {
+        this.createUser = createUser == null ? null : createUser.trim();
+    }
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    public String getModifiedUser() {
+        return modifiedUser;
+    }
+
+    public void setModifiedUser(String modifiedUser) {
+        this.modifiedUser = modifiedUser == null ? null : modifiedUser.trim();
+    }
+
+    public Date getModifiedTime() {
+        return modifiedTime;
+    }
+
+    public void setModifiedTime(Date modifiedTime) {
+        this.modifiedTime = modifiedTime;
+    }
+
+    public BigDecimal getRecieveMoney() {
+        return recieveMoney;
+    }
+
+    public void setRecieveMoney(BigDecimal recieveMoney) {
+        this.recieveMoney = recieveMoney;
+    }
+
+    public BigDecimal getActualMoney() {
+        return actualMoney;
+    }
+
+    public void setActualMoney(BigDecimal actualMoney) {
+        this.actualMoney = actualMoney;
+    }
+
+    public String getPhone() {
+        return phone;
+    }
+
+    public void setPhone(String phone) {
+        this.phone = phone;
+    }
+
+    public List<FarmerInfo> getFarmerInfos() {
+        return farmerInfos;
+    }
+
+    public void setFarmerInfos(List<FarmerInfo> farmerInfos) {
+        this.farmerInfos = farmerInfos;
+    }
+}

+ 20 - 0
carbon-bank/carbon-bank-client/src/main/java/com/hcloud/microserver/facade/carbon/entity/CollectiveProductBelong.java

@@ -0,0 +1,20 @@
+package com.hcloud.microserver.facade.carbon.entity;
+
+import lombok.ToString;
+
+import java.io.Serializable;
+
+@ToString
+public class CollectiveProductBelong extends ProductBelong implements Serializable {
+
+    private static final long serialVersionUID = 4861049796598851983L;
+    private CollectiveFarmer collectiveFarmer;
+
+    public CollectiveFarmer getCollectiveFarmer() {
+        return collectiveFarmer;
+    }
+
+    public void setCollectiveFarmer(CollectiveFarmer collectiveFarmer) {
+        this.collectiveFarmer = collectiveFarmer;
+    }
+}

+ 76 - 0
carbon-bank/carbon-bank-client/src/main/java/com/hcloud/microserver/facade/carbon/entity/CustomerChannel.java

@@ -0,0 +1,76 @@
+package com.hcloud.microserver.facade.carbon.entity;
+
+/**
+ * @author xiezt
+ */
+public class CustomerChannel {
+    private String guid;
+
+    private String fkCustomerId;
+
+    private Integer channelType;
+
+    private String channelName;
+
+    private String channelKeywordOne;
+
+    private String channelKeywordTwo;
+
+    private String channelKeywordThree;
+
+    public String getGuid() {
+        return guid;
+    }
+
+    public void setGuid(String guid) {
+        this.guid = guid == null ? null : guid.trim();
+    }
+
+    public String getFkCustomerId() {
+        return fkCustomerId;
+    }
+
+    public void setFkCustomerId(String fkCustomerId) {
+        this.fkCustomerId = fkCustomerId == null ? null : fkCustomerId.trim();
+    }
+
+    public String getChannelName() {
+        return channelName;
+    }
+
+    public void setChannelName(String channelName) {
+        this.channelName = channelName == null ? null : channelName.trim();
+    }
+
+    public String getChannelKeywordOne() {
+        return channelKeywordOne;
+    }
+
+    public void setChannelKeywordOne(String channelKeywordOne) {
+        this.channelKeywordOne = channelKeywordOne == null ? null : channelKeywordOne.trim();
+    }
+
+    public String getChannelKeywordTwo() {
+        return channelKeywordTwo;
+    }
+
+    public void setChannelKeywordTwo(String channelKeywordTwo) {
+        this.channelKeywordTwo = channelKeywordTwo == null ? null : channelKeywordTwo.trim();
+    }
+
+    public String getChannelKeywordThree() {
+        return channelKeywordThree;
+    }
+
+    public void setChannelKeywordThree(String channelKeywordThree) {
+        this.channelKeywordThree = channelKeywordThree == null ? null : channelKeywordThree.trim();
+    }
+
+    public Integer getChannelType() {
+        return channelType;
+    }
+
+    public void setChannelType(Integer channelType) {
+        this.channelType = channelType;
+    }
+}

+ 134 - 0
carbon-bank/carbon-bank-client/src/main/java/com/hcloud/microserver/facade/carbon/entity/CustomerCompanyInfo.java

@@ -0,0 +1,134 @@
+package com.hcloud.microserver.facade.carbon.entity;
+
+import lombok.ToString;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * @author xiezt
+ */
+@ToString
+public class CustomerCompanyInfo implements Serializable {
+    private static final long serialVersionUID = -8242664522405565533L;
+
+    private String guid;
+
+    private String fkCustomerId;
+
+    private String companyName;
+
+    private String orgCode;
+
+    private String principals;
+
+    private String phone;
+
+    private String email;
+
+    private String companyAddress;
+
+    private String companyImages;
+
+    private Integer state;
+
+    private Date createTime;
+
+    private Date modifiedTime;
+
+    public String getGuid() {
+        return guid;
+    }
+
+    public void setGuid(String guid) {
+        this.guid = guid == null ? null : guid.trim();
+    }
+
+    public String getFkCustomerId() {
+        return fkCustomerId;
+    }
+
+    public void setFkCustomerId(String fkCustomerId) {
+        this.fkCustomerId = fkCustomerId == null ? null : fkCustomerId.trim();
+    }
+
+    public String getCompanyName() {
+        return companyName;
+    }
+
+    public void setCompanyName(String companyName) {
+        this.companyName = companyName == null ? null : companyName.trim();
+    }
+
+    public String getOrgCode() {
+        return orgCode;
+    }
+
+    public void setOrgCode(String orgCode) {
+        this.orgCode = orgCode == null ? null : orgCode.trim();
+    }
+
+    public String getPrincipals() {
+        return principals;
+    }
+
+    public void setPrincipals(String principals) {
+        this.principals = principals == null ? null : principals.trim();
+    }
+
+    public String getPhone() {
+        return phone;
+    }
+
+    public void setPhone(String phone) {
+        this.phone = phone == null ? null : phone.trim();
+    }
+
+    public String getEmail() {
+        return email;
+    }
+
+    public void setEmail(String email) {
+        this.email = email == null ? null : email.trim();
+    }
+
+    public String getCompanyAddress() {
+        return companyAddress;
+    }
+
+    public void setCompanyAddress(String companyAddress) {
+        this.companyAddress = companyAddress == null ? null : companyAddress.trim();
+    }
+
+    public String getCompanyImages() {
+        return companyImages;
+    }
+
+    public void setCompanyImages(String companyImages) {
+        this.companyImages = companyImages == null ? null : companyImages.trim();
+    }
+
+    public Integer getState() {
+        return state;
+    }
+
+    public void setState(Integer state) {
+        this.state = state;
+    }
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    public Date getModifiedTime() {
+        return modifiedTime;
+    }
+
+    public void setModifiedTime(Date modifiedTime) {
+        this.modifiedTime = modifiedTime;
+    }
+}

+ 0 - 0
carbon-bank/carbon-bank-client/src/main/java/com/hcloud/microserver/facade/carbon/entity/CustomerInfo.java


Some files were not shown because too many files changed in this diff