15810770710@163.com 3 سال پیش
والد
کامیت
416aefd775
21فایلهای تغییر یافته به همراه2653 افزوده شده و 0 حذف شده
  1. 209 0
      pom.xml
  2. 41 0
      src/main/java/info/aspirecn/rdc/iov/sjjh/servicenode/supplier/Application.java
  3. 398 0
      src/main/java/info/aspirecn/rdc/iov/sjjh/servicenode/supplier/action/WycChannelActionImpl.java
  4. 32 0
      src/main/java/info/aspirecn/rdc/iov/sjjh/servicenode/supplier/config/SwaggerConfig.java
  5. 20 0
      src/main/java/info/aspirecn/rdc/iov/sjjh/servicenode/supplier/constant/ChannelConstant.java
  6. 77 0
      src/main/java/info/aspirecn/rdc/iov/sjjh/servicenode/supplier/service/WycChannelService.java
  7. 1126 0
      src/main/java/info/aspirecn/rdc/iov/sjjh/servicenode/supplier/service/impl/WycChannelServiceImpl.java
  8. 107 0
      src/main/java/info/aspirecn/rdc/iov/sjjh/servicenode/supplier/utils/DESedeUtil.java
  9. 36 0
      src/main/java/info/aspirecn/rdc/iov/sjjh/servicenode/supplier/utils/SupplierProperties.java
  10. 38 0
      src/main/java/info/aspirecn/rdc/iov/sjjh/servicenode/supplier/vo/DecodeThreeElementRequestObject.java
  11. 32 0
      src/main/java/info/aspirecn/rdc/iov/sjjh/servicenode/supplier/vo/OnlineDriverHailingRequestObject.java
  12. 22 0
      src/main/java/info/aspirecn/rdc/iov/sjjh/servicenode/supplier/vo/VehicleInfoQueryRequestObject.java
  13. 26 0
      src/main/java/info/aspirecn/rdc/iov/sjjh/servicenode/supplier/vo/WycInfoRequestObject.java
  14. 21 0
      src/main/java/info/aspirecn/rdc/iov/sjjh/servicenode/supplier/vo/WycInfoResponseObject.java
  15. 97 0
      src/main/resources/config/application-hwtest.yml
  16. 88 0
      src/main/resources/config/application-test.yml
  17. 3 0
      src/main/resources/config/banner.txt
  18. 31 0
      src/main/resources/config/bootstrap.yml
  19. 110 0
      src/main/resources/config/iov-sjjh-servicenode-supplier-10000036-hwtest.yml
  20. 102 0
      src/main/resources/config/iov-sjjh-servicenode-supplier-10000036-onlineJar.yml
  21. 37 0
      src/main/resources/config/logback-spring.xml

+ 209 - 0
pom.xml

@@ -0,0 +1,209 @@
+<?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>org.springframework.boot</groupId>
+        <artifactId>spring-boot-starter-parent</artifactId>
+        <version>2.2.2.RELEASE</version>
+        <relativePath/> <!-- lookup parent from repository -->
+    </parent>
+
+    <groupId>info.aspirecn.iov.sjjh</groupId>
+    <artifactId>iov-sjjh-servicenode-supplier-10000036</artifactId>
+    <version>1.1.6</version>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-data-redis</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-web</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.cloud</groupId>
+            <artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>com.squareup.okhttp3</groupId>
+            <artifactId>okhttp</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-commons-lang</artifactId>
+            <version>1.0.0</version>
+        </dependency>
+
+
+
+        <dependency>
+            <groupId>io.springfox</groupId>
+            <artifactId>springfox-swagger2</artifactId>
+            <version>2.9.2</version>
+        </dependency>
+
+        <dependency>
+            <groupId>io.springfox</groupId>
+            <artifactId>springfox-swagger-ui</artifactId>
+            <version>2.9.2</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.springframework.cloud</groupId>
+            <artifactId>spring-cloud-config-client</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>info.aspirecn.iov.sjjh</groupId>
+            <artifactId>iov-sjjh-servicenode-sms-interface</artifactId>
+            <version>1.0.0</version>
+        </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>Hoxton.RELEASE</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>-->
+            <!--                    </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>-->
+
+            <!--            <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.springframework.boot</groupId>
+                <artifactId>spring-boot-maven-plugin</artifactId>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-resources-plugin</artifactId>
+            </plugin>
+            <plugin>
+                <groupId>com.spotify</groupId>
+                <artifactId>docker-maven-plugin</artifactId>
+            </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>
+                            </resources>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+
+
+        </plugins>
+    </build>
+
+</project>

+ 41 - 0
src/main/java/info/aspirecn/rdc/iov/sjjh/servicenode/supplier/Application.java

@@ -0,0 +1,41 @@
+package info.aspirecn.rdc.iov.sjjh.servicenode.supplier;
+
+import info.aspirecn.rdc.aspirecloud.node.except.annotations.EnableAspireCloudRdcHandleExcept;
+import lombok.extern.slf4j.Slf4j;
+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.scheduling.annotation.EnableScheduling;
+import org.springframework.util.StopWatch;
+
+
+/**
+ * @author chenqingiqng
+ * @Description
+ */
+
+@SpringBootApplication
+@EnableAspireCloudRdcHandleExcept
+@EnableFeignClients(basePackages = {"info.aspirecn.iov.sjjh.service.sms"})
+
+@Slf4j
+@EnableEurekaClient
+@ComponentScan("info.aspirecn.rdc.aspirecloud.node.except")
+@ComponentScan("info.aspirecn.rdc.aspirecloud.node.brave")
+@EnableScheduling
+public class Application {
+
+    public static void main(String[] args) {
+        StopWatch watch = new StopWatch();
+        watch.start();
+        ApplicationContext context = SpringApplication.run(Application.class, args);
+        Environment environment = context.getBean(Environment.class);
+        String applicationName = environment.getProperty("spring.application.name");
+        watch.stop();
+        log.info("{} 启动完毕, times={}s", applicationName, watch.getTotalTimeSeconds());
+    }
+}

+ 398 - 0
src/main/java/info/aspirecn/rdc/iov/sjjh/servicenode/supplier/action/WycChannelActionImpl.java

@@ -0,0 +1,398 @@
+package info.aspirecn.rdc.iov.sjjh.servicenode.supplier.action;
+
+import info.aspirecn.iov.sjjh.commons.lang.ChannelTypeHandleResponseObject;
+import info.aspirecn.iov.sjjh.commons.lang.Constant;
+import info.aspirecn.rdc.aspirecloud.node.except.utils.ErrorUtils;
+
+import info.aspirecn.rdc.iov.sjjh.servicenode.supplier.constant.ChannelConstant;
+import info.aspirecn.rdc.iov.sjjh.servicenode.supplier.service.WycChannelService;
+import info.aspirecn.rdc.iov.sjjh.servicenode.supplier.utils.SupplierProperties;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.tomcat.util.ExceptionUtils;
+import org.apache.tomcat.util.codec.binary.Base64;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+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.UnsupportedEncodingException;
+
+
+/**
+ * @author chenqingqing
+ * @Description 网约车接口
+ */
+
+@Slf4j
+@RestController
+public class WycChannelActionImpl {
+
+    @Autowired
+    WycChannelService wycChannelService;
+
+    @Autowired
+    SupplierProperties property;
+
+    @ApiOperation(value = "网约车信息查询", notes = "")
+    @PostMapping(value = "/wycDriverInfo.do")
+    public ChannelTypeHandleResponseObject twoParamIdCard(
+            @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) {
+
+        log.info("网约车信息查询请求--->channelId:{}--->outTime:{},--->customBody:{}",channelId,outTime,customBody);
+        //日志记录通道类型 - 同步
+        ServletRequestAttributes servletRequestAttributes = (ServletRequestAttributes)RequestContextHolder.getRequestAttributes();
+        HttpServletRequest request = servletRequestAttributes.getRequest();
+        request.setAttribute(Constant.CHANNEL_TYPE_KEY,Constant.CHANNEL_TYPE_SYNC);
+        request.setAttribute(Constant.ACCESSLOG_MG_ISCHARGE_KEY,Constant.IS_NOT_CHARGE);
+        request.setAttribute(Constant.ACCESSLOG_MG_RESPONSE_CODE_KEY,Constant.CHANNEL_LOG_ERROR_CODE);
+        request.setAttribute(Constant.LOG_UPSTREAM_RESPONSE_CODE, Constant.LOG_UPSTREAM_DEFAULT_RESPONSE_CODE);
+        String channel_price = request.getHeader(Constant.CHANNEL_PRICE);
+        String channel_second_price = request.getHeader(Constant.CHANNEL_SECOND_PRICE);
+        log.info("channel_price:{},channel_second_price:{}",channel_price,channel_second_price);
+        request.setAttribute(Constant.CHANNEL_PRICE,request.getHeader(Constant.CHANNEL_PRICE));
+        ChannelTypeHandleResponseObject responseObject = new ChannelTypeHandleResponseObject();
+        try{
+         responseObject = wycChannelService.WycInfoRequest(
+        		request, channelId,outTime,customBody);
+        //日志记录通道响应码
+        if(responseObject.getCode() != 1){
+            request.setAttribute(Constant.ACCESSLOG_MG_RESPONSE_CODE_KEY,Constant.CHANNEL_LOG_ERROR_CODE);
+        }else{
+            log.info("ifJk:{}",request.getHeader(Constant.CUSTOMER_RETURN_TYPE_PARA));
+        	 if(Constant.CUSTOMER_RETURN_JK.equals(request.getHeader(Constant.CUSTOMER_RETURN_TYPE_PARA))){
+
+             	String code = property.getCode().get(responseObject.getResultCode());
+             	log.info("resultCode:{},jkCode:{}",responseObject.getResultCode(),code);
+             	if(code!=null){
+             		responseObject.setResultCode(Integer.valueOf(code));
+             	}
+             }
+            request.setAttribute(Constant.ACCESSLOG_MG_RESPONSE_CODE_KEY,Constant.CHANNEL_LOG_SUCCESS_CODE);
+        }
+        //日志记录通道查询参数
+        if(customBody != null){
+            try {
+                request.setAttribute(Constant.CHANNEL_LOG_QUERY,Base64.encodeBase64String(customBody.getBytes("utf-8")));
+            } catch (UnsupportedEncodingException e) {
+                ExceptionUtils.handleThrowable(e);
+                log.error("异常信息:{}",e);
+            }
+        }
+
+        request.setAttribute(Constant.ACCESSLOG_MG_ISCHARGE_KEY,responseObject.getIsCharge());
+
+        return responseObject;
+       }catch(Exception ex){
+    	   ErrorUtils.captureException(ex);
+    	   log.error("message:{}",ex);
+    	   return responseObject;
+       }
+    }
+    @ApiOperation(value = "网约车从业人员查询-定制接口")
+    @PostMapping(value = "/onlineCarHailingQuery.do")
+    public ChannelTypeHandleResponseObject onlineCarHailingQuery(
+            @ApiParam(value = "通道ID") @RequestHeader(name = "channelId") String channelId,
+            @ApiParam(value = "超时时间,单位:毫秒", example = "10000") @RequestParam(name = "outTime") int outTime,
+            @ApiParam(value = "请求参数JSON串") @RequestParam(name = "customBody") String customBody) {
+        HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes())
+                .getRequest();
+        request.setAttribute(Constant.CHANNEL_TYPE_KEY,Constant.CHANNEL_TYPE_SYNC);
+        request.setAttribute(Constant.ACCESSLOG_MG_ISCHARGE_KEY,Constant.IS_NOT_CHARGE);
+        request.setAttribute(Constant.ACCESSLOG_MG_RESPONSE_CODE_KEY,Constant.CHANNEL_LOG_ERROR_CODE);
+        request.setAttribute(Constant.LOG_UPSTREAM_RESPONSE_CODE, Constant.LOG_UPSTREAM_DEFAULT_RESPONSE_CODE);
+        request.setAttribute(Constant.CHANNEL_PRICE,request.getHeader(Constant.CHANNEL_PRICE));
+        //调用service
+        ChannelTypeHandleResponseObject responseObject = wycChannelService.onlineCarHailingQuery(request, outTime, customBody);
+
+        //把接口参数、调用结果和是否收费放入访问日志中
+        if (responseObject.getCode() != Constant.SUCCESS) {
+            request.setAttribute(Constant.ACCESSLOG_MG_RESPONSE_CODE_KEY, Constant.CHANNEL_LOG_ERROR_CODE);
+        } else {
+            request.setAttribute(Constant.ACCESSLOG_MG_RESPONSE_CODE_KEY, Constant.CHANNEL_LOG_SUCCESS_CODE);
+        }
+
+        try {
+            request.setAttribute(Constant.CHANNEL_LOG_QUERY, Base64.encodeBase64String(customBody.getBytes(ChannelConstant.PARA_ENCODE)));
+        } catch (UnsupportedEncodingException e) {
+            ErrorUtils.captureException(e);
+        }
+
+        request.setAttribute(Constant.ACCESSLOG_MG_ISCHARGE_KEY,responseObject.getIsCharge());
+
+        return responseObject;
+    }
+
+    @ApiOperation(value = "网约车从业人员查询-定制接口-入参加密")
+    @PostMapping(value = "/encryptOnlineCarHailingQuery.do")
+    public ChannelTypeHandleResponseObject encryptOnlineCarHailingQuery(
+            @ApiParam(value = "通道ID") @RequestHeader(name = "channelId") String channelId,
+            @ApiParam(value = "超时时间,单位:毫秒", example = "10000") @RequestParam(name = "outTime") int outTime,
+            @ApiParam(value = "请求参数JSON串") @RequestParam(name = "customBody") String customBody) {
+        HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes())
+                .getRequest();
+        request.setAttribute(Constant.CHANNEL_TYPE_KEY,Constant.CHANNEL_TYPE_SYNC);
+        request.setAttribute(Constant.ACCESSLOG_MG_ISCHARGE_KEY,Constant.IS_NOT_CHARGE);
+        request.setAttribute(Constant.ACCESSLOG_MG_RESPONSE_CODE_KEY,Constant.CHANNEL_LOG_ERROR_CODE);
+        request.setAttribute(Constant.LOG_UPSTREAM_RESPONSE_CODE, Constant.LOG_UPSTREAM_DEFAULT_RESPONSE_CODE);
+        request.setAttribute(Constant.CHANNEL_PRICE,request.getHeader(Constant.CHANNEL_PRICE));
+        //调用service
+        ChannelTypeHandleResponseObject responseObject = wycChannelService.encryptOnlineCarHailingQuery(request, outTime, customBody);
+
+        //把接口参数、调用结果和是否收费放入访问日志中
+        if (responseObject.getCode() != Constant.SUCCESS) {
+            request.setAttribute(Constant.ACCESSLOG_MG_RESPONSE_CODE_KEY, Constant.CHANNEL_LOG_ERROR_CODE);
+        } else {
+            request.setAttribute(Constant.ACCESSLOG_MG_RESPONSE_CODE_KEY, Constant.CHANNEL_LOG_SUCCESS_CODE);
+        }
+
+        try {
+            request.setAttribute(Constant.CHANNEL_LOG_QUERY, Base64.encodeBase64String(customBody.getBytes(ChannelConstant.PARA_ENCODE)));
+        } catch (UnsupportedEncodingException e) {
+            ErrorUtils.captureException(e);
+        }
+
+        request.setAttribute(Constant.ACCESSLOG_MG_ISCHARGE_KEY,responseObject.getIsCharge());
+
+        return responseObject;
+    }
+
+    @ApiOperation(value = "网约车信息查询-拼接三传木身份证解密", notes = "")
+    @PostMapping(value = "/wycDriverInfoDecode.do")
+    public ChannelTypeHandleResponseObject wycDriverInfoDecode(
+            @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) {
+
+        log.info("网约车信息查询请求--->channelId:{}--->outTime:{},--->customBody:{}",channelId,outTime,customBody);
+        //日志记录通道类型 - 同步
+        ServletRequestAttributes servletRequestAttributes = (ServletRequestAttributes)RequestContextHolder.getRequestAttributes();
+        HttpServletRequest request = servletRequestAttributes.getRequest();
+        request.setAttribute(Constant.CHANNEL_TYPE_KEY,Constant.CHANNEL_TYPE_SYNC);
+        request.setAttribute(Constant.ACCESSLOG_MG_ISCHARGE_KEY,Constant.IS_NOT_CHARGE);
+        request.setAttribute(Constant.ACCESSLOG_MG_RESPONSE_CODE_KEY,Constant.CHANNEL_LOG_ERROR_CODE);
+        request.setAttribute(Constant.LOG_UPSTREAM_RESPONSE_CODE, Constant.LOG_UPSTREAM_DEFAULT_RESPONSE_CODE);
+        String channel_price = request.getHeader(Constant.CHANNEL_PRICE);
+        String channel_second_price = request.getHeader(Constant.CHANNEL_SECOND_PRICE);
+        log.info("channel_price:{},channel_second_price:{}",channel_price,channel_second_price);
+        request.setAttribute(Constant.CHANNEL_PRICE,request.getHeader(Constant.CHANNEL_PRICE));
+        ChannelTypeHandleResponseObject responseObject = new ChannelTypeHandleResponseObject();
+        try{
+            responseObject = wycChannelService.WycInfoDecodeRequest(
+                    request, channelId,outTime,customBody, "MD5");
+            //日志记录通道响应码
+            if(responseObject.getCode() != 1){
+                request.setAttribute(Constant.ACCESSLOG_MG_RESPONSE_CODE_KEY,Constant.CHANNEL_LOG_ERROR_CODE);
+            }else{
+                log.info("ifJk:{}",request.getHeader(Constant.CUSTOMER_RETURN_TYPE_PARA));
+                if(Constant.CUSTOMER_RETURN_JK.equals(request.getHeader(Constant.CUSTOMER_RETURN_TYPE_PARA))){
+
+                    String code = property.getCode().get(responseObject.getResultCode());
+                    log.info("resultCode:{},jkCode:{}",responseObject.getResultCode(),code);
+                    if(code!=null){
+                        responseObject.setResultCode(Integer.valueOf(code));
+                    }
+                }
+                request.setAttribute(Constant.ACCESSLOG_MG_RESPONSE_CODE_KEY,Constant.CHANNEL_LOG_SUCCESS_CODE);
+            }
+            //日志记录通道查询参数
+            if(customBody != null){
+                try {
+                    request.setAttribute(Constant.CHANNEL_LOG_QUERY,Base64.encodeBase64String(customBody.getBytes("utf-8")));
+                } catch (UnsupportedEncodingException e) {
+                    ExceptionUtils.handleThrowable(e);
+                    log.error("异常信息:{}",e);
+                }
+            }
+
+            request.setAttribute(Constant.ACCESSLOG_MG_ISCHARGE_KEY,responseObject.getIsCharge());
+
+            return responseObject;
+        }catch(Exception ex){
+            ErrorUtils.captureException(ex);
+            log.error("message:{}",ex);
+            return responseObject;
+        }
+    }
+
+    @ApiOperation(value = "网约车信息查询-拼接三传木身份证解密-SHA256", notes = "")
+    @PostMapping(value = "/wycDriverInfoDecodeSHA256.do")
+    public ChannelTypeHandleResponseObject wycDriverInfoDecodeSHA256(
+            @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) {
+
+        log.info("网约车信息查询请求--->channelId:{}--->outTime:{},--->customBody:{}",channelId,outTime,customBody);
+        //日志记录通道类型 - 同步
+        ServletRequestAttributes servletRequestAttributes = (ServletRequestAttributes)RequestContextHolder.getRequestAttributes();
+        HttpServletRequest request = servletRequestAttributes.getRequest();
+        request.setAttribute(Constant.CHANNEL_TYPE_KEY,Constant.CHANNEL_TYPE_SYNC);
+        request.setAttribute(Constant.ACCESSLOG_MG_ISCHARGE_KEY,Constant.IS_NOT_CHARGE);
+        request.setAttribute(Constant.ACCESSLOG_MG_RESPONSE_CODE_KEY,Constant.CHANNEL_LOG_ERROR_CODE);
+        request.setAttribute(Constant.LOG_UPSTREAM_RESPONSE_CODE, Constant.LOG_UPSTREAM_DEFAULT_RESPONSE_CODE);
+        String channel_price = request.getHeader(Constant.CHANNEL_PRICE);
+        String channel_second_price = request.getHeader(Constant.CHANNEL_SECOND_PRICE);
+        log.info("channel_price:{},channel_second_price:{}",channel_price,channel_second_price);
+        request.setAttribute(Constant.CHANNEL_PRICE,request.getHeader(Constant.CHANNEL_PRICE));
+        ChannelTypeHandleResponseObject responseObject = new ChannelTypeHandleResponseObject();
+        try{
+            responseObject = wycChannelService.WycInfoDecodeRequest(
+                    request, channelId,outTime,customBody, "SHA256");
+            //日志记录通道响应码
+            if(responseObject.getCode() != 1){
+                request.setAttribute(Constant.ACCESSLOG_MG_RESPONSE_CODE_KEY,Constant.CHANNEL_LOG_ERROR_CODE);
+            }else{
+                log.info("ifJk:{}",request.getHeader(Constant.CUSTOMER_RETURN_TYPE_PARA));
+                if(Constant.CUSTOMER_RETURN_JK.equals(request.getHeader(Constant.CUSTOMER_RETURN_TYPE_PARA))){
+
+                    String code = property.getCode().get(responseObject.getResultCode());
+                    log.info("resultCode:{},jkCode:{}",responseObject.getResultCode(),code);
+                    if(code!=null){
+                        responseObject.setResultCode(Integer.valueOf(code));
+                    }
+                }
+                request.setAttribute(Constant.ACCESSLOG_MG_RESPONSE_CODE_KEY,Constant.CHANNEL_LOG_SUCCESS_CODE);
+            }
+            //日志记录通道查询参数
+            if(customBody != null){
+                try {
+                    request.setAttribute(Constant.CHANNEL_LOG_QUERY,Base64.encodeBase64String(customBody.getBytes("utf-8")));
+                } catch (UnsupportedEncodingException e) {
+                    ExceptionUtils.handleThrowable(e);
+                    log.error("异常信息:{}",e);
+                }
+            }
+
+            request.setAttribute(Constant.ACCESSLOG_MG_ISCHARGE_KEY,responseObject.getIsCharge());
+
+            return responseObject;
+        }catch(Exception ex){
+            ErrorUtils.captureException(ex);
+            log.error("message:{}",ex);
+            return responseObject;
+        }
+    }
+
+    @ApiOperation(value = "从业车辆画像查询", notes = "")
+    @PostMapping(value = "/vehicleInfoQuery.do")
+    public ChannelTypeHandleResponseObject vehicleInfoQuery(
+            @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) {
+
+        log.info("从业车辆画像查询--->channelId:{}--->outTime:{},--->customBody:{}",channelId,outTime,customBody);
+        //日志记录通道类型 - 同步
+        ServletRequestAttributes servletRequestAttributes = (ServletRequestAttributes)RequestContextHolder.getRequestAttributes();
+        HttpServletRequest request = servletRequestAttributes.getRequest();
+        request.setAttribute(Constant.CHANNEL_TYPE_KEY,Constant.CHANNEL_TYPE_SYNC);
+        request.setAttribute(Constant.ACCESSLOG_MG_ISCHARGE_KEY,Constant.IS_NOT_CHARGE);
+        request.setAttribute(Constant.ACCESSLOG_MG_RESPONSE_CODE_KEY,Constant.CHANNEL_LOG_ERROR_CODE);
+        request.setAttribute(Constant.LOG_UPSTREAM_RESPONSE_CODE, Constant.LOG_UPSTREAM_DEFAULT_RESPONSE_CODE);
+        String channel_price = request.getHeader(Constant.CHANNEL_PRICE);
+        String channel_second_price = request.getHeader(Constant.CHANNEL_SECOND_PRICE);
+        log.info("channel_price:{},channel_second_price:{}",channel_price,channel_second_price);
+        request.setAttribute(Constant.CHANNEL_PRICE,request.getHeader(Constant.CHANNEL_PRICE));
+        ChannelTypeHandleResponseObject responseObject = new ChannelTypeHandleResponseObject();
+        try{
+            responseObject = wycChannelService.vehicleInfoQuery(
+                    request, channelId,outTime,customBody);
+            //日志记录通道响应码
+            if(responseObject.getCode() != 1){
+                request.setAttribute(Constant.ACCESSLOG_MG_RESPONSE_CODE_KEY,Constant.CHANNEL_LOG_ERROR_CODE);
+            }else{
+                log.info("ifJk:{}",request.getHeader(Constant.CUSTOMER_RETURN_TYPE_PARA));
+                if(Constant.CUSTOMER_RETURN_JK.equals(request.getHeader(Constant.CUSTOMER_RETURN_TYPE_PARA))){
+
+                    String code = property.getCode().get(responseObject.getResultCode());
+                    log.info("resultCode:{},jkCode:{}",responseObject.getResultCode(),code);
+                    if(code!=null){
+                        responseObject.setResultCode(Integer.valueOf(code));
+                    }
+                }
+                request.setAttribute(Constant.ACCESSLOG_MG_RESPONSE_CODE_KEY,Constant.CHANNEL_LOG_SUCCESS_CODE);
+            }
+            //日志记录通道查询参数
+            if(customBody != null){
+                try {
+                    request.setAttribute(Constant.CHANNEL_LOG_QUERY,Base64.encodeBase64String(customBody.getBytes("utf-8")));
+                } catch (UnsupportedEncodingException e) {
+                    ExceptionUtils.handleThrowable(e);
+                    log.error("异常信息:{}",e);
+                }
+            }
+
+            request.setAttribute(Constant.ACCESSLOG_MG_ISCHARGE_KEY,responseObject.getIsCharge());
+
+            return responseObject;
+        }catch(Exception ex){
+            ErrorUtils.captureException(ex);
+            log.error("message:{}",ex);
+            return responseObject;
+        }
+    }
+
+    @ApiOperation(value = "网约车信息查询-拼接三传木身份证解密V2", notes = "")
+    @PostMapping(value = "/wycDriverInfoDecodeV2.do")
+    public ChannelTypeHandleResponseObject wycDriverInfoDecodeV2(
+            @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) {
+
+        log.info("网约车信息查询请求--->channelId:{}--->outTime:{},--->customBody:{}",channelId,outTime,customBody);
+        //日志记录通道类型 - 同步
+        ServletRequestAttributes servletRequestAttributes = (ServletRequestAttributes)RequestContextHolder.getRequestAttributes();
+        HttpServletRequest request = servletRequestAttributes.getRequest();
+        request.setAttribute(Constant.CHANNEL_TYPE_KEY,Constant.CHANNEL_TYPE_SYNC);
+        request.setAttribute(Constant.ACCESSLOG_MG_ISCHARGE_KEY,Constant.IS_NOT_CHARGE);
+        request.setAttribute(Constant.ACCESSLOG_MG_RESPONSE_CODE_KEY,Constant.CHANNEL_LOG_ERROR_CODE);
+        request.setAttribute(Constant.LOG_UPSTREAM_RESPONSE_CODE, Constant.LOG_UPSTREAM_DEFAULT_RESPONSE_CODE);
+        String channel_price = request.getHeader(Constant.CHANNEL_PRICE);
+        String channel_second_price = request.getHeader(Constant.CHANNEL_SECOND_PRICE);
+        log.info("channel_price:{},channel_second_price:{}",channel_price,channel_second_price);
+        request.setAttribute(Constant.CHANNEL_PRICE,request.getHeader(Constant.CHANNEL_PRICE));
+        ChannelTypeHandleResponseObject responseObject = new ChannelTypeHandleResponseObject();
+        try{
+            responseObject = wycChannelService.WycInfoDecodeRequestV2(
+                    request, channelId,outTime,customBody, "MD5");
+            //日志记录通道响应码
+            if(responseObject.getCode() != 1){
+                request.setAttribute(Constant.ACCESSLOG_MG_RESPONSE_CODE_KEY,Constant.CHANNEL_LOG_ERROR_CODE);
+            }else{
+                log.info("ifJk:{}",request.getHeader(Constant.CUSTOMER_RETURN_TYPE_PARA));
+                if(Constant.CUSTOMER_RETURN_JK.equals(request.getHeader(Constant.CUSTOMER_RETURN_TYPE_PARA))){
+
+                    String code = property.getCode().get(responseObject.getResultCode());
+                    log.info("resultCode:{},jkCode:{}",responseObject.getResultCode(),code);
+                    if(code!=null){
+                        responseObject.setResultCode(Integer.valueOf(code));
+                    }
+                }
+                request.setAttribute(Constant.ACCESSLOG_MG_RESPONSE_CODE_KEY,Constant.CHANNEL_LOG_SUCCESS_CODE);
+            }
+            //日志记录通道查询参数
+            if(customBody != null){
+                try {
+                    request.setAttribute(Constant.CHANNEL_LOG_QUERY,Base64.encodeBase64String(customBody.getBytes("utf-8")));
+                } catch (UnsupportedEncodingException e) {
+                    ExceptionUtils.handleThrowable(e);
+                    log.error("异常信息:{}",e);
+                }
+            }
+
+            request.setAttribute(Constant.ACCESSLOG_MG_ISCHARGE_KEY,responseObject.getIsCharge());
+
+            return responseObject;
+        }catch(Exception ex){
+            ErrorUtils.captureException(ex);
+            log.error("message:{}",ex);
+            return responseObject;
+        }
+    }
+}

+ 32 - 0
src/main/java/info/aspirecn/rdc/iov/sjjh/servicenode/supplier/config/SwaggerConfig.java

@@ -0,0 +1,32 @@
+package info.aspirecn.rdc.iov.sjjh.servicenode.supplier.config;
+
+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 chenqingqing
+ * @Description
+ */
+@Configuration
+@EnableSwagger2
+public class SwaggerConfig {
+
+    @Bean
+    public Docket createRestApi() {
+
+        return new Docket(DocumentationType.SWAGGER_2).enable(true).apiInfo(apiInfo()).select()
+                .apis(RequestHandlerSelectors.basePackage("info.aspirecn.rdc.iov.sjjh.servicenode.supplier.action"))
+                .paths(PathSelectors.any()).build();
+    }
+
+    private ApiInfo apiInfo() {
+        return new ApiInfoBuilder().title("网约车-通道API").description("").termsOfServiceUrl("").version("1.0.0").build();
+    }
+}

+ 20 - 0
src/main/java/info/aspirecn/rdc/iov/sjjh/servicenode/supplier/constant/ChannelConstant.java

@@ -0,0 +1,20 @@
+package info.aspirecn.rdc.iov.sjjh.servicenode.supplier.constant;
+
+/**
+ * @description:
+ * @author: xusonglin
+ * @create: 2020/2/5 16:24
+ * @version: V1.0
+ **/
+public class ChannelConstant {
+    // 网约车从业人员-定制接口-月份
+    public static final String[] MONTH_ARRAY = {"1", "3", "6", "12"};
+    // 查询成功,查无结果
+    public static final String NO_RESULT = "查询成功,查无结果";
+    // 日志参数中的错误参数名
+    public static final String LOG_ERROR_PARA = "respnoseCode";
+    // 日志参数中的是否收费
+    public static final String LOG_FEE_PARA = "isCharge";
+    // UTF-8
+    public static final String PARA_ENCODE = "UTF-8";
+}

+ 77 - 0
src/main/java/info/aspirecn/rdc/iov/sjjh/servicenode/supplier/service/WycChannelService.java

@@ -0,0 +1,77 @@
+package info.aspirecn.rdc.iov.sjjh.servicenode.supplier.service;
+
+import info.aspirecn.iov.sjjh.commons.lang.ChannelTypeHandleResponseObject;
+
+
+import javax.servlet.http.HttpServletRequest;
+
+/**
+ * @author chenqingqing
+ * @Description
+ */
+
+public interface WycChannelService {
+
+    /**
+     * 网约车信息查询-白天源
+     * @param request
+     * @param channelId
+     * @param outTime
+     * @param customBody
+     * @return
+     */
+	ChannelTypeHandleResponseObject WycInfoRequest(
+            HttpServletRequest request, String channelId, Integer outTime, String customBody);
+	/**
+	 * 网约车接口定制需求--入参增加查询月份
+	 * @param request
+	 * @param outTime
+	 * @param customBody
+	 * @return
+	 */
+	ChannelTypeHandleResponseObject onlineCarHailingQuery(
+            HttpServletRequest request, Integer outTime, String customBody);
+
+	/**
+	 * 网约车接口定制需求--入参增加查询月份--入参加密版
+	 * @param request
+	 * @param outTime
+	 * @param customBody
+	 * @return
+	 */
+	ChannelTypeHandleResponseObject encryptOnlineCarHailingQuery(
+            HttpServletRequest request, Integer outTime, String customBody);
+
+	/**
+	 * 网约车信息查询-拼接三传木解密-身份证号解密
+	 * @param request
+	 * @param channelId
+	 * @param outTime
+	 * @param customBody
+	 * @return
+	 */
+	ChannelTypeHandleResponseObject WycInfoDecodeRequest(
+            HttpServletRequest request, String channelId, Integer outTime, String customBody, String encryptType);
+
+	/**
+	 * 从业车辆画像查询
+	 * @param request
+	 * @param channelId
+	 * @param outTime
+	 * @param customBody
+	 * @return
+	 */
+	ChannelTypeHandleResponseObject vehicleInfoQuery(
+			HttpServletRequest request, String channelId, Integer outTime, String customBody);
+
+	/**
+	 * 网约车信息查询-拼接三传木解密-身份证号姓名解密
+	 * @param request
+	 * @param channelId
+	 * @param outTime
+	 * @param customBody
+	 * @return
+	 */
+	ChannelTypeHandleResponseObject WycInfoDecodeRequestV2(
+			HttpServletRequest request, String channelId, Integer outTime, String customBody, String encryptType);
+}

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 1126 - 0
src/main/java/info/aspirecn/rdc/iov/sjjh/servicenode/supplier/service/impl/WycChannelServiceImpl.java


+ 107 - 0
src/main/java/info/aspirecn/rdc/iov/sjjh/servicenode/supplier/utils/DESedeUtil.java

@@ -0,0 +1,107 @@
+package info.aspirecn.rdc.iov.sjjh.servicenode.supplier.utils;
+
+import lombok.extern.slf4j.Slf4j;
+
+import javax.crypto.Cipher;
+import javax.crypto.SecretKey;
+import javax.crypto.spec.SecretKeySpec;
+import java.io.UnsupportedEncodingException;
+
+@Slf4j
+public class DESedeUtil {
+    //定义加密算法,有DES、DESede(即3DES)、Blowfish
+    private static final String Algorithm = "DESede";
+
+    /**
+     * 加密方法
+     *
+     * @param src 源数据的字节数组
+     * @return
+     */
+    public static String encryptMode(String src, String key) {
+        try {
+            log.info("开始加密");
+            SecretKey deskey = new SecretKeySpec(build3DesKey(key), Algorithm);    //生成密钥
+            Cipher c1 = Cipher.getInstance(Algorithm);    //实例化负责加密/解密的Cipher工具类
+            c1.init(Cipher.ENCRYPT_MODE, deskey);    //初始化为加密模式
+            return byteToHexString(c1.doFinal(src.getBytes()));
+
+        } catch (Exception e) {
+            log.error("加密失败:src={},key={}", src,key,e);
+        }
+        return "";
+    }
+
+
+
+    /**
+     * 解密函数
+     *
+     * @param src 密文的字节数组
+     * @return
+     */
+    public static String decryptMode(String src, String key) {
+        String result="";
+        try {
+            log.info("开始解密");
+            byte[] srcArray = hexStringToBytes(src);
+            SecretKey deskey = new SecretKeySpec(build3DesKey(key), Algorithm);
+            Cipher c1 = Cipher.getInstance(Algorithm);
+            c1.init(Cipher.DECRYPT_MODE, deskey); //初始化为解密模式
+            result= new String(c1.doFinal(srcArray));
+        } catch (Exception e) {
+            log.error("解密失败:src={},key={}", src,key,e);
+        }
+        return result;
+    }
+
+    public static String byteToHexString(byte[] b) {
+        String a = "";
+
+        for(int i = 0; i < b.length; ++i) {
+            String hex = Integer.toHexString(b[i] & 255);
+            if(hex.length() == 1) {
+                hex = '0' + hex;
+            }
+
+            a = a + hex;
+        }
+
+        return a;
+    }
+
+    public static byte[] build3DesKey(String keyStr) throws UnsupportedEncodingException {
+        byte[] key = new byte[24];    //声明一个24位的字节数组,默认里面都是0
+        byte[] temp = keyStr.getBytes("UTF-8");    //将字符串转成字节数组
+        if (key.length > temp.length) {
+            //如果temp不够24位,则拷贝temp数组整个长度的内容到key数组中
+            System.arraycopy(temp, 0, key, 0, temp.length);
+        } else {
+            //如果temp大于24位,则拷贝temp数组24个长度的内容到key数组中
+            System.arraycopy(temp, 0, key, 0, key.length);
+        }
+        return key;
+    }
+
+    public static byte[] hexStringToBytes(String hexString) {
+        if (hexString != null && !hexString.equals("")) {
+            hexString = hexString.toUpperCase();
+            int length = hexString.length() / 2;
+            char[] hexChars = hexString.toCharArray();
+            byte[] d = new byte[length];
+
+            for (int i = 0; i < length; ++i) {
+                int pos = i * 2;
+                d[i] = (byte) (charToByte(hexChars[pos]) << 4 | charToByte(hexChars[pos + 1]));
+            }
+            return d;
+        } else {
+            return null;
+        }
+    }
+
+    static byte charToByte(char c) {
+        return (byte) "0123456789ABCDEF".indexOf(c);
+    }
+
+}

+ 36 - 0
src/main/java/info/aspirecn/rdc/iov/sjjh/servicenode/supplier/utils/SupplierProperties.java

@@ -0,0 +1,36 @@
+package info.aspirecn.rdc.iov.sjjh.servicenode.supplier.utils;
+
+import lombok.Data;
+
+import java.util.Map;
+
+import org.springframework.boot.context.properties.ConfigurationProperties;
+import org.springframework.stereotype.Component;
+
+/**
+ * @author chenqinqing
+ * @Description
+ */
+
+@Data
+@Component
+@ConfigurationProperties(prefix ="supplier")
+public class SupplierProperties {
+
+    private String url;
+
+    private String sleepTime;
+
+    private Map<Integer,String> code;
+
+    private String company_id;
+
+    private long interval;
+
+    private boolean sign;
+
+    private String decryptKey;
+    
+    private int flag;
+
+}

+ 38 - 0
src/main/java/info/aspirecn/rdc/iov/sjjh/servicenode/supplier/vo/DecodeThreeElementRequestObject.java

@@ -0,0 +1,38 @@
+package info.aspirecn.rdc.iov.sjjh.servicenode.supplier.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;
+    }
+}

+ 32 - 0
src/main/java/info/aspirecn/rdc/iov/sjjh/servicenode/supplier/vo/OnlineDriverHailingRequestObject.java

@@ -0,0 +1,32 @@
+package info.aspirecn.rdc.iov.sjjh.servicenode.supplier.vo;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.ToString;
+
+import javax.validation.constraints.NotNull;
+import java.io.Serializable;
+
+/**
+ * @description:
+ * @author: xusonglin
+ * @create: 2020/2/5 15:51
+ * @version: V1.0
+ **/
+@Data
+@ToString
+public class OnlineDriverHailingRequestObject implements Serializable {
+    private static final long serialVersionUID = -5828807945356392963L;
+
+    @ApiModelProperty(name = "司机姓名", required = true)
+    @NotNull
+    private String name;
+
+    @ApiModelProperty(name = "身份证", required = true)
+    @NotNull
+    private String idCode;
+
+    @ApiModelProperty(name = "月份", required = true)
+    @NotNull
+    private String month;
+}

+ 22 - 0
src/main/java/info/aspirecn/rdc/iov/sjjh/servicenode/supplier/vo/VehicleInfoQueryRequestObject.java

@@ -0,0 +1,22 @@
+package info.aspirecn.rdc.iov.sjjh.servicenode.supplier.vo;
+
+import lombok.Data;
+import lombok.ToString;
+
+import javax.validation.constraints.NotNull;
+import java.io.Serializable;
+
+/**
+ * @description:
+ * @author: xusonglin
+ * @create: 2020/10/19 14:32
+ * @version: V1.0
+ **/
+@Data
+@ToString
+public class VehicleInfoQueryRequestObject implements Serializable {
+    private static final long serialVersionUID = -4647203384196833437L;
+
+    @NotNull(message = "参数名错误")
+    private String plateNum;
+}

+ 26 - 0
src/main/java/info/aspirecn/rdc/iov/sjjh/servicenode/supplier/vo/WycInfoRequestObject.java

@@ -0,0 +1,26 @@
+package info.aspirecn.rdc.iov.sjjh.servicenode.supplier.vo;
+
+import com.alibaba.fastjson.annotation.JSONField;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * @author chenqingqing
+ * @Description
+ */
+
+@ApiModel(value = "网约车请求对象")
+@Data
+public class WycInfoRequestObject implements  Serializable {
+
+    private static final long serialVersionUID = -7900160580741323168L;
+    @ApiModelProperty(name = "司机姓名", required = true)
+    private String name;
+    @ApiModelProperty(name = "身份证", required = true)
+    private String idCode;
+
+}

+ 21 - 0
src/main/java/info/aspirecn/rdc/iov/sjjh/servicenode/supplier/vo/WycInfoResponseObject.java

@@ -0,0 +1,21 @@
+package info.aspirecn.rdc.iov.sjjh.servicenode.supplier.vo;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * @author chenqingqing
+ * @Description
+ */
+
+@Data
+public class WycInfoResponseObject implements Serializable {
+    private int code;
+
+    private String message;
+
+    private int state;
+
+
+}

+ 97 - 0
src/main/resources/config/application-hwtest.yml

@@ -0,0 +1,97 @@
+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":"-","X-Forwarded-For":"-","X-User-IP":"%{X-Real-IP}i","traceId":"%{x-b3-traceid}i","id":"%{x-b3-spanid}r",
+                  "parentId":"%{x-b3-parentspanid}i","ApplicationName":"${spring.application.name}","MG-IsCharge":%{x-isCharge}r,"MG-Upstream-ResponseCode":"%{upResponseCode}r","MG-ChannelId":%{channelId}i,
+                  "MG-ResponseCode":%{x-responseCode}r,"MG-CustomBody":"%{x-requestQuery}r","MG-SellingPrice":%{price}r,"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:
+  sleuth:
+    sampler:
+      probability: 0.1
+    web:
+      additional-skip-pattern: /api/v2/spans
+  zipkin:
+    base-url: http://127.0.0.1:${server.port}
+  mvc:
+    favicon:
+      enabled: false
+  cloud:
+    config:
+      overrideSystemProperties: true
+      allowOverride: true
+      overrideNone: true
+  redis:
+    database: 0
+    host: 10.8.18.171
+    port: 6379
+    jedis:
+      pool:
+        max-active: 8
+        max-wait: -1
+        max-idle: 8
+        min-idle: 0
+
+#management
+management:
+  endpoints:
+    enabled-by-default: true
+    web:
+      exposure:
+        include: '*'
+  endpoint:
+    health:
+      show-details: always
+    shutdown:
+      enabled: true
+
+
+
+#logging
+logging:
+  path: /apps/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.ip-address}:${server.port}:${spring.application.name}
+    metadata-map:
+      management:
+        server:
+          port: ${management.server.port}
+    health-check-url: http://${spring.cloud.client.ip-address}:${management.server.port}${eureka.instance.health-check-url-path}
+    health-check-url-path: /actuator/health
+  client:
+    serviceUrl:
+      defaultZone: http://localhost:8888/eureka
+
+supplier:
+  url: http://172.17.11.31:9097/driver_figure
+  sleepTime: 0
+  code: {1: 1000,3: 9901,4: 1099,8: 9909}
+  company_id: jkxy772134
+  interval: 1500000
+  decryptKey: JK568FG2823
+  vehicleFigureUrl: http://172.17.11.31:9097/vehicle_figure
+swagger:
+  show: true

+ 88 - 0
src/main/resources/config/application-test.yml

@@ -0,0 +1,88 @@
+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:
+  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: /apps/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:
+        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://localhost:8888/eureka
+
+#custom
+supplier:
+  url: http://172.17.11.31:9097/driver_figure
+  sleepTime: 0
+  code: {1: 1000,3: 9901,4: 1099,8: 9909}
+  company_id: jkxy772134
+  interval: 1500000
+  decryptKey: JK568FG2823
+  decode:
+    api: CMCC_3RD_DECRYPT
+    url: http://jkxy.h11.site/gateway?api=credit.sec.data
+    appKey: JIAO_KE
+    appSecret: D78C393359BF128715C65D91C67051478A4DFC13
+  vehicleFigureUrl: http://172.17.11.31:9097/vehicle_figure
+swagger:
+  show: true

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

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

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

@@ -0,0 +1,31 @@
+spring:
+  application:
+    name: '@project.artifactId@'
+  banner:
+    location: classpath:config/banner.txt
+  profiles:
+    active: test
+  cloud:
+    config:
+      discovery:
+        enabled: false
+      uri: http://10.8.18.157:32533
+      label: trunk
+      name: ${spring.application.name}
+      profile: ${spring.profiles.active}
+
+server:
+  port: 20161
+management:
+  server:
+    port: 21262
+
+info:
+  name: '@project.description@'
+  version: '@project.version@'
+
+
+logging:
+  path: /apps/var/jakarta/logs
+  file:
+    name: ${logging.path}/catalina_${spring.cloud.client.hostname}_${spring.application.name}_${server.port}.out

+ 110 - 0
src/main/resources/config/iov-sjjh-servicenode-supplier-10000036-hwtest.yml

@@ -0,0 +1,110 @@
+
+
+
+
+
+
+
+
+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":"-","X-Forwarded-For":"-","X-User-IP":"%{X-Real-IP}i","traceId":"%{x-b3-traceid}i","id":"%{x-b3-spanid}r",
+                  "parentId":"%{x-b3-parentspanid}i","ApplicationName":"${spring.application.name}","MG-IsCharge":%{x-isCharge}r,"MG-Upstream-ResponseCode":"%{upResponseCode}r","MG-ChannelId":%{channelId}i,
+                  "MG-ResponseCode":%{x-responseCode}r,"MG-CustomBody":"%{x-requestQuery}r","MG-SellingPrice":%{price}r,"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:
+  sleuth:
+    sampler:
+      probability: 0.1
+    web:
+      additional-skip-pattern: /api/v2/spans
+  zipkin:
+    base-url: http://127.0.0.1:${server.port}
+  mvc:
+    favicon:
+      enabled: false
+  cloud:
+    config:
+      overrideSystemProperties: true
+      allowOverride: true
+      overrideNone: true
+  redis:
+    database: 0
+    host: 10.8.18.171
+    port: 6379
+    jedis:
+      pool:
+        max-active: 8
+        max-wait: -1
+        max-idle: 8
+        min-idle: 0
+
+#management
+management:
+  endpoints:
+    enabled-by-default: true
+    web:
+      exposure:
+        include: '*'
+  endpoint:
+    health:
+      show-details: always
+    shutdown:
+      enabled: true
+
+
+
+#logging
+logging:
+  path: /apps/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.ip-address}:${server.port}:${spring.application.name}
+    metadata-map:
+      management:
+        server:
+          port: ${management.server.port}
+    health-check-url: http://${spring.cloud.client.ip-address}:${management.server.port}${eureka.instance.health-check-url-path}
+    health-check-url-path: /actuator/health
+  client:
+    serviceUrl:
+      defaultZone: http://10.8.18.172:31102/eureka
+
+supplier:
+  url: http://172.17.11.31:9097/driver_figure
+  sleepTime: 0
+  code: {1: 1000,3: 9901,4: 1099}
+  company_id: jkxy772134
+  interval: 1500000
+  decryptKey: JK568FG2823
+  decode:
+    api: CMCC_3RD_DECRYPT
+    url: http://jkxy.h11.site/gateway?api=credit.sec.data
+    appKey: JIAO_KE
+    appSecret: D78C393359BF128715C65D91C67051478A4DFC13
+
+swagger:
+  show: true

+ 102 - 0
src/main/resources/config/iov-sjjh-servicenode-supplier-10000036-onlineJar.yml

@@ -0,0 +1,102 @@
+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":"-","X-Forwarded-For":"-","X-User-IP":"%{X-Real-IP}i","traceId":"%{x-b3-traceid}i","id":"%{x-b3-spanid}r",
+                  "parentId":"%{x-b3-parentspanid}i","ApplicationName":"${spring.application.name}","MG-IsCharge":%{x-isCharge}r,"MG-Upstream-ResponseCode":"%{upResponseCode}r","MG-ChannelId":%{channelId}i,
+                  "MG-ResponseCode":%{x-responseCode}r,"MG-CustomBody":"%{x-requestQuery}r","MG-SellingPrice":%{price}r,"req_type":"%{req_type}r","MG-ProductId":%{productId}i,"MG-UserId":%{userid}i}'
+      prefix: access_${HOSTNAME}_${spring.application.name}_${server.port}
+      directory: ${logging.file.path}
+  servlet:
+    context-path: /
+
+spring:
+  sleuth:
+    sampler:
+      probability: 0.1
+    web:
+      additional-skip-pattern: /api/v2/spans
+  zipkin:
+    base-url: http://127.0.0.1:${server.port}
+  mvc:
+    favicon:
+      enabled: false
+  cloud:
+    config:
+      overrideSystemProperties: true
+      allowOverride: true
+      overrideNone: true
+  redis:
+    host: 192.168.1.25
+    port: 6379
+    jedis:
+      pool:
+        max-active: 8
+        max-wait: -1
+        max-idle: 8
+        min-idle: 0
+
+#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
+  file:
+    name: ${logging.file.path}/catalina_${spring.cloud.client.hostname}_${spring.application.name}_${server.port}.out
+    path: /data/var/jakarta/logs
+  level:
+    root: INFO
+    red:
+      microcloud: DEBUG
+  config: classpath:config/logback-spring.xml
+#error logging
+#sleuth logging
+rdc:
+  logging:
+    error-file: ${logging.file.path}/error_${spring.cloud.client.hostname}_${spring.application.name}_${server.port}.log
+    sleuth-file: ${logging.file.path}/sleuth_${spring.cloud.client.hostname}_${spring.application.name}_${server.port}.log
+
+#eureka
+eureka:
+  instance:
+    prefer-ip-address: true
+    instance-id: ${spring.cloud.client.ip-address}:${server.port}:${spring.application.name}
+    metadata-map:
+      management:
+        server:
+          port: ${management.server.port}
+    health-check-url: http://${spring.cloud.client.ip-address}:${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
+
+supplier:
+  flag: 0
+  url: http://192.168.16.30:9097/driver_figure
+  sleepTime: 0
+  code: {1: 1000,3: 9901,4: 1099}
+  company_id: jkxy772134
+  sign: true
+  interval: 60000
+  decryptKey: JK568FG2823
+  decode:
+    api: CMCC_3RD_DECRYPT
+    url: http://jkxy.h11.site/gateway?api=credit.sec.data
+    appKey: JIAO_KE
+    appSecret: D78C393359BF128715C65D91C67051478A4DFC13

+ 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-10000030" />
+	<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>