소스 검색

first commit

15810770710@163.com 3 년 전
부모
커밋
694e60e5c4
23개의 변경된 파일4007개의 추가작업 그리고 0개의 파일을 삭제
  1. 222 0
      pom.xml
  2. 7 0
      src/main/docker/Dockerfile
  3. 44 0
      src/main/java/info/aspirecn/iov/sjjh/shupplier10000005/App.java
  4. 55 0
      src/main/java/info/aspirecn/iov/sjjh/shupplier10000005/SjjhConstant.java
  5. 37 0
      src/main/java/info/aspirecn/iov/sjjh/shupplier10000005/SwaggerConfig.java
  6. 614 0
      src/main/java/info/aspirecn/iov/sjjh/shupplier10000005/action/Supplier10000005Action.java
  7. 140 0
      src/main/java/info/aspirecn/iov/sjjh/shupplier10000005/service/Supplier10000005Service.java
  8. 2347 0
      src/main/java/info/aspirecn/iov/sjjh/shupplier10000005/service/Supplier10000005ServiceImpl.java
  9. 38 0
      src/main/java/info/aspirecn/iov/sjjh/shupplier10000005/vo/BankRequestJsonObject.java
  10. 27 0
      src/main/java/info/aspirecn/iov/sjjh/shupplier10000005/vo/CTCCThreeElementInfoResponseObject.java
  11. 24 0
      src/main/java/info/aspirecn/iov/sjjh/shupplier10000005/vo/DecodeThreeElementJsonResolveObject.java
  12. 38 0
      src/main/java/info/aspirecn/iov/sjjh/shupplier10000005/vo/DecodeThreeElementRequestObject.java
  13. 36 0
      src/main/java/info/aspirecn/iov/sjjh/shupplier10000005/vo/RequestJsonObject.java
  14. 23 0
      src/main/java/info/aspirecn/iov/sjjh/shupplier10000005/vo/SCMBankCheckRequestObject.java
  15. 21 0
      src/main/java/info/aspirecn/iov/sjjh/shupplier10000005/vo/SCMIdCardCheckRequestObject.java
  16. 25 0
      src/main/java/info/aspirecn/iov/sjjh/shupplier10000005/vo/SCMResponseObject.java
  17. 20 0
      src/main/java/info/aspirecn/iov/sjjh/shupplier10000005/vo/ThreeElementJsonResolveObject.java
  18. 3 0
      src/main/resources/config/banner.txt
  19. 25 0
      src/main/resources/config/bootstrap.yml
  20. 108 0
      src/main/resources/config/iov-sjjh-servicenode-supplier-10000005-jkonline.yml
  21. 108 0
      src/main/resources/config/iov-sjjh-servicenode-supplier-10000005-onlineJar.yml
  22. 37 0
      src/main/resources/config/logback-spring.xml
  23. 8 0
      src/main/resources/docker/Dockerfile

+ 222 - 0
pom.xml

@@ -0,0 +1,222 @@
+<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>org.springframework.boot</groupId>
+        <artifactId>spring-boot-starter-parent</artifactId>
+        <version>2.0.6.RELEASE</version>
+        <relativePath/> <!-- lookup parent from repository -->
+    </parent>
+  <artifactId>iov-sjjh-servicenode-supplier-10000005</artifactId>
+  <version>1.2.8</version>
+
+  <name>iov-sjjh-servicenode-supplier-10000005</name>
+  <url>http://maven.apache.org</url>
+
+  <properties>
+    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+  </properties>
+
+  <dependencies>
+    <!-- 服务注册 -->
+		<dependency>
+			<groupId>org.springframework.cloud</groupId>
+		    <artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
+		</dependency>
+		
+		<dependency>
+			<groupId>org.springframework.boot</groupId>
+			<artifactId>spring-boot-starter-web</artifactId>
+		</dependency>
+
+		<dependency>
+			<groupId>org.springframework.boot</groupId>
+			<artifactId>spring-boot-devtools</artifactId>
+			<optional>true</optional>
+		</dependency>
+		<dependency>
+			<groupId>org.springframework.cloud</groupId>
+			<artifactId>spring-cloud-config-client</artifactId>
+		</dependency>
+
+      <!--链路日志-->
+      <dependency>
+          <groupId>info.aspirecn.rdc</groupId>
+          <artifactId>aspirecloud-commons-sleuthlog-starter</artifactId>
+          <version>5.0.1</version>
+      </dependency>
+
+      <!--错误日志-->
+      <dependency>
+          <groupId>info.aspirecn.rdc</groupId>
+          <artifactId>aspirecloud-commons-errorlog-starter</artifactId>
+          <version>5.0.2</version>
+      </dependency>
+		
+		<dependency>
+			<groupId>info.aspirecn.iov.sjjh</groupId>
+			<artifactId>iov-sjjh-servicenode-supplier-10000005-interface</artifactId>
+			<version>1.0.0</version>
+		</dependency>
+		<dependency>
+			<groupId>com.squareup.okhttp3</groupId>
+			<artifactId>okhttp</artifactId>
+		</dependency>
+		<dependency>
+			<groupId>commons-codec</groupId>
+			<artifactId>commons-codec</artifactId>
+		</dependency>
+		<dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>fastjson</artifactId>
+            <version>1.2.70</version>
+        </dependency>
+  </dependencies>
+    <dependencyManagement>
+        <dependencies>
+            <dependency>
+                <groupId>org.springframework.cloud</groupId>
+                <artifactId>spring-cloud-dependencies</artifactId>
+                <version>Finchley.SR2</version>
+                <type>pom</type>
+                <scope>import</scope>
+            </dependency>
+        </dependencies>
+    </dependencyManagement>
+	<build>
+		<plugins>
+            <plugin>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-maven-plugin</artifactId>
+                <configuration>
+                    <includes>
+                        <include>
+                            <groupId>info.aspirecn.iov.sjjh</groupId>
+                            <artifactId>iov-sjjh-commons-lang</artifactId>
+                        </include>
+                        <include>
+                            <groupId>info.aspirecn.iov.sjjh</groupId>
+                            <artifactId>iov-sjjh-servicenode-supplier-10000005-interface</artifactId>
+                        </include>
+                    </includes>
+                </configuration>
+            </plugin>
+
+
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-jar-plugin</artifactId>
+                <configuration>
+                    <archive>
+                        <manifest>
+                            <addClasspath>true</addClasspath>
+                            <classpathPrefix>lib/</classpathPrefix>
+                        </manifest>
+                    </archive>
+                </configuration>
+            </plugin>
+
+            <!--   拷贝依赖jar到lib,排除自定义的jar-->
+
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-dependency-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>copy-dependencies</id>
+                        <phase>prepare-package</phase>
+                        <goals>
+                            <goal>copy-dependencies</goal>
+                        </goals>
+                        <configuration>
+                            <outputDirectory>${project.build.directory}/lib</outputDirectory>
+                            <excludeGroupIds>
+                                info.aspirecn.iov.sjjh
+                            </excludeGroupIds>
+                        </configuration>
+                    </execution>
+                    <execution>
+                        <id>copy</id>
+                        <phase>install</phase>
+                        <goals>
+                            <goal>copy-dependencies</goal>
+                        </goals>
+                        <configuration>
+                            <outputDirectory>
+                                ${project.build.directory}/lib
+                            </outputDirectory>
+                            <excludeGroupIds>
+                                info.aspirecn.iov.sjjh
+                            </excludeGroupIds>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-resources-plugin</artifactId>
+				<executions>
+                    <execution>
+                        <id>default-resources</id>
+                        <phase>validate</phase>
+                        <goals>
+                            <goal>copy-resources</goal>
+                        </goals>
+                        <configuration>
+                            <outputDirectory>target/classes</outputDirectory>
+                            <useDefaultDelimiters>false</useDefaultDelimiters>
+                            <delimiters>
+                                <delimiter>@</delimiter>
+                            </delimiters>
+                            <resources>
+                                <resource>
+                                    <directory>src/main/resources/config</directory>
+                                    <targetPath>config</targetPath>
+                                    <filtering>true</filtering>
+                                    <includes>
+                                        <include>**</include>
+                                    </includes>
+                                </resource>
+                                <resource>
+                                    <directory>src/main/resources/docker</directory>
+                                    <targetPath>docker</targetPath>
+                                    <filtering>true</filtering>
+                                    <includes>
+                                        <include>**</include>
+                                    </includes>
+                                </resource>
+                            </resources>
+                        </configuration>
+                    </execution>
+                </executions>
+			</plugin>
+
+			<plugin>
+				<groupId>com.spotify</groupId>
+				<artifactId>docker-maven-plugin</artifactId>
+				<version>1.2.0</version>
+                <configuration>
+                    <!-- 设置Docker 镜像名称 -->
+                    <imageName>hub.i139.cn/iov-sjjh/${project.artifactId}:${project.version}</imageName>
+                    <!-- 设置Dockerfile存放目录地址 -->
+                    <dockerDirectory>${project.basedir}/src/main/resources/docker</dockerDirectory>
+                    <resources>
+                        <resource>
+                            <targetPath>/</targetPath>
+                            <directory>${project.build.directory}</directory>
+                            <include>${project.build.finalName}.jar</include>
+                        </resource>
+                    </resources>
+                    <!-- 设置和setting.xml中的servers对应的server,里面存放了docker hub仓库的用户名、密码 -->
+                    <serverId>docker-hub</serverId>
+                    <!-- 设置docker hub仓库地址 -->
+                    <registryUrl>https://hub.i139.cn</registryUrl>
+                    <!-- 设置docker remote API地址 -->
+                    <!--<dockerHost>http://docker-in-docker.rdc-plugin:2375</dockerHost>-->
+                </configuration>
+			</plugin>
+		</plugins>
+	</build>
+</project>

+ 7 - 0
src/main/docker/Dockerfile

@@ -0,0 +1,7 @@
+FROM hub.i139.cn/rdc/official-openjdk:8u181-jdk-alpine3.8
+VOLUME /tmp
+ADD *.jar app.jar
+RUN sh -c 'touch /app.jar'
+ENV JAVA_OPTS="-Xmx1G -Xms1G -Xss256k -Duser.timezone=Asia/Shanghai"
+ENV APP_OPTS=""
+ENTRYPOINT [ "sh", "-c", "java $JAVA_OPTS -Djava.security.egd=file:/dev/./urandom -jar /app.jar $APP_OPTS" ]

+ 44 - 0
src/main/java/info/aspirecn/iov/sjjh/shupplier10000005/App.java

@@ -0,0 +1,44 @@
+package info.aspirecn.iov.sjjh.shupplier10000005;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
+import org.springframework.cloud.openfeign.EnableFeignClients;
+import org.springframework.context.ApplicationContext;
+import org.springframework.context.annotation.ComponentScan;
+import org.springframework.core.env.Environment;
+import org.springframework.util.StopWatch;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+
+import info.aspirecn.rdc.aspirecloud.node.except.annotations.EnableAspireCloudRdcHandleExcept;
+import lombok.extern.slf4j.Slf4j;
+
+/**
+ * 
+ * @author minmin
+ *
+ */
+@SpringBootApplication
+@EnableAspireCloudRdcHandleExcept
+@Slf4j
+@EnableEurekaClient
+@EnableFeignClients(basePackages = {"info.aspirecn.iov"})
+@ComponentScan("info.aspirecn.rdc.aspirecloud.node.except")
+@ComponentScan("info.aspirecn.rdc.aspirecloud.node.brave")
+@ComponentScan("info.aspirecn.iov.sjjh.shupplier10000005")
+public class App {
+	public static void main(String[] args) throws JsonProcessingException {
+        StopWatch watch = new StopWatch();
+        watch.start();
+
+        ApplicationContext context = SpringApplication.run(App.class, args);
+        Environment environment = context.getBean(Environment.class);
+        String applicationName = environment.getProperty("spring.application.name");
+        
+        
+        watch.stop();
+        log.info("{} 启动完毕,times={}s", applicationName, watch.getTotalTimeSeconds());
+    }
+	
+}

+ 55 - 0
src/main/java/info/aspirecn/iov/sjjh/shupplier10000005/SjjhConstant.java

@@ -0,0 +1,55 @@
+package info.aspirecn.iov.sjjh.shupplier10000005;
+
+/**
+ * 返回码
+ * @author minmin
+ *
+ */
+public class SjjhConstant {
+	private SjjhConstant() {
+
+	}
+
+	/**接口查询成功返回码*/
+	public static final String INTERFACE_RETURN_SUCCESS = "200";
+	/**查询不一致,扣费*/
+    public static final int INTERFACE_QUERY_NO_IDENTICAL = 0;
+    /**查询一致,扣费*/
+    public static final int INTERFACE_QUERY_IDENTICAL = 1;
+    /**未找到,不扣费*/
+    public static final int NO_FIND = 2;
+    /**其他错误,不扣费*/
+    public static final int OTHER_ERROR = 3;
+
+    /**移动三要素1号接口*/
+    public static final int YI_DONG_ONE = 1;
+    /**移动三要素2号接口*/
+    public static final int YI_DONG_TWO = 2;
+    /**移动三要素3号接口*/
+    public static final int YI_DONG_THREE = 3;
+    /**移动三要素4号接口*/
+    public static final int YI_DONG_FOUR = 4;
+
+    /**电信三要素接口*/
+    public static final int DIAN_XIN = 0;
+    /**联通三要素接口*/
+    public static final int LIAN_TONG = 1;
+
+    /**参数错误*/
+    public static final String RESPONSE_CODE_1010 = "1010";
+    public static final String RESPONSE_CODE_1020 = "1020";
+
+    /**查询成功*/
+    public static final String RESPONSE_TEXT_SUCCESS = "查询成功";
+    /**加密方式*/
+    public static final String[] ENCRYPT_TYPE = {"MD5", "SHA256"};
+
+    /**电信三要素详版data=1*/
+    public static final String CTCC_DATA_1 = "1";
+    /**电信三要素详版data=2*/
+    public static final String CTCC_DATA_2 = "2";
+    /**电信三要素详版data=3*/
+    public static final String CTCC_DATA_3 = "3";
+    /**电信三要素详版data=4*/
+    public static final String CTCC_DATA_4 = "4";
+}

+ 37 - 0
src/main/java/info/aspirecn/iov/sjjh/shupplier10000005/SwaggerConfig.java

@@ -0,0 +1,37 @@
+package info.aspirecn.iov.sjjh.shupplier10000005;
+
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+import springfox.documentation.builders.ApiInfoBuilder;
+import springfox.documentation.builders.PathSelectors;
+import springfox.documentation.builders.RequestHandlerSelectors;
+import springfox.documentation.service.ApiInfo;
+import springfox.documentation.spi.DocumentationType;
+import springfox.documentation.spring.web.plugins.Docket;
+import springfox.documentation.swagger2.annotations.EnableSwagger2;
+
+/**
+ * 
+ * @author minmin
+ *
+ */
+@Configuration
+@EnableSwagger2
+public class SwaggerConfig {
+	@Value("${swagger.show}")
+    private boolean swaggerShow;
+
+    @Bean
+    public Docket createRestApi() {
+
+        return new Docket(DocumentationType.SWAGGER_2).enable(swaggerShow).apiInfo(apiInfo()).select()
+                .apis(RequestHandlerSelectors.basePackage("info.aspirecn.iov.sjjh.shupplier10000005.action"))
+                .paths(PathSelectors.any()).build();
+    }
+
+    private ApiInfo apiInfo() {
+        return new ApiInfoBuilder().title("服务商三传木").description("").termsOfServiceUrl("").version("1.0.0").build();
+    }
+}

+ 614 - 0
src/main/java/info/aspirecn/iov/sjjh/shupplier10000005/action/Supplier10000005Action.java

@@ -0,0 +1,614 @@
+package info.aspirecn.iov.sjjh.shupplier10000005.action;
+
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import info.aspirecn.iov.sjjh.commons.lang.ChannelTypeHandleResponseObject;
+import info.aspirecn.iov.sjjh.commons.lang.Constant;
+import info.aspirecn.iov.sjjh.shupplier10000005.SjjhConstant;
+import info.aspirecn.iov.sjjh.shupplier10000005.service.Supplier10000005Service;
+import info.aspirecn.iov.sjjh.shupplier10000005.vo.ResponseObject;
+import info.aspirecn.iov.sjjh.shupplier10000005.vo.SCMIdCardCheckRespnoseObject;
+import info.aspirecn.rdc.aspirecloud.node.except.utils.ErrorUtils;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.codec.binary.Base64;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.RequestHeader;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.context.request.RequestContextHolder;
+import org.springframework.web.context.request.ServletRequestAttributes;
+
+import javax.servlet.http.HttpServletRequest;
+import java.io.IOException;
+
+/**
+ *
+ * @author minmin
+ *
+ */
+@Slf4j
+@RestController
+public class Supplier10000005Action implements Supplier10000005ActionInterface {
+	/**UTF-8*/
+	private static final String UTF8_ENCODE = "UTF-8";
+	/**日志参数中的错误参数名*/
+	private static final String LOG_ERROR_PARA = "respnoseCode";
+	/**日志参数中的是否收费*/
+	private static final String LOG_FEE_PARA = "isCharge";
+
+	@Autowired
+	private Supplier10000005Service service;
+	@Autowired
+    private ObjectMapper objectMapper;
+
+
+	@Override
+	@ApiOperation(value = "三传木身份证检验接口", notes = "")
+    public ChannelTypeHandleResponseObject scmIdCardCheck(
+    		@ApiParam(value="通道ID")@RequestHeader(name="channelId")  String channelId,
+    		@ApiParam(value="超时时间,单位:毫秒",example = "10000")@RequestParam(name = "outTime", required = true) int outTime,
+    		@ApiParam(value="请求参数JSON串")@RequestParam(name = "customBody", required = true) String customBody) {
+		HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes())
+				.getRequest();
+		try {
+			//把请求参数放入
+    		request.setAttribute(Constant.CHANNEL_LOG_QUERY,
+    				Base64.encodeBase64String(customBody.getBytes(UTF8_ENCODE)));
+		} catch (IOException ex) {
+			ErrorUtils.captureException(ex);
+		}
+
+		ChannelTypeHandleResponseObject ret = service.scmIdCardCheck(request, customBody, outTime);
+
+    	if(ret.getCode() != Constant.SUCCESS) {
+    		request.setAttribute(LOG_ERROR_PARA, Constant.CHANNEL_LOG_ERROR_CODE);
+    	} else {
+    		request.setAttribute(LOG_ERROR_PARA, Constant.CHANNEL_LOG_SUCCESS_CODE);
+    	}
+    	request.setAttribute(LOG_FEE_PARA, ret.getIsCharge());
+    	request.setAttribute(Constant.CHANNEL_TYPE_KEY,Constant.CHANNEL_TYPE_SYNC);
+
+        return ret;
+	}
+
+	@Override
+	@ApiOperation(value = "三传木移动三要素1号检验接口", notes = "")
+    public ChannelTypeHandleResponseObject scmMobileCheck(
+    		@ApiParam(value="通道ID")@RequestHeader(name="channelId")  String channelId,
+    		@ApiParam(value="超时时间,单位:毫秒",example = "10000")@RequestParam(name = "outTime", required = true) int outTime,
+    		@ApiParam(value="请求参数JSON串")@RequestParam(name = "customBody", required = true) String customBody) {
+		HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes())
+				.getRequest();
+		try {
+			//把请求参数放入
+    		request.setAttribute(Constant.CHANNEL_LOG_QUERY,
+    				Base64.encodeBase64String(customBody.getBytes(UTF8_ENCODE)));
+		} catch (IOException ex) {
+			ErrorUtils.captureException(ex);
+		}
+
+
+		ChannelTypeHandleResponseObject ret = service.scmMobileCheck(
+				request, SjjhConstant.YI_DONG_ONE, customBody, outTime);
+
+    	if(ret.getCode() != Constant.SUCCESS) {
+    		request.setAttribute(LOG_ERROR_PARA, Constant.CHANNEL_LOG_ERROR_CODE);
+    	} else {
+    		request.setAttribute(LOG_ERROR_PARA, Constant.CHANNEL_LOG_SUCCESS_CODE);
+    	}
+    	request.setAttribute(LOG_FEE_PARA, ret.getIsCharge());
+    	request.setAttribute(Constant.CHANNEL_TYPE_KEY,Constant.CHANNEL_TYPE_SYNC);
+
+        return ret;
+	}
+
+	@Override
+	@ApiOperation(value = "三传木移动三要素2号检验接口", notes = "")
+    public ChannelTypeHandleResponseObject scmMobileTwoCheck(
+    		@ApiParam(value="通道ID")@RequestHeader(name="channelId")  String channelId,
+    		@ApiParam(value="超时时间,单位:毫秒",example = "10000")@RequestParam(name = "outTime", required = true) int outTime,
+    		@ApiParam(value="请求参数JSON串")@RequestParam(name = "customBody", required = true) String customBody) {
+		HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes())
+				.getRequest();
+		try {
+			//把请求参数放入
+    		request.setAttribute(Constant.CHANNEL_LOG_QUERY,
+    				Base64.encodeBase64String(customBody.getBytes(UTF8_ENCODE)));
+		} catch (IOException ex) {
+			ErrorUtils.captureException(ex);
+		}
+
+
+		ChannelTypeHandleResponseObject ret = service.scmMobileCheck(
+				request, SjjhConstant.YI_DONG_TWO, customBody, outTime);
+
+
+    	if(ret.getCode() != Constant.SUCCESS) {
+    		request.setAttribute(LOG_ERROR_PARA, Constant.CHANNEL_LOG_ERROR_CODE);
+    	} else {
+    		request.setAttribute(LOG_ERROR_PARA, Constant.CHANNEL_LOG_SUCCESS_CODE);
+    	}
+    	request.setAttribute(LOG_FEE_PARA, ret.getIsCharge());
+    	request.setAttribute(Constant.CHANNEL_TYPE_KEY,Constant.CHANNEL_TYPE_SYNC);
+
+        return ret;
+	}
+
+	@Override
+	@ApiOperation(value = "三传木移动三要素3号检验接口", notes = "")
+    public ChannelTypeHandleResponseObject scmMobileThreeCheck(
+    		@ApiParam(value="通道ID")@RequestHeader(name="channelId")  String channelId,
+    		@ApiParam(value="超时时间,单位:毫秒",example = "10000")@RequestParam(name = "outTime", required = true) int outTime,
+    		@ApiParam(value="请求参数JSON串")@RequestParam(name = "customBody", required = true) String customBody) {
+		HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes())
+				.getRequest();
+		try {
+			//把请求参数放入
+    		request.setAttribute(Constant.CHANNEL_LOG_QUERY,
+    				Base64.encodeBase64String(customBody.getBytes(UTF8_ENCODE)));
+		} catch (IOException ex) {
+			ErrorUtils.captureException(ex);
+		}
+
+
+		ChannelTypeHandleResponseObject ret = service.scmMobileCheck(
+				request, SjjhConstant.YI_DONG_THREE, customBody, outTime);
+
+
+    	if(ret.getCode() != Constant.SUCCESS) {
+    		request.setAttribute(LOG_ERROR_PARA, Constant.CHANNEL_LOG_ERROR_CODE);
+    	} else {
+    		request.setAttribute(LOG_ERROR_PARA, Constant.CHANNEL_LOG_SUCCESS_CODE);
+    	}
+    	request.setAttribute(LOG_FEE_PARA, ret.getIsCharge());
+    	request.setAttribute(Constant.CHANNEL_TYPE_KEY,Constant.CHANNEL_TYPE_SYNC);
+
+        return ret;
+	}
+
+	@Override
+	@ApiOperation(value = "三传木移动三要素4号检验接口", notes = "")
+    public ChannelTypeHandleResponseObject scmMobileFourCheck(
+    		@ApiParam(value="通道ID")@RequestHeader(name="channelId")  String channelId,
+    		@ApiParam(value="超时时间,单位:毫秒",example = "10000")@RequestParam(name = "outTime", required = true) int outTime,
+    		@ApiParam(value="请求参数JSON串")@RequestParam(name = "customBody", required = true) String customBody) {
+		HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes())
+				.getRequest();
+		try {
+			//把请求参数放入
+    		request.setAttribute(Constant.CHANNEL_LOG_QUERY,
+    				Base64.encodeBase64String(customBody.getBytes(UTF8_ENCODE)));
+		} catch (IOException ex) {
+			ErrorUtils.captureException(ex);
+		}
+
+
+		ChannelTypeHandleResponseObject ret = service.scmMobileCheck(
+				request, SjjhConstant.YI_DONG_FOUR, customBody, outTime);
+
+
+    	if(ret.getCode() != Constant.SUCCESS) {
+    		request.setAttribute(LOG_ERROR_PARA, Constant.CHANNEL_LOG_ERROR_CODE);
+    	} else {
+    		request.setAttribute(LOG_ERROR_PARA, Constant.CHANNEL_LOG_SUCCESS_CODE);
+    	}
+    	request.setAttribute(LOG_FEE_PARA, ret.getIsCharge());
+    	request.setAttribute(Constant.CHANNEL_TYPE_KEY,Constant.CHANNEL_TYPE_SYNC);
+
+        return ret;
+	}
+
+
+	/**
+	 * 获取上游返回码
+	 * @param ret
+	 */
+	public String setupUpstreamResponseCode(ResponseObject ret) {
+		String code = ""+Constant.LOG_UPSTREAM_DEFAULT_RESPONSE_CODE;
+		try {
+	    	String jsonStr = objectMapper.writeValueAsString(ret.getResultBody());
+	    	SCMIdCardCheckRespnoseObject responseObject = objectMapper.readValue(jsonStr,
+	    			SCMIdCardCheckRespnoseObject.class);
+
+	    	if(responseObject != null) {
+	    		code =  "" + responseObject.getCode();
+	    	}
+    	} catch (Exception ex) {
+    		ErrorUtils.captureException(ex);
+    	}
+
+		return code;
+	}
+
+	@Override
+	@ApiOperation(value = "三传木电信三要素检验接口 " , notes = "")
+	public ChannelTypeHandleResponseObject scmDianXinCheck(
+    		@RequestHeader(name="channelId")  String channelId,
+    		@RequestParam(name = "outTime", required = true) int outTime,
+    		@RequestParam(name = "customBody", required = true) String customBody) {
+		HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes())
+				.getRequest();
+		try {
+			//把请求参数放入
+    		request.setAttribute(Constant.CHANNEL_LOG_QUERY,
+    				Base64.encodeBase64String(customBody.getBytes(UTF8_ENCODE)));
+		} catch (IOException ex) {
+			ErrorUtils.captureException(ex);
+		}
+
+
+		ChannelTypeHandleResponseObject ret = service.scmDianXinOrLianTongCheck(request,
+				SjjhConstant.DIAN_XIN, customBody, outTime);
+
+
+    	if(ret.getCode() != Constant.SUCCESS) {
+    		request.setAttribute(LOG_ERROR_PARA, Constant.CHANNEL_LOG_ERROR_CODE);
+    	} else {
+    		request.setAttribute(LOG_ERROR_PARA, Constant.CHANNEL_LOG_SUCCESS_CODE);
+    	}
+    	request.setAttribute(LOG_FEE_PARA, ret.getIsCharge());
+    	request.setAttribute(Constant.CHANNEL_TYPE_KEY,Constant.CHANNEL_TYPE_SYNC);
+
+        return ret;
+
+	}
+
+	@Override
+    @ApiOperation(value = "三传木联通三要素检验接口 " , notes = "")
+	public ChannelTypeHandleResponseObject scmLianTongCheck(
+    		@RequestHeader(name="channelId")  String channelId,
+    		@RequestParam(name = "outTime", required = true) int outTime,
+    		@RequestParam(name = "customBody", required = true) String customBody) {
+    	HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes())
+				.getRequest();
+		try {
+			//把请求参数放入
+    		request.setAttribute(Constant.CHANNEL_LOG_QUERY,
+    				Base64.encodeBase64String(customBody.getBytes(UTF8_ENCODE)));
+		} catch (IOException ex) {
+			ErrorUtils.captureException(ex);
+		}
+
+
+		ChannelTypeHandleResponseObject ret = service.scmDianXinOrLianTongCheck(request,
+				SjjhConstant.LIAN_TONG, customBody, outTime);
+
+    	if(ret.getCode() != Constant.SUCCESS) {
+    		request.setAttribute(LOG_ERROR_PARA, Constant.CHANNEL_LOG_ERROR_CODE);
+    	} else {
+    		request.setAttribute(LOG_ERROR_PARA, Constant.CHANNEL_LOG_SUCCESS_CODE);
+    	}
+    	request.setAttribute(LOG_FEE_PARA, ret.getIsCharge());
+    	request.setAttribute(Constant.CHANNEL_TYPE_KEY,Constant.CHANNEL_TYPE_SYNC);
+
+        return ret;
+
+    }
+
+	@Override
+	@ApiOperation(value = "三传木移动在线时长接口 " , notes = "")
+    public ChannelTypeHandleResponseObject scmMobileOnlineTimeCheck(
+    		@RequestHeader(name="channelId")  String channelId,
+    		@RequestParam(name = "outTime", required = true) int outTime,
+    		@RequestParam(name = "customBody", required = true) String customBody) {
+		HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes())
+				.getRequest();
+		try {
+			//把请求参数放入
+    		request.setAttribute(Constant.CHANNEL_LOG_QUERY,
+    				Base64.encodeBase64String(customBody.getBytes(UTF8_ENCODE)));
+		} catch (IOException ex) {
+			ErrorUtils.captureException(ex);
+		}
+
+
+		ChannelTypeHandleResponseObject ret = service.scmMobileOnlineTimeCheck(request, customBody, outTime);
+
+    	if(ret.getCode() != Constant.SUCCESS) {
+    		request.setAttribute(LOG_ERROR_PARA, Constant.CHANNEL_LOG_ERROR_CODE);
+    	} else {
+    		request.setAttribute(LOG_ERROR_PARA, Constant.CHANNEL_LOG_SUCCESS_CODE);
+    	}
+    	request.setAttribute(LOG_FEE_PARA, ret.getIsCharge());
+    	request.setAttribute(Constant.CHANNEL_TYPE_KEY,Constant.CHANNEL_TYPE_SYNC);
+
+        return ret;
+	}
+
+	@Override
+    @ApiOperation(value = "三传木移动在线状态接口 " , notes = "")
+    public ChannelTypeHandleResponseObject scmMobileOnlineStatusCheck(
+    		@RequestHeader(name="channelId")  String channelId,
+    		@RequestParam(name = "outTime", required = true) int outTime,
+    		@RequestParam(name = "customBody", required = true) String customBody) {
+    	HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes())
+				.getRequest();
+		try {
+			//把请求参数放入
+    		request.setAttribute(Constant.CHANNEL_LOG_QUERY,
+    				Base64.encodeBase64String(customBody.getBytes(UTF8_ENCODE)));
+		} catch (IOException ex) {
+			ErrorUtils.captureException(ex);
+		}
+
+
+		ChannelTypeHandleResponseObject ret = service.scmMobileOnlineStatusCheck(request, customBody, outTime);
+
+    	if(ret.getCode() != Constant.SUCCESS) {
+    		request.setAttribute(LOG_ERROR_PARA, Constant.CHANNEL_LOG_ERROR_CODE);
+    	} else {
+    		request.setAttribute(LOG_ERROR_PARA, Constant.CHANNEL_LOG_SUCCESS_CODE);
+    	}
+    	request.setAttribute(LOG_FEE_PARA, ret.getIsCharge());
+
+    	request.setAttribute(Constant.CHANNEL_TYPE_KEY,Constant.CHANNEL_TYPE_SYNC);
+
+        return ret;
+    }
+
+	@Override
+    public ChannelTypeHandleResponseObject scmDianXinOnlineTimeCheck(
+    		@RequestHeader(name="channelId")  String channelId,
+    		@RequestParam(name = "outTime", required = true) int outTime,
+    		@RequestParam(name = "customBody", required = true) String customBody) {
+		HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes())
+				.getRequest();
+		try {
+			//把请求参数放入
+    		request.setAttribute(Constant.CHANNEL_LOG_QUERY,
+    				Base64.encodeBase64String(customBody.getBytes(UTF8_ENCODE)));
+		} catch (IOException ex) {
+			ErrorUtils.captureException(ex);
+		}
+
+
+		ChannelTypeHandleResponseObject ret = service.scmDianXinOnlineTimeCheck(request, customBody, outTime);
+
+    	if(ret.getCode() != Constant.SUCCESS) {
+    		request.setAttribute(LOG_ERROR_PARA, Constant.CHANNEL_LOG_ERROR_CODE);
+    	} else {
+    		request.setAttribute(LOG_ERROR_PARA, Constant.CHANNEL_LOG_SUCCESS_CODE);
+    	}
+    	request.setAttribute(LOG_FEE_PARA, ret.getIsCharge());
+
+
+    	request.setAttribute(Constant.CHANNEL_TYPE_KEY,Constant.CHANNEL_TYPE_SYNC);
+
+        return ret;
+
+	}
+
+    @Override
+    public ChannelTypeHandleResponseObject scmDianXinOnlineStatusCheck(
+    		@RequestHeader(name="channelId")  String channelId,
+    		@RequestParam(name = "outTime", required = true) int outTime,
+    		@RequestParam(name = "customBody", required = true) String customBody) {
+    	HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes())
+				.getRequest();
+		try {
+			//把请求参数放入
+    		request.setAttribute(Constant.CHANNEL_LOG_QUERY,
+    				Base64.encodeBase64String(customBody.getBytes(UTF8_ENCODE)));
+		} catch (IOException ex) {
+			ErrorUtils.captureException(ex);
+		}
+
+
+		ChannelTypeHandleResponseObject ret = service.scmDianXinOnlineStatusCheck(request, customBody, outTime);
+
+    	if(ret.getCode() != Constant.SUCCESS) {
+    		request.setAttribute(LOG_ERROR_PARA, Constant.CHANNEL_LOG_ERROR_CODE);
+    	} else {
+    		request.setAttribute(LOG_ERROR_PARA, Constant.CHANNEL_LOG_SUCCESS_CODE);
+    	}
+    	request.setAttribute(LOG_FEE_PARA, ret.getIsCharge());
+
+    	request.setAttribute(Constant.CHANNEL_TYPE_KEY,Constant.CHANNEL_TYPE_SYNC);
+
+        return ret;
+    }
+
+
+    @Override
+    public ChannelTypeHandleResponseObject scmLianTongOnlineTimeCheck(
+    		@RequestHeader(name="channelId")  String channelId,
+    		@RequestParam(name = "outTime", required = true) int outTime,
+    		@RequestParam(name = "customBody", required = true) String customBody) {
+    	HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes())
+				.getRequest();
+		try {
+			//把请求参数放入
+    		request.setAttribute(Constant.CHANNEL_LOG_QUERY,
+    				Base64.encodeBase64String(customBody.getBytes(UTF8_ENCODE)));
+		} catch (IOException ex) {
+			ErrorUtils.captureException(ex);
+		}
+
+
+		ChannelTypeHandleResponseObject ret = service.scmLianTongOnlineTimeCheck(request, customBody, outTime);
+
+    	if(ret.getCode() != Constant.SUCCESS) {
+    		request.setAttribute(LOG_ERROR_PARA, Constant.CHANNEL_LOG_ERROR_CODE);
+    	} else {
+    		request.setAttribute(LOG_ERROR_PARA, Constant.CHANNEL_LOG_SUCCESS_CODE);
+    	}
+    	request.setAttribute(LOG_FEE_PARA, ret.getIsCharge());
+
+    	request.setAttribute(Constant.CHANNEL_TYPE_KEY,Constant.CHANNEL_TYPE_SYNC);
+
+        return ret;
+    }
+
+    @Override
+    public ChannelTypeHandleResponseObject scmLianTongOnlineStatusCheck(
+    		@RequestHeader(name="channelId")  String channelId,
+    		@RequestParam(name = "outTime", required = true) int outTime,
+    		@RequestParam(name = "customBody", required = true) String customBody) {
+    	HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes())
+				.getRequest();
+		try {
+			//把请求参数放入
+    		request.setAttribute(Constant.CHANNEL_LOG_QUERY,
+    				Base64.encodeBase64String(customBody.getBytes(UTF8_ENCODE)));
+		} catch (IOException ex) {
+			ErrorUtils.captureException(ex);
+		}
+
+
+		ChannelTypeHandleResponseObject ret = service.scmLianTongOnlineStatusCheck(request, customBody, outTime);
+
+    	if(ret.getCode() != Constant.SUCCESS) {
+    		request.setAttribute(LOG_ERROR_PARA, Constant.CHANNEL_LOG_ERROR_CODE);
+    	} else {
+    		request.setAttribute(LOG_ERROR_PARA, Constant.CHANNEL_LOG_SUCCESS_CODE);
+    	}
+
+    	request.setAttribute(LOG_FEE_PARA, ret.getIsCharge());
+    	request.setAttribute(Constant.CHANNEL_TYPE_KEY,Constant.CHANNEL_TYPE_SYNC);
+
+        return ret;
+    }
+
+    @Override
+    public ChannelTypeHandleResponseObject scmBankThreeCheck(
+    		@RequestHeader(name="channelId")  String channelId,
+    		@RequestParam(name = "outTime", required = true) int outTime,
+    		@RequestParam(name = "customBody", required = true) String customBody) {
+    	HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes())
+				.getRequest();
+		try {
+			//把请求参数放入
+    		request.setAttribute(Constant.CHANNEL_LOG_QUERY,
+    				Base64.encodeBase64String(customBody.getBytes(UTF8_ENCODE)));
+		} catch (IOException ex) {
+			ErrorUtils.captureException(ex);
+		}
+
+
+		ChannelTypeHandleResponseObject ret = service.scmBankThreeCheck(request, customBody, outTime);
+
+    	if(ret.getCode() != Constant.SUCCESS) {
+    		request.setAttribute(LOG_ERROR_PARA, Constant.CHANNEL_LOG_ERROR_CODE);
+    	} else {
+    		request.setAttribute(LOG_ERROR_PARA, Constant.CHANNEL_LOG_SUCCESS_CODE);
+    	}
+
+    	request.setAttribute(LOG_FEE_PARA, ret.getIsCharge());
+    	request.setAttribute(Constant.CHANNEL_TYPE_KEY,Constant.CHANNEL_TYPE_SYNC);
+
+    	return ret;
+    }
+
+    @Override
+    public ChannelTypeHandleResponseObject scmBankFourCheck(
+    		@RequestHeader(name="channelId")  String channelId,
+    		@RequestParam(name = "outTime", required = true) int outTime,
+    		@RequestParam(name = "customBody", required = true) String customBody) {
+    	HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes())
+				.getRequest();
+		try {
+			//把请求参数放入
+    		request.setAttribute(Constant.CHANNEL_LOG_QUERY,
+    				Base64.encodeBase64String(customBody.getBytes(UTF8_ENCODE)));
+		} catch (IOException ex) {
+			ErrorUtils.captureException(ex);
+		}
+
+
+		ChannelTypeHandleResponseObject ret = service.scmBankFourCheck(request, customBody, outTime);
+
+    	if(ret.getCode() != Constant.SUCCESS) {
+    		request.setAttribute(LOG_ERROR_PARA, Constant.CHANNEL_LOG_ERROR_CODE);
+    	} else {
+    		request.setAttribute(LOG_ERROR_PARA, Constant.CHANNEL_LOG_SUCCESS_CODE);
+    	}
+
+    	request.setAttribute(LOG_FEE_PARA, ret.getIsCharge());
+    	request.setAttribute(Constant.CHANNEL_TYPE_KEY,Constant.CHANNEL_TYPE_SYNC);
+
+    	return ret;
+    }
+
+	@Override
+	public ChannelTypeHandleResponseObject scmDecodeThreeElement(String channelId, int outTime, String customBody) {
+		HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes())
+				.getRequest();
+
+		//调用service
+		ChannelTypeHandleResponseObject responseObject = service.scmDecodeThreeElement(request, customBody, outTime);
+
+		//把接口参数、调用结果和是否收费放入访问日志中
+		if (responseObject.getCode() != Constant.SUCCESS) {
+			request.setAttribute(LOG_ERROR_PARA, Constant.CHANNEL_LOG_ERROR_CODE);
+		} else {
+			request.setAttribute(LOG_ERROR_PARA, Constant.CHANNEL_LOG_SUCCESS_CODE);
+		}
+		request.setAttribute(LOG_FEE_PARA, responseObject.getIsCharge());
+
+		try {
+			request.setAttribute(Constant.CHANNEL_LOG_QUERY,
+					org.apache.tomcat.util.codec.binary.Base64.encodeBase64String(customBody.getBytes(UTF8_ENCODE)));
+		} catch (Exception ex) {
+			ErrorUtils.captureException(ex);
+		}
+
+		request.setAttribute(Constant.CHANNEL_TYPE_KEY, Constant.CHANNEL_TYPE_SYNC);
+		return responseObject;
+	}
+
+	@Override
+	public ChannelTypeHandleResponseObject scmCTCCThreeElementInfo(String channelId, int outTime, String customBody) {
+		HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes())
+				.getRequest();
+
+		//调用service
+		ChannelTypeHandleResponseObject responseObject = service.scmCTCCThreeElementInfo(request, customBody, outTime);
+
+		//把接口参数、调用结果和是否收费放入访问日志中
+		if (responseObject.getCode() != Constant.SUCCESS) {
+			request.setAttribute(LOG_ERROR_PARA, Constant.CHANNEL_LOG_ERROR_CODE);
+		} else {
+			request.setAttribute(LOG_ERROR_PARA, Constant.CHANNEL_LOG_SUCCESS_CODE);
+		}
+		request.setAttribute(LOG_FEE_PARA, responseObject.getIsCharge());
+
+		try {
+			request.setAttribute(Constant.CHANNEL_LOG_QUERY,
+					org.apache.tomcat.util.codec.binary.Base64.encodeBase64String(customBody.getBytes(UTF8_ENCODE)));
+		} catch (Exception ex) {
+			ErrorUtils.captureException(ex);
+		}
+
+		request.setAttribute(Constant.CHANNEL_TYPE_KEY, Constant.CHANNEL_TYPE_SYNC);
+		return responseObject;
+	}
+
+	@Override
+	public ChannelTypeHandleResponseObject scmDecodeIdCode(String channelId, int outTime, String customBody) {
+		HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes())
+				.getRequest();
+
+		//调用service
+		ChannelTypeHandleResponseObject responseObject = service.scmDecodeIdCode(request, customBody, outTime);
+
+		//把接口参数、调用结果和是否收费放入访问日志中
+		if (responseObject.getCode() != Constant.SUCCESS) {
+			request.setAttribute(LOG_ERROR_PARA, Constant.CHANNEL_LOG_ERROR_CODE);
+		} else {
+			request.setAttribute(LOG_ERROR_PARA, Constant.CHANNEL_LOG_SUCCESS_CODE);
+		}
+		request.setAttribute(LOG_FEE_PARA, responseObject.getIsCharge());
+
+		try {
+			request.setAttribute(Constant.CHANNEL_LOG_QUERY,
+					org.apache.tomcat.util.codec.binary.Base64.encodeBase64String(customBody.getBytes(UTF8_ENCODE)));
+		} catch (Exception ex) {
+			ErrorUtils.captureException(ex);
+		}
+
+		request.setAttribute(Constant.CHANNEL_TYPE_KEY, Constant.CHANNEL_TYPE_SYNC);
+		return responseObject;
+	}
+}

+ 140 - 0
src/main/java/info/aspirecn/iov/sjjh/shupplier10000005/service/Supplier10000005Service.java

@@ -0,0 +1,140 @@
+package info.aspirecn.iov.sjjh.shupplier10000005.service;
+
+import info.aspirecn.iov.sjjh.commons.lang.ChannelTypeHandleResponseObject;
+
+import javax.servlet.http.HttpServletRequest;
+
+/**
+ *
+ * @author minmin
+ *
+ */
+public interface Supplier10000005Service {
+	/**
+	 * 三传木身份证检验接口
+	 * @param request
+	 * @param customBody
+	 * @param outTime
+	 * @return
+	 */
+	public ChannelTypeHandleResponseObject scmIdCardCheck(HttpServletRequest request, String customBody, int outTime);
+
+	/**
+	 * 三传木移动三要素检验接口
+	 * @param request
+	 * @param type:1 老接口(yd1接口),2 yd2接口,3 yd3接口
+	 * @param customBody
+	 * @param outTime
+	 * @return
+	 */
+	public ChannelTypeHandleResponseObject scmMobileCheck(HttpServletRequest request, int type, String customBody, int outTime);
+
+	/**
+	 * 三传木移动在网时长接口
+	 * @param request
+	 * @param customBody
+	 * @param outTime
+	 * @return
+	 */
+	public ChannelTypeHandleResponseObject scmMobileOnlineTimeCheck(HttpServletRequest request, String customBody, int outTime);
+
+	/**
+	 * 三传木移动在网状态接口
+	 * @param request
+	 * @param customBody
+	 * @param outTime
+	 * @return
+	 */
+	public ChannelTypeHandleResponseObject scmMobileOnlineStatusCheck(HttpServletRequest request, String customBody, int outTime);
+
+
+	/**
+	 * 三传木电信、联通三要素检验接口
+	 * @param type: 0电信;1联通
+	 * @param customBody
+	 * @param outTime
+	 * @return
+	 */
+	public ChannelTypeHandleResponseObject scmDianXinOrLianTongCheck(HttpServletRequest request, int type, String customBody, int outTime);
+
+	/**
+	 * 三传木电信在网时长接口
+	 * @param request
+	 * @param customBody
+	 * @param outTime
+	 * @return
+	 */
+	public ChannelTypeHandleResponseObject scmDianXinOnlineTimeCheck(HttpServletRequest request, String customBody, int outTime);
+
+	/**
+	 * 三传木电信在网状态接口
+	 * @param request
+	 * @param customBody
+	 * @param outTime
+	 * @return
+	 */
+	public ChannelTypeHandleResponseObject scmDianXinOnlineStatusCheck(HttpServletRequest request, String customBody, int outTime);
+
+	/**
+	 * 三传木联通在网时长接口
+	 * @param request
+	 * @param customBody
+	 * @param outTime
+	 * @return
+	 */
+	public ChannelTypeHandleResponseObject scmLianTongOnlineTimeCheck(HttpServletRequest request, String customBody, int outTime);
+
+	/**
+	 * 三传木联通在网状态接口
+	 * @param request
+	 * @param customBody
+	 * @param outTime
+	 * @return
+	 */
+	public ChannelTypeHandleResponseObject scmLianTongOnlineStatusCheck(HttpServletRequest request, String customBody, int outTime);
+
+	/**
+	 * 三传木银行三要素接口
+	 * @param request
+	 * @param customBody
+	 * @param outTime
+	 * @return
+	 */
+	public ChannelTypeHandleResponseObject scmBankThreeCheck(HttpServletRequest request, String customBody, int outTime);
+
+	/**
+	 * 三传木银行四要素接口
+	 * @param request
+	 * @param customBody
+	 * @param outTime
+	 * @return
+	 */
+	public ChannelTypeHandleResponseObject scmBankFourCheck(HttpServletRequest request, String customBody, int outTime);
+
+	/**
+	 * 三传木三要素解密接口
+	 * @param request
+	 * @param customBody
+	 * @param outTime
+	 * @return
+	 */
+	ChannelTypeHandleResponseObject scmDecodeThreeElement(HttpServletRequest request, String customBody, int outTime);
+
+    /**
+     * 三传木电信三要素详版接口
+     * @param request
+     * @param customBody
+     * @param outTime
+     * @return
+     */
+	ChannelTypeHandleResponseObject scmCTCCThreeElementInfo(HttpServletRequest request, String customBody, int outTime);
+
+	/**
+	 * 三传木解密接口-定制版-入参身份证姓名只解密身份证号
+	 * @param request
+	 * @param customBody
+	 * @param outTime
+	 * @return
+	 */
+	ChannelTypeHandleResponseObject scmDecodeIdCode(HttpServletRequest request, String customBody, int outTime);
+}

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 2347 - 0
src/main/java/info/aspirecn/iov/sjjh/shupplier10000005/service/Supplier10000005ServiceImpl.java


+ 38 - 0
src/main/java/info/aspirecn/iov/sjjh/shupplier10000005/vo/BankRequestJsonObject.java

@@ -0,0 +1,38 @@
+package info.aspirecn.iov.sjjh.shupplier10000005.vo;
+
+import lombok.Data;
+import lombok.ToString;
+
+/**
+ * 三传木-身份证简项核验接口请求对象
+ * @author minmin
+ *
+ */
+@Data
+@ToString(callSuper = true, includeFieldNames = true)
+public class BankRequestJsonObject {
+	/**接口名*/
+	private String api;
+	/**appkey*/
+	private String appKey;
+	/**密钥*/
+	private String appSecret;
+	/**被查询人对象*/
+	private BankCheckRequestChildObject data;
+	
+	@Data
+	@ToString(callSuper = true, includeFieldNames = true)
+	public static class BankCheckRequestChildObject {
+		/**姓名*/
+		private String name;
+		/**身份证号*/
+		private String id_number;
+		/**手机号*/
+		private String mobile;
+		/**sign*/
+		private String sign;
+		/**银行卡号*/
+		private String bank_card_number;
+	}
+	
+}

+ 27 - 0
src/main/java/info/aspirecn/iov/sjjh/shupplier10000005/vo/CTCCThreeElementInfoResponseObject.java

@@ -0,0 +1,27 @@
+package info.aspirecn.iov.sjjh.shupplier10000005.vo;
+
+import com.alibaba.fastjson.JSONObject;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import lombok.Data;
+import lombok.ToString;
+
+/**
+ * @description:
+ * @author: xusonglin
+ * @create: 2019/10/8 17:45
+ * @version: V1.0
+ **/
+@Data
+@ToString(callSuper = true)
+public class CTCCThreeElementInfoResponseObject{
+    private String data;
+    /**接口返回码*/
+    private String code;
+    /**检验结果信息*/
+    private Object msg;
+    /**流水号*/
+    @JsonProperty(value = "requestid")
+    private String requestId;
+
+    private String provider;
+}

+ 24 - 0
src/main/java/info/aspirecn/iov/sjjh/shupplier10000005/vo/DecodeThreeElementJsonResolveObject.java

@@ -0,0 +1,24 @@
+package info.aspirecn.iov.sjjh.shupplier10000005.vo;
+
+import lombok.Data;
+import lombok.ToString;
+
+import javax.validation.constraints.NotNull;
+
+/**
+ * @description: 三传木三要素
+ * @author: xusonglin
+ * @create: 2019/9/24 15:56
+ * @version: V1.0
+ **/
+@Data
+@ToString
+public class DecodeThreeElementJsonResolveObject {
+    private String idCode;
+
+    private String name;
+
+    private String mobile;
+
+    private String encrypt;
+}

+ 38 - 0
src/main/java/info/aspirecn/iov/sjjh/shupplier10000005/vo/DecodeThreeElementRequestObject.java

@@ -0,0 +1,38 @@
+package info.aspirecn.iov.sjjh.shupplier10000005.vo;
+
+import lombok.Data;
+import lombok.ToString;
+
+/**
+ * @description:
+ * @author: xusonglin
+ * @create: 2019/9/29 15:04
+ * @version: V1.0
+ **/
+@Data
+@ToString
+public class DecodeThreeElementRequestObject{
+    /**接口名*/
+    private String api;
+    /**appkey*/
+    private String appKey;
+    /**密钥*/
+    private String appSecret;
+    /**被查询人对象*/
+    private DecodeThreeElementRequestData data;
+
+    @Data
+    @ToString(callSuper = true, includeFieldNames = true)
+    public static class DecodeThreeElementRequestData {
+        /**姓名*/
+        private String name;
+        /**身份证号*/
+        private String id_number;
+        /**手机号*/
+        private String mobile;
+        /**加密方式*/
+        private String encrypt;
+        /**sign*/
+        private String sign;
+    }
+}

+ 36 - 0
src/main/java/info/aspirecn/iov/sjjh/shupplier10000005/vo/RequestJsonObject.java

@@ -0,0 +1,36 @@
+package info.aspirecn.iov.sjjh.shupplier10000005.vo;
+
+import lombok.Data;
+import lombok.ToString;
+
+/**
+ * 三传木-身份证简项核验接口请求对象
+ * @author minmin
+ *
+ */
+@Data
+@ToString(callSuper = true, includeFieldNames = true)
+public class RequestJsonObject {
+	/**接口名*/
+	private String api;
+	/**appkey*/
+	private String appKey;
+	/**密钥*/
+	private String appSecret;
+	/**被查询人对象*/
+	private SCMIdCardCheckRequestChildObject data;
+	
+	@Data
+	@ToString(callSuper = true, includeFieldNames = true)
+	public static class SCMIdCardCheckRequestChildObject {
+		/**姓名*/
+		private String name;
+		/**身份证号*/
+		private String id_number;
+		/**手机号*/
+		private String mobile;
+		/**sign*/
+		private String sign;
+	}
+	
+}

+ 23 - 0
src/main/java/info/aspirecn/iov/sjjh/shupplier10000005/vo/SCMBankCheckRequestObject.java

@@ -0,0 +1,23 @@
+package info.aspirecn.iov.sjjh.shupplier10000005.vo;
+
+import lombok.Data;
+import lombok.ToString;
+
+/**
+ * 三传木-银行卡核验接口请求对象(银行三、四要素通用)
+ * @author minmin
+ *
+ */
+@Data
+@ToString(callSuper = true, includeFieldNames = true)
+public class SCMBankCheckRequestObject {
+	/**姓名*/
+	private String name;
+	/**身份证号*/
+	private String idCode;
+	/**手机号*/
+	private String mobile;
+	/**银行卡号*/
+	private String bankCode;
+	
+}

+ 21 - 0
src/main/java/info/aspirecn/iov/sjjh/shupplier10000005/vo/SCMIdCardCheckRequestObject.java

@@ -0,0 +1,21 @@
+package info.aspirecn.iov.sjjh.shupplier10000005.vo;
+
+import lombok.Data;
+import lombok.ToString;
+
+/**
+ * 三传木-身份证简项核验接口请求对象
+ * @author minmin
+ *
+ */
+@Data
+@ToString(callSuper = true, includeFieldNames = true)
+public class SCMIdCardCheckRequestObject {
+	/**姓名*/
+	private String name;
+	/**身份证号*/
+	private String idCode;
+	/**手机号*/
+	private String mobile;
+	
+}

+ 25 - 0
src/main/java/info/aspirecn/iov/sjjh/shupplier10000005/vo/SCMResponseObject.java

@@ -0,0 +1,25 @@
+package info.aspirecn.iov.sjjh.shupplier10000005.vo;
+
+import com.alibaba.fastjson.JSONObject;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import lombok.Data;
+import lombok.ToString;
+
+/**
+ * @description:
+ * @author: xusonglin
+ * @create: 2019/9/10 11:59
+ * @version: V1.0
+ **/
+@Data
+@ToString
+public class SCMResponseObject {
+    private String data;
+    /**接口返回码*/
+    private String code;
+    /**检验结果信息*/
+    private JSONObject msg;
+    /**流水号*/
+    @JsonProperty(value = "requestid")
+    private String requestId;
+}

+ 20 - 0
src/main/java/info/aspirecn/iov/sjjh/shupplier10000005/vo/ThreeElementJsonResolveObject.java

@@ -0,0 +1,20 @@
+package info.aspirecn.iov.sjjh.shupplier10000005.vo;
+
+import lombok.Data;
+import lombok.ToString;
+
+/**
+ * @description:
+ * @author: xusonglin
+ * @create: 2019/10/8 16:37
+ * @version: V1.0
+ **/
+@Data
+@ToString
+public class ThreeElementJsonResolveObject {
+    private String idCode;
+
+    private String name;
+
+    private String mobile;
+}

+ 3 - 0
src/main/resources/config/banner.txt

@@ -0,0 +1,3 @@
+*******************************************************************************
+	 @project.artifactId@  (version:@project.version@)
+*******************************************************************************

+ 25 - 0
src/main/resources/config/bootstrap.yml

@@ -0,0 +1,25 @@
+spring:
+  application:
+    name: '@project.artifactId@'
+  banner:
+    location: classpath:config/banner.txt
+  profiles:
+    active: test
+  cloud:
+    config:
+      discovery:
+        enabled: false
+      uri: http://192.168.80.97:32533
+      label: trunk
+      name: ${spring.application.name}
+      profile: ${spring.profiles.active}
+    
+server:
+  port: 20000
+management:
+  server:
+    port: 21000    
+    
+info:
+  name: '@project.description@'
+  version: '@project.version@'

+ 108 - 0
src/main/resources/config/iov-sjjh-servicenode-supplier-10000005-jkonline.yml

@@ -0,0 +1,108 @@
+server:
+  tomcat:
+    accesslog:
+      buffered: false
+      enabled: true
+      pattern: '{"DateTime":"%{yyyy-MM-dd''T''HH:mm:ss.SSSZZ}t","ClientIP":"%a","Method":"%m","URI":"%U","RequestProtocol":"%H","ResponseCode":%s,
+                "ResponseTime":%D,"UserAgent":"%{user-agent}i","X-Forwarded-For":"%{x-forwarded-for}r","X-User-IP":"%{X-User-IP}i","traceId":"%{x-b3-traceid}i","id":"%{x-b3-spanid}r",
+                "parentId":"%{x-b3-parentspanid}i","ApplicationName":"${spring.application.name}","MG-IsCharge":%{isCharge}r,
+                "MG-ChannelId":%{channelId}i,"MG-CustomBody":"%{x-requestQuery}r","MG-ResultBody":"%{resultBody}o",
+                "MG-ResponseCode":%{respnoseCode}r,"MG-Upstream-ResponseCode":"%{upResponseCode}r","MG-SellingPrice":%{price}i,"req_type":"%{req_type}r","MG-ProductId":%{productId}i,"MG-UserId":%{userid}i}'
+      prefix: access_${HOSTNAME}_${spring.application.name}_${server.port}
+      directory: ${logging.path}
+  servlet:
+    context-path: /
+
+spring:
+  cloud:
+    config:
+      overrideSystemProperties: true
+      allowOverride: true
+      overrideNone: true
+  sleuth:
+    sampler:
+      probability: 1
+    web:
+      additional-skip-pattern: /api/v2/spans
+  zipkin:
+    base-url: http://127.0.0.1:${server.port}
+
+  mvc:
+    favicon:
+      enabled: false
+
+#management
+management:
+  endpoints:
+    enabled-by-default: true
+    web:
+      exposure:
+        include: '*'
+  endpoint:
+    health:
+      show-details: always
+    shutdown:
+      enabled: true
+
+#logging
+logging:
+  path: /data/var/jakarta/logs
+  level:
+    root: INFO
+    red:
+      microcloud: DEBUG
+  config: classpath:config/logback-spring.xml
+  file: ${logging.path}/catalina_${spring.cloud.client.hostname}_${spring.application.name}_${server.port}.out
+
+#error logging
+#sleuth logging
+rdc:
+  logging:
+    error-file: ${logging.path}/error_${spring.cloud.client.hostname}_${spring.application.name}_${server.port}.log
+    sleuth-file: ${logging.path}/sleuth_${spring.cloud.client.hostname}_${spring.application.name}_${server.port}.log
+
+#eureka
+eureka:
+  instance:
+    prefer-ip-address: true
+    instance-id: ${spring.cloud.client.ipaddress}:${server.port}
+    metadata-map:
+      management:
+        server:
+          port: ${management.server.port}
+    health-check-url: http://${spring.cloud.client.ipaddress}:${management.server.port}${eureka.instance.health-check-url-path}
+    health-check-url-path: /actuator/health
+  client:
+    serviceUrl:
+      defaultZone: http://iov-sjjh-registcenter.iov-sjjh:8080/eureka
+
+  #info
+
+#custom
+custom:
+  url: http://jkxy.h11.site/gateway?api=credit.sec.data
+  app:
+    key: JIAO_KE
+  secret:
+    key: D78C393359BF128715C65D91C67051478A4DFC13
+  api: IDCARD_2ND_V4
+  yd1-api: CMCC_3RD_V1
+  yd2-api: CMCC_3RD_V2
+  yd3-api: CMCC_3RD_V6
+  yd4-api: CMCC_3RD_V4
+  yd-online-time: MOBILE_ONLINE_CHECK_V1
+  yd-online-status: MOBILE_STATUS_CHECK_V1
+  dianxin-api: CTCC_3RD_V2
+  dx-online-time: CTCC_ONLINE_CHECK_V1
+  dx-online-status: CTCC_STATUS_CHECK_V1
+  liantong-api: CUCC_3RD_V1
+  lt-online-time: CUCC_ONLINE_CHECK_V1
+  lt-online-status: CUCC_STATUS_CHECK_V1
+  yin-hang-three: BANK_3RD_V1
+  yin-hang-four: BANK_4TH_V1
+  sleepTime: 5000
+  decode-three-element: CMCC_3RD_DECRYPT
+  ctcc-detail: CTCC_3RD_DETAIL_V1
+  jkxyUrl: http://jkxy.h11.site/gateway?api=credit.sec.data
+swagger:
+  show: false

+ 108 - 0
src/main/resources/config/iov-sjjh-servicenode-supplier-10000005-onlineJar.yml

@@ -0,0 +1,108 @@
+server:
+  tomcat:
+    accesslog:
+      buffered: false
+      enabled: true
+      pattern: '{"DateTime":"%{yyyy-MM-dd''T''HH:mm:ss.SSSZZ}t","ClientIP":"%a","Method":"%m","URI":"%U","RequestProtocol":"%H","ResponseCode":%s,
+                "ResponseTime":%D,"UserAgent":"%{user-agent}i","X-Forwarded-For":"%{x-forwarded-for}r","X-User-IP":"%{X-User-IP}i","traceId":"%{x-b3-traceid}i","id":"%{x-b3-spanid}r",
+                "parentId":"%{x-b3-parentspanid}i","ApplicationName":"${spring.application.name}","MG-IsCharge":%{isCharge}r,
+                "MG-ChannelId":%{channelId}i,"MG-CustomBody":"%{x-requestQuery}r","MG-ResultBody":"%{resultBody}o",
+                "MG-ResponseCode":%{respnoseCode}r,"MG-Upstream-ResponseCode":"%{upResponseCode}r","MG-SellingPrice":%{price}i,"req_type":"%{req_type}r","MG-ProductId":%{productId}i,"MG-UserId":%{userid}i}'
+      prefix: access_${HOSTNAME}_${spring.application.name}_${server.port}
+      directory: ${logging.path}
+  servlet:
+    context-path: /
+
+spring:
+  cloud:
+    config:
+      overrideSystemProperties: true  
+      allowOverride: true
+      overrideNone: true
+  sleuth:
+    sampler:
+      probability: 1
+    web:
+      additional-skip-pattern: /api/v2/spans
+  zipkin:
+    base-url: http://127.0.0.1:${server.port}
+
+  mvc:
+    favicon:
+      enabled: false
+
+#management
+management:
+  endpoints:
+    enabled-by-default: true
+    web:
+      exposure:
+        include: '*'
+  endpoint:
+    health:
+      show-details: always
+    shutdown:
+      enabled: true
+
+#logging
+logging:
+  path: /data/var/jakarta/logs
+  level:
+    root: INFO
+    red:
+      microcloud: DEBUG
+  config: classpath:config/logback-spring.xml
+  file: ${logging.path}/catalina_${spring.cloud.client.hostname}_${spring.application.name}_${server.port}.out
+
+#error logging
+#sleuth logging
+rdc:
+  logging:
+    error-file: ${logging.path}/error_${spring.cloud.client.hostname}_${spring.application.name}_${server.port}.log
+    sleuth-file: ${logging.path}/sleuth_${spring.cloud.client.hostname}_${spring.application.name}_${server.port}.log
+
+#eureka
+eureka:
+  instance:
+    prefer-ip-address: true
+    instance-id: ${spring.cloud.client.ipaddress}:${server.port}
+    metadata-map:
+      management:
+        server:
+          port: ${management.server.port}
+    health-check-url: http://${spring.cloud.client.ipaddress}:${management.server.port}${eureka.instance.health-check-url-path}
+    health-check-url-path: /actuator/health
+  client:
+    serviceUrl:
+      defaultZone: http://192.168.1.32:31102/eureka;http://192.168.1.33:31102/eureka
+
+#info
+  
+#custom
+custom: 
+  url: http://jkxy.h11.site/gateway?api=credit.sec.data
+  app: 
+    key: JIAO_KE
+  secret: 
+    key: D78C393359BF128715C65D91C67051478A4DFC13
+  api: IDCARD_2ND_V4
+  yd1-api: CMCC_3RD_V1
+  yd2-api: CMCC_3RD_V2
+  yd3-api: CMCC_3RD_V6
+  yd4-api: CMCC_3RD_V4
+  yd-online-time: MOBILE_ONLINE_CHECK_V1
+  yd-online-status: MOBILE_STATUS_CHECK_V1
+  dianxin-api: CTCC_3RD_V2
+  dx-online-time: CTCC_ONLINE_CHECK_V1
+  dx-online-status: CTCC_STATUS_CHECK_V1
+  liantong-api: CUCC_3RD_V1
+  lt-online-time: CUCC_ONLINE_CHECK_V1
+  lt-online-status: CUCC_STATUS_CHECK_V1
+  yin-hang-three: BANK_3RD_V1
+  yin-hang-four: BANK_4TH_V1
+  sleepTime: 5000
+  decode-three-element: CMCC_3RD_DECRYPT
+  ctcc-detail: CTCC_3RD_DETAIL_V1
+  jkxyUrl: http://jkxy.h11.site/gateway?api=credit.sec.data
+swagger:
+  show: false 

+ 37 - 0
src/main/resources/config/logback-spring.xml

@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<configuration>
+	<include resource="org/springframework/boot/logging/logback/defaults.xml" />
+	<include
+		resource="org/springframework/boot/logging/logback/console-appender.xml" />
+
+	<property name="LOG_FILE"
+		value="${LOG_FILE:-${LOG_PATH:-${LOG_TEMP:-${java.io.tmpdir:-/tmp}}}/spring.log}" />		
+	<springProperty scope="context" name="LOG_PATH" source="logging.path" defaultValue="/apps/var/jakarta/logs" />
+	<springProperty scope="context" name="application_name" source="spring.application.name" defaultValue="iov-sjjh-servicenode-supplier-10000005" />
+	<springProperty scope="context" name="sleuth_file" source="rdc.logging.sleuth-file" defaultValue="${LOG_PATH}/sleuth/sleuth.log" />
+	<springProperty scope="context" name="error_file" source="rdc.logging.error-file" defaultValue="${LOG_PATH}/error/error.log" />
+
+	<include resource="info/aspirecn/rdc/aspirecloud/node/except/xml/defaults.xml" />
+	<include resource="info/aspirecn/rdc/aspirecloud/node/brave/xml/defaults.xml" />
+
+	<appender name="TIME_FILE"
+		class="ch.qos.logback.core.rolling.RollingFileAppender">
+		<encoder>
+			<pattern>${FILE_LOG_PATTERN}</pattern>
+		</encoder>
+		<file>${LOG_FILE}</file>
+		<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
+			<fileNamePattern>${LOG_FILE}.%d{yyyy-MM-dd}.%i</fileNamePattern>
+			<maxHistory>8</maxHistory>
+			<timeBasedFileNamingAndTriggeringPolicy
+				class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
+				<maxFileSize>100MB</maxFileSize>
+			</timeBasedFileNamingAndTriggeringPolicy>
+		</rollingPolicy>
+	</appender>
+	
+	<root level="INFO">
+		<appender-ref ref="CONSOLE" />
+		<appender-ref ref="TIME_FILE" />
+	</root>
+</configuration>

+ 8 - 0
src/main/resources/docker/Dockerfile

@@ -0,0 +1,8 @@
+FROM hub.i139.cn/rdc-commons/official-openjdk:8u191-jre-alpine3.9
+VOLUME /tmp
+COPY target/lib/ ./lib/
+ADD *.jar app.jar
+RUN sh -c 'touch /app.jar'
+ENV JAVA_OPTS="-Xmx256M -Xms256M -Xss256k -Duser.timezone=Asia/Shanghai"
+ENV APP_OPTS=""
+ENTRYPOINT [ "sh", "-c", "java $JAVA_OPTS -Djava.security.egd=file:/dev/./urandom -jar /app.jar $APP_OPTS" ]