作者 王勇

初始化代理人,进港服务

正在显示 34 个修改的文件 包含 1597 行增加0 行删除
HELP.md
target/
!.mvn/wrapper/maven-wrapper.jar
!**/src/main/**
!**/src/test/**
### STS ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache
### IntelliJ IDEA ###
.idea
*.iws
*.iml
*.ipr
### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/
build/
### VS Code ###
.vscode/
... ...
server:
port: 9012
# spring \u914D\u7F6E
spring:
application:
name: cgoasm-arrival
datasource:
type: com.alibaba.druid.pool.DruidDataSource
driver-class-name: oracle.jdbc.OracleDriver
url: jdbc:oracle:thin:@192.168.1.253:1522:ORCLL
username: CGOASM
password: vmvnv1v2
profiles:
active: dev
jackson:
default-property-inclusion: ALWAYS
time-zone: GMT+8
date-format: yyyy-MM-dd
security:
user:
name: admin
password: 123456
# \u94FE\u8DEF\u8FFD\u8E2A\u914D\u7F6E
zipkin:
base-url: http://192.168.1.63:9411
sleuth:
sampler:
probability: 1
# mybatis\u914D\u7F6E
mybatis:
mapper-locations: classpath:mapper/*.xml
type-aliases-package: com.sunyo.wlpt.cgoasm.arrival.domain
# \u65E5\u5FD7\u6253\u5370
logging:
config: config/logback-dev.xml
level:
com.sunyo.wlpt.cgoasm.arrival.mapper: debug
logback:
appname: cgoasm-arrival
logdir: ./log
#eureka client
eureka:
instance:
status-page-url: http://${eureka.instance.hostname}:${server.port}/index
prefer-ip-address: true
instance-id: ${spring.cloud.client.ip-address}:${server.port}
hostname: ${spring.cloud.client.ip-address}
metadata-map:
user:
name: "admin"
passwoed: "123456"
client:
healthcheck:
enabled: true
service-url:
defaultZone: http://192.168.1.53:12345/eureka/
feign:
hystrix:
enabled: true
client:
config:
default:
connectTimeout: 600000 # feign 的超时设置
readTimeout: 600000
# boot admin
management:
endpoints:
enabled-by-default: true
web:
exposure:
include: ["*"]
endpoint:
health:
show-details: always
shutdown:
enabled: true
... ...
<?xml version="1.0" encoding="UTF-8"?>
<!--参考文档链接:https://blog.csdn.net/qq_34912478/article/details/80877132-->
<!-- 日志级别从低到高分为TRACE < DEBUG < INFO < WARN < ERROR < FATAL,如果设置为WARN,则低于WARN的信息都不会输出 -->
<!-- scan:当此属性设置为true时,配置文件如果发生改变,将会被重新加载,默认值为true -->
<!-- scanPeriod:设置监测配置文件是否有修改的时间间隔,如果没有给出时间单位,默认单位是毫秒。当scan为true时,此属性生效。默认的时间间隔为1分钟。 -->
<!-- debug:当此属性设置为true时,将打印出logback内部日志信息,实时查看logback运行状态。默认值为false。 -->
<configuration scan="true" scanPeriod="10 seconds">
<!--<include resource="org/springframework/boot/logging/logback/base.xml" />-->
<contextName>logback</contextName>
<!-- name的值是变量的名称,value的值时变量定义的值。通过定义的值会被插入到logger上下文中。定义变量后,可以使“${}”来使用变量。 -->
<property name="log.path" value="./logs" />
<!-- 彩色日志 -->
<!-- 彩色日志依赖的渲染类 -->
<conversionRule conversionWord="clr" converterClass="org.springframework.boot.logging.logback.ColorConverter" />
<conversionRule conversionWord="wex" converterClass="org.springframework.boot.logging.logback.WhitespaceThrowableProxyConverter" />
<conversionRule conversionWord="wEx" converterClass="org.springframework.boot.logging.logback.ExtendedWhitespaceThrowableProxyConverter" />
<!-- 彩色日志格式 -->
<property name="CONSOLE_LOG_PATTERN" value="${CONSOLE_LOG_PATTERN:-%clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} %clr(${LOG_LEVEL_PATTERN:-%5p}) %clr(${PID:- }){magenta} %clr(---){faint} %clr([%15.15t]){faint} %clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}}"/>
<!--输出到控制台-->
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
<!--此日志appender是为开发使用,只配置最底级别,控制台输出的日志级别是大于或等于此级别的日志信息-->
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
<level>debug</level>
</filter>
<encoder>
<Pattern>${CONSOLE_LOG_PATTERN}</Pattern>
<!-- 设置字符集 windows系统这里设置成GBK-->
<charset>UTF-8</charset>
</encoder>
</appender>
<!--输出到文件-->
<!-- 时间滚动输出 level为 DEBUG 日志 -->
<appender name="DEBUG_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<!-- 正在记录的日志文件的路径及文件名 -->
<file>${log.path}/log_debug.log</file>
<!--日志文件输出格式-->
<encoder>
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern>
<charset>UTF-8</charset> <!-- 设置字符集 -->
</encoder>
<!-- 日志记录器的滚动策略,按日期,按大小记录 -->
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<!-- 日志归档 -->
<fileNamePattern>${log.path}/debug/log-debug-%d{yyyy-MM-dd}.%i.log</fileNamePattern>
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
<maxFileSize>100MB</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
<!--日志文件保留天数-->
<maxHistory>15</maxHistory>
</rollingPolicy>
<!-- 此日志文件只记录debug级别的 -->
<filter class="ch.qos.logback.classic.filter.LevelFilter">
<level>debug</level>
<onMatch>ACCEPT</onMatch>
<onMismatch>DENY</onMismatch>
</filter>
</appender>
<!-- 时间滚动输出 level为 INFO 日志 -->
<appender name="INFO_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<!-- 正在记录的日志文件的路径及文件名 -->
<file>${log.path}/log_info.log</file>
<!--日志文件输出格式-->
<encoder>
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern>
<charset>UTF-8</charset>
</encoder>
<!-- 日志记录器的滚动策略,按日期,按大小记录 -->
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<!-- 每天日志归档路径以及格式 -->
<fileNamePattern>${log.path}/info/log-info-%d{yyyy-MM-dd}.%i.log</fileNamePattern>
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
<maxFileSize>100MB</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
<!--日志文件保留天数-->
<maxHistory>15</maxHistory>
</rollingPolicy>
<!-- 此日志文件只记录info级别的 -->
<filter class="ch.qos.logback.classic.filter.LevelFilter">
<level>info</level>
<onMatch>ACCEPT</onMatch>
<onMismatch>DENY</onMismatch>
</filter>
</appender>
<!-- 时间滚动输出 level为 WARN 日志 -->
<appender name="WARN_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<!-- 正在记录的日志文件的路径及文件名 -->
<file>${log.path}/log_warn.log</file>
<!--日志文件输出格式-->
<encoder>
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern>
<charset>UTF-8</charset> <!-- 此处设置字符集 -->
</encoder>
<!-- 日志记录器的滚动策略,按日期,按大小记录 -->
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>${log.path}/warn/log-warn-%d{yyyy-MM-dd}.%i.log</fileNamePattern>
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
<maxFileSize>100MB</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
<!--日志文件保留天数-->
<maxHistory>15</maxHistory>
</rollingPolicy>
<!-- 此日志文件只记录warn级别的 -->
<filter class="ch.qos.logback.classic.filter.LevelFilter">
<level>warn</level>
<onMatch>ACCEPT</onMatch>
<onMismatch>DENY</onMismatch>
</filter>
</appender>
<!-- 时间滚动输出 level为 ERROR 日志 -->
<appender name="ERROR_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<!-- 正在记录的日志文件的路径及文件名 -->
<file>${log.path}/log_error.log</file>
<!--日志文件输出格式-->
<encoder>
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern>
<charset>UTF-8</charset> <!-- 此处设置字符集 -->
</encoder>
<!-- 日志记录器的滚动策略,按日期,按大小记录 -->
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>${log.path}/error/log-error-%d{yyyy-MM-dd}.%i.log</fileNamePattern>
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
<maxFileSize>100MB</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
<!--日志文件保留天数-->
<maxHistory>15</maxHistory>
</rollingPolicy>
<!-- 此日志文件只记录ERROR级别的 -->
<filter class="ch.qos.logback.classic.filter.LevelFilter">
<level>ERROR</level>
<onMatch>ACCEPT</onMatch>
<onMismatch>DENY</onMismatch>
</filter>
</appender>
<!-- 时间滚动输出 level为 trace 日志 -->
<appender name="TRACE_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<!-- 正在记录的日志文件的路径及文件名 -->
<file>${log.path}/log_trace.log</file>
<!--日志文件输出格式-->
<encoder>
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern>
<charset>UTF-8</charset> <!-- 此处设置字符集 -->
</encoder>
<!-- 日志记录器的滚动策略,按日期,按大小记录 -->
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>${log.path}/trace/log-trace-%d{yyyy-MM-dd}.%i.log</fileNamePattern>
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
<maxFileSize>100MB</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
<!--日志文件保留天数-->
<maxHistory>15</maxHistory>
</rollingPolicy>
<!-- 此日志文件只记录trace级别的 -->
<filter class="ch.qos.logback.classic.filter.LevelFilter">
<level>TRACE</level>
<onMatch>ACCEPT</onMatch>
<onMismatch>DENY</onMismatch>
</filter>
</appender>
<!--
<logger>用来设置某一个包或者具体的某一个类的日志打印级别、
以及指定<appender>。<logger>仅有一个name属性,
一个可选的level和一个可选的addtivity属性。
name:用来指定受此logger约束的某一个包或者具体的某一个类。
level:用来设置打印级别,大小写无关:TRACE, DEBUG, INFO, WARN, ERROR, ALL 和 OFF,
还有一个特俗值INHERITED或者同义词NULL,代表强制执行上级的级别。
如果未设置此属性,那么当前logger将会继承上级的级别。
addtivity:是否向上级logger传递打印信息。默认是true。
-->
<!--<logger name="org.springframework.web" level="info"/>-->
<!--<logger name="org.springframework.scheduling.annotation.ScheduledAnnotationBeanPostProcessor" level="INFO"/>-->
<!--
使用mybatis的时候,sql语句是debug下才会打印,而这里我们只配置了info,所以想要查看sql语句的话,有以下两种操作:
第一种把<root level="info">改成<root level="DEBUG">这样就会打印sql,不过这样日志那边会出现很多其他消息
第二种就是单独给dao下目录配置debug模式,代码如下,这样配置sql语句会打印,其他还是正常info级别:
-->
<!--
root节点是必选节点,用来指定最基础的日志输出级别,只有一个level属性
level:用来设置打印级别,大小写无关:TRACE, DEBUG, INFO, WARN, ERROR, ALL 和 OFF,
不能设置为INHERITED或者同义词NULL。默认是DEBUG
可以包含零个或多个元素,标识这个appender将会添加到这个logger。
-->
<!--<logger name="com.tianbo.analysis" level="trace">-->
<!--<appender-ref ref="CONSOLE" />-->
<!--<appender-ref ref="TRACE_FILE" />-->
<!--<appender-ref ref="DEBUG_FILE" />-->
<!--<appender-ref ref="INFO_FILE" />-->
<!--<appender-ref ref="WARN_FILE" />-->
<!--<appender-ref ref="ERROR_FILE" />-->
<!--</logger>-->
<!--开发环境:打印控制台-->
<springProfile name="dev">
<logger name="org.springframework" level="info"/>
<logger name="com.sunyo.wlpt.nmms.mapper" level="debug">
<appender-ref ref="CONSOLE" />
<appender-ref ref="DEBUG_FILE" />
</logger>
<logger name="org.apache.tomcat" level="info" />
<root level="info">
<appender-ref ref="CONSOLE" />
<appender-ref ref="TRACE_FILE" />
<appender-ref ref="DEBUG_FILE" />
<appender-ref ref="INFO_FILE" />
<appender-ref ref="WARN_FILE" />
<appender-ref ref="ERROR_FILE" />
</root>
</springProfile>
<!--生产环境:输出到文件-->
<springProfile name="pro">
<logger name="org.springframework" level="INFO"/>
<root level="info">
<appender-ref ref="CONSOLE" />
<appender-ref ref="DEBUG_FILE" />
<appender-ref ref="INFO_FILE" />
<appender-ref ref="ERROR_FILE" />
<appender-ref ref="WARN_FILE" />
<appender-ref ref="TRACE_FILE" />
</root>
</springProfile>
</configuration>
\ No newline at end of file
... ...
<?xml version="1.0" encoding="UTF-8"?>
<configuration scan="ture" scanPeriod="60 seconds" debug="false">
<springProperty scope="context" name="appname" source="logback.appname"/>
<springProperty scope="context" name="logdir" source="logback.logdir"/>
<!--文件名-->
<contextName>${appname}</contextName>
<!--输出到控制面板-->
<appender name="consoleLog1" class="ch.qos.logback.core.ConsoleAppender">
<!-- layout输出方式输出-->
<layout class="ch.qos.logback.classic.PatternLayout">
<pattern>%d [%thread] %-5level %logger{36} - %msg%n</pattern>
</layout>
</appender>
<!--输出到控制面板-->
<appender name="consoleLog" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%d [%thread] %-5level %logger{36} - %msg%n</pattern>
</encoder>
</appender>
<!--输出info级别日志-->
<appender name="fileInfoLog" class="ch.qos.logback.core.rolling.RollingFileAppender">
<filter class="ch.qos.logback.classic.filter.LevelFilter">
<!--过滤 Error-->
<level>ERROR</level>
<!--匹配到就禁止-->
<onMatch>DENY</onMatch>
<!--没有匹配到就允许-->
<onMismatch>ACCEPT</onMismatch>
</filter>
<!--<File>../logs</File>-->
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<FileNamePattern>${logdir}/info.${appname}.%d{yyyy-MM-dd}.log</FileNamePattern>
<maxHistory>100</maxHistory>
<totalSizeCap>100MB</totalSizeCap>
</rollingPolicy>
<encoder>
<charset>UTF-8</charset>
<pattern>%d [%thread] %-5level %logger{36} %line - %msg%n</pattern>
</encoder>
</appender>
<!--输出Error级别日志-->
<!--<appender name="fileErrorLog" class="ch.qos.logback.core.rolling.RollingFileAppender">-->
<!--<filter class="ch.qos.logback.classic.filter.LevelFilter">-->
<!--&lt;!&ndash;过滤 Error &ndash;&gt;-->
<!--<level>ERROR</level>-->
<!--</filter>-->
<!--&lt;!&ndash;<File>../logs</File>&ndash;&gt;-->
<!--<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">-->
<!--<FileNamePattern>${logdir}/error.${appname}.%d{yyyy-MM-dd}.log</FileNamePattern>-->
<!--<maxHistory>100</maxHistory>-->
<!--<totalSizeCap>100MB</totalSizeCap>-->
<!--</rollingPolicy>-->
<!--<encoder>-->
<!--<charset>UTF-8</charset>-->
<!--<pattern>%d [%thread] %-5level %logger{36} %line - %msg%n</pattern>-->
<!--</encoder>-->
<!--</appender>-->
<!--监控下列类的所有日志,定义输出级别-->
<logger name="java.sql.PreparedStatement" level="DEBUG" additivity="false">
<appender-ref ref="consoleLog"/>
</logger>    
<logger name="java.sql.Connection" level="DEBUG" additivity="false"> 
<appender-ref ref="consoleLog"/>
</logger>  
<logger name="java.sql.Statement" level="DEBUG" additivity="false">
<appender-ref ref="consoleLog"/>
</logger>    
<logger name="com.ibatis" level="DEBUG" additivity="false">
<appender-ref ref="consoleLog"/>
</logger>    
<logger name="com.ibatis.common.jdbc.SimpleDataSource" level="DEBUG" additivity="false">
<appender-ref ref="consoleLog"/>
</logger>    
<logger name="com.ibatis.common.jdbc.ScriptRunner" level="DEBUG" additivity="false">
<appender-ref ref="consoleLog"/>
</logger>    
<logger name="com.ibatis.sqlmap.engine.impl.SqlMapClientDelegate" level="DEBUG" additivity="false">
<appender-ref ref="consoleLog"/>
</logger> 
<!--输出-->
<root level="INFO">
<appender-ref ref="consoleLog"/>
<!--<appender-ref ref="consoleLog"/>-->
<appender-ref ref="fileInfoLog"/>
<!--<appender-ref ref="fileErrorLog"/>-->
</root>
</configuration>
... ...
<?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 https://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.1.7.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.sunyo</groupId>
<artifactId>cgoasm_arrival</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>cgoasm_arrival</name>
<description>提供者代理人</description>
<properties>
<java.version>1.8</java.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<spring-cloud.version>Greenwich.SR2</spring-cloud.version>
</properties>
<dependencies>
<!-- SpringBoot start -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<!-- SpringBoot end -->
<!-- Security start -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
<!-- Security end -->
<!-- SpringCloud start -->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-hystrix</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-openfeign</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-zipkin</artifactId>
</dependency>
<dependency>
<groupId>de.codecentric</groupId>
<artifactId>spring-boot-admin-starter-client</artifactId>
<version>2.2.0</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<!-- SpringCloud end -->
<!-- database start -->
<dependency>
<groupId>org.mybatis.spring.boot</groupId>
<artifactId>mybatis-spring-boot-starter</artifactId>
<version>2.1.1</version>
</dependency>
<dependency>
<groupId>com.github.pagehelper</groupId>
<artifactId>pagehelper-spring-boot-starter</artifactId>
<version>1.2.12</version>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>druid-spring-boot-starter</artifactId>
<version>1.1.9</version>
</dependency>
<!-- database end -->
<!-- tools start -->
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.17</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>io.swagger</groupId>
<artifactId>swagger-annotations</artifactId>
<version>1.5.22</version>
</dependency>
<dependency>
<groupId>io.swagger</groupId>
<artifactId>swagger-models</artifactId>
<version>1.5.22</version>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
<version>1.2.49</version>
</dependency>
<dependency>
<groupId>joda-time</groupId>
<artifactId>joda-time</artifactId>
<version>2.10.5</version>
</dependency>
<!-- tools end -->
<!-- test start -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- test end -->
</dependencies>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>${spring-cloud.version}</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>
<mainClass>com.sunyo.wlpt.cgoasm.arrival.CgoasmArrivalApplication</mainClass>
</configuration>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>spring-snapshots</id>
<name>Spring Snapshots</name>
<url>https://repo.spring.io/snapshot</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
<repository>
<id>spring-milestones</id>
<name>Spring Milestones</name>
<url>https://repo.spring.io/milestone</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
</project>
... ...
package com.sunyo.wlpt.cgoasm.arrival;
import org.mybatis.spring.annotation.MapperScan;
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.transaction.annotation.EnableTransactionManagement;
/**
* @author 子诚
*/
@SpringBootApplication
@MapperScan("com.sunyo.wlpt.cgoasm.arrival.mapper")
@EnableFeignClients
@EnableEurekaClient
@EnableTransactionManagement
public class CgoasmArrivalApplication {
public static void main(String[] args) {
SpringApplication.run(CgoasmArrivalApplication.class, args);
}
}
... ...
package com.sunyo.wlpt.cgoasm.arrival.common;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.util.Date;
/**
* @author 子诚
* Description:进港统计结果集
* 时间:2020/6/9 15:21
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class ResultArrivalData implements Serializable {
private static final long serialVersionUID = 7514297833139174998L;
/**
* 1、id
*/
private String autoId;
/**
* 2、运单号
*/
private String waybillNoMaster;
/**
* 3、航班号
*/
private String flightNo;
/**
* 4、航班日期
*/
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date flightDate;
/**
* 5、出发站
*/
private String originatingStation;
/**
* 6、目的站
*/
private String destinationStation;
/**
* 7、件数
*/
private String totalPiece;
/**
* 8、重量
*/
private String totalWeight;
/**
* 9、航段
*/
private String segment;
/**
* 10.承运人二字码
*/
private String carrier;
/**
* 11.发货人名称
*/
private String shipperName;
/**
* 12.收货人名称
*/
private String consigneeName;
/**
* 13.货物目的站
*/
private String aimStation;
/**
* 14.国家代码
*/
private String country;
/**
* 15.航班目的区域,中文描述,所属洲
*/
private String areaDescChn;
/**
* 16.订仓代理人
*/
private String orderName;
/**
* 17.结算代理人
*/
private String countName;
/**
* 代理人服务
* 18.品名
*/
private String sdCargoName;
/**
* 代理人服务
* 19.二级类名称
*/
private String twoTypeName;
/**
* 代理人服务
* 20.一级类名称
*/
private String typeName;
/**
* 21.航空公司
*/
private String airCompany;
/**
* 22.机型
*/
private String cfTp;
/**
* 23.机号
*/
private String cfNo;
/**
* 24.航班(起飞)时间
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date flightTime;
/**
* 25.航班计划日期
*/
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date flightPlanDate;
/**
* 26.航班计划时间
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date flightPlanTime;
/**
* 27.出港日期
*/
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date arrivalDate;
}
... ...
package com.sunyo.wlpt.cgoasm.arrival.config;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
/**
* @author 子诚
* Description:SpringSecurity 权限配置框架
* 时间:2020/6/8 18:42
*/
@EnableWebSecurity
@Configuration
public class SecurityConfig extends WebSecurityConfigurerAdapter {
@Override
protected void configure(HttpSecurity http) throws Exception {
http.authorizeRequests()
.antMatchers("/","/arrival/**","/cgoasm/**","/ws/**")
.permitAll()
.and()
.csrf().disable();
}
}
... ...
package com.sunyo.wlpt.cgoasm.arrival.controller;
import com.sunyo.wlpt.cgoasm.arrival.common.ResultArrivalData;
import com.sunyo.wlpt.cgoasm.arrival.domain.*;
import com.sunyo.wlpt.cgoasm.arrival.service.*;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.List;
/**
* @author 子诚
* Description:获取 代理人服务 的相关信息
* 时间:2020/5/21 14:39
*/
@CrossOrigin
@RequestMapping("cgoasm")
@RestController
public class CgoAsmController {
@Resource
private HzWaybillInfoService hzWaybillInfoService;
@Resource
private HzShipperInformationService hzShipperInformationService;
@Resource
private SdCargoNameService sdCargoNameService;
@Resource
private SdTwoTypeService sdTwoTypeService;
@Resource
private SdBigTypeService sdBigTypeService;
/**
* 根据运单号,获取,代理人服务中的相关数据
*
* @param waybillNoMaster 运单号
* @return
*/
@GetMapping("/getInfo")
public ResultArrivalData getInfo(@RequestParam(value = "waybillNoMaster", required = false) String waybillNoMaster) {
ResultArrivalData result = new ResultArrivalData();
/**
* 2.根据运单号,获取品名,二级品类,一级品类
*/
List<SdCargoName> sd = sdCargoNameService.getSdCargoName(waybillNoMaster);
if (sd != null && sd.size() > 0) {
// 品名
result.setSdCargoName(sd.get(0).getSdCargoName());
List<SdTwoType> twoType = sdTwoTypeService.getSdTwoTypeInfo(sd.get(0).getSdCargoName());
if (twoType != null && twoType.size() > 0) {
// 二级品类名称
result.setTwoTypeName(twoType.get(0).getTwoTypeName());
List<SdBigType> big = sdBigTypeService.getSdBigTypeInfo(twoType.get(0).getBigTypeId());
if (big != null && big.size() > 0) {
// 一级品类
result.setTypeName(big.get(0).getTypeName());
}
}
}
/**
* 1.根据运单号,获取货主信息表ID,最终获取:代理人名称,代理人类型
*/
List<HzWaybillInfo> hz = hzWaybillInfoService.getHzWaybillInfo(waybillNoMaster);
if (hz != null && hz.size() > 0) {
/**
* 同样运单号,货主信息表的ID不止一个,需要遍历
*/
for (int i = 0; i < hz.size(); i++) {
HzShipperInformation hzInfo = new HzShipperInformation();
hzInfo = hzShipperInformationService.getHzInfo(hz.get(i).getHzInforId());
if ("222".equals(hzInfo.getTheShipperType())) {
//订仓代理人
result.setOrderName(hzInfo.getFullName());
}
if ("333".equals(hzInfo.getTheShipperType())) {
//结算代理人
result.setCountName(hzInfo.getFullName());
}
}
}
return result;
}
}
... ...
package com.sunyo.wlpt.cgoasm.arrival.domain;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.math.BigDecimal;
/**
* @author 子诚
* Description:代理人货主信息表
* 时间:2020/5/21 12:04
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class HzShipperInformation implements Serializable {
private static final long serialVersionUID = -5945024810650089134L;
/**
* 代理人货主信息表
*/
private BigDecimal id;
/**
* 代理人三字码简称
*/
private String forShort;
/**
* 代理人全称
*/
private String fullName;
/**
* 货主类型
* 111 = 发货代理
* 222 = 订舱代理
* 333 = 操作代理/结算代理
*/
private String theShipperType;
}
... ...
package com.sunyo.wlpt.cgoasm.arrival.domain;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
/**
* @author 子诚
* Description:代理人——预配货主信息关系表
* 时间:2020/5/21 11:56
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class HzWaybillInfo implements Serializable {
private static final long serialVersionUID = 366306104328586736L;
/**
* 预配运单号
*/
private String waybillId;
/**
* 货主信息表ID
*/
private String hzInforId;
}
... ...
package com.sunyo.wlpt.cgoasm.arrival.domain;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.math.BigDecimal;
/**
* @author 子诚
* Description:代理人一级分类表
* 时间:2020/5/21 14:19
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class SdBigType implements Serializable {
private static final long serialVersionUID = 6232806925901558585L;
/**
* 所属大类ID
*/
private BigDecimal id;
/**
* 一级类名称
*/
private String typeName;
}
... ...
package com.sunyo.wlpt.cgoasm.arrival.domain;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
/**
* @author 子诚
* Description:代理人——安检品名表
* 时间:2020/5/21 14:13
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class SdCargoName implements Serializable {
private static final long serialVersionUID = 2990223703718832899L;
/**
* 运单号
*/
private String sdWaybill;
/**
* 品名
*/
private String sdCargoName;
}
... ...
package com.sunyo.wlpt.cgoasm.arrival.domain;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.math.BigDecimal;
/**
* @author 子诚
* Description:代理人——二级分类表
* 时间:2020/5/21 14:17
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class SdTwoType implements Serializable {
private static final long serialVersionUID = -2679111453569335424L;
/**
* 品名
*/
private String cargoName;
/**
* 二级类名称
*/
private String twoTypeName;
/**
* 所属大类
*/
private BigDecimal bigTypeId;
}
... ...
package com.sunyo.wlpt.cgoasm.arrival.mapper;
import com.sunyo.wlpt.cgoasm.arrival.domain.HzShipperInformation;
import org.apache.ibatis.annotations.Mapper;
/**
* @author 子诚
* Description:
* 时间:2020/5/21 12:04
*/
@Mapper
public interface HzShipperInformationMapper {
/**
* 获取代理人货主信息表的相关信息
*
* @param hzInforId 货主信息表ID
* @return {@link HzShipperInformation}
*/
HzShipperInformation getHzInfo(String hzInforId);
}
... ...
package com.sunyo.wlpt.cgoasm.arrival.mapper;
import com.sunyo.wlpt.cgoasm.arrival.domain.HzWaybillInfo;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;
import java.util.List;
/**
* @author 子诚
* Description:
* 时间:2020/5/21 11:56
*/
@Mapper
@Repository
public interface HzWaybillInfoMapper {
/**
* 获取 代理人——预配货主信息关系表 中的相关信息
*
* @param waybillNoMaster 主单号
* @return {@link HzWaybillInfo}
*/
List<HzWaybillInfo> getHzWaybillInfo(String waybillNoMaster);
}
... ...
package com.sunyo.wlpt.cgoasm.arrival.mapper;
import com.sunyo.wlpt.cgoasm.arrival.domain.SdBigType;
import org.apache.ibatis.annotations.Mapper;
import java.math.BigDecimal;
import java.util.List;
/**
* @author 子诚
* Description:
* 时间:2020/5/21 14:19
*/
@Mapper
public interface SdBigTypeMapper {
/**
* 查询一级品类
*
* @param bigTypeId 所属大类id
* @return
*/
List<SdBigType> getSdBigTypeInfo(BigDecimal bigTypeId);
}
... ...
package com.sunyo.wlpt.cgoasm.arrival.mapper;
import com.sunyo.wlpt.cgoasm.arrival.domain.SdCargoName;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
/**
* @author 子诚
* Description:
* 时间:2020/5/21 14:13
*/
@Mapper
public interface SdCargoNameMapper {
/**
* 根据运单号,获取品名和品类
*
* @param waybillNoMaster 运单号
* @return
*/
List<SdCargoName> getSdCargoName(String waybillNoMaster);
}
... ...
package com.sunyo.wlpt.cgoasm.arrival.mapper;
import com.sunyo.wlpt.cgoasm.arrival.domain.SdTwoType;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
/**
* @author 子诚
* Description:
* 时间:2020/5/21 14:17
*/
@Mapper
public interface SdTwoTypeMapper {
/**
* 根据品名,查询二级品类
*
* @param sdCargoName 品名
* @return
*/
List<SdTwoType> getSdTwoTypeInfo(String sdCargoName);
}
... ...
package com.sunyo.wlpt.cgoasm.arrival.service;
import com.sunyo.wlpt.cgoasm.arrival.domain.HzShipperInformation;
/**
* @author 子诚
* Description:
* 时间:2020/5/21 12:04
*/
public interface HzShipperInformationService {
/**
* 获取代理人货主信息表的相关信息
*
* @param hzInforId 货主信息表ID
* @return {@link HzShipperInformation}
*/
HzShipperInformation getHzInfo(String hzInforId);
}
... ...
package com.sunyo.wlpt.cgoasm.arrival.service;
import com.sunyo.wlpt.cgoasm.arrival.domain.HzWaybillInfo;
import java.util.List;
/**
* @author 子诚
* Description:
* 时间:2020/5/21 11:52
*/
public interface HzWaybillInfoService {
/**
* 获取 代理人——预配货主信息关系表 中的相关信息
*
* @param waybillNoMaster 主单号
* @return {@link HzWaybillInfo}
*/
List<HzWaybillInfo> getHzWaybillInfo(String waybillNoMaster);
}
... ...
package com.sunyo.wlpt.cgoasm.arrival.service;
import com.sunyo.wlpt.cgoasm.arrival.domain.SdBigType;
import java.math.BigDecimal;
import java.util.List;
/**
* @author 子诚
* Description:
* 时间:2020/5/21 14:19
*/
public interface SdBigTypeService {
/**
* 查询一级品类
*
* @param bigTypeId 所属大类id
* @return
*/
List<SdBigType> getSdBigTypeInfo(BigDecimal bigTypeId);
}
... ...
package com.sunyo.wlpt.cgoasm.arrival.service;
import com.sunyo.wlpt.cgoasm.arrival.domain.SdCargoName;
import java.util.List;
/**
* @author 子诚
* Description:
* 时间:2020/5/21 14:13
*/
public interface SdCargoNameService {
/**
* 根据运单号,获取品名和品类
*
* @param waybillNoMaster 运单号
* @return
*/
List<SdCargoName> getSdCargoName(String waybillNoMaster);
}
... ...
package com.sunyo.wlpt.cgoasm.arrival.service;
import com.sunyo.wlpt.cgoasm.arrival.domain.SdTwoType;
import java.util.List;
/**
* @author 子诚
* Description:
* 时间:2020/5/21 14:16
*/
public interface SdTwoTypeService {
/**
* 根据品名,查询二级品类
*
* @param sdCargoName 品名
* @return
*/
List<SdTwoType> getSdTwoTypeInfo(String sdCargoName);
}
... ...
package com.sunyo.wlpt.cgoasm.arrival.service.impl;
import com.sunyo.wlpt.cgoasm.arrival.domain.HzShipperInformation;
import com.sunyo.wlpt.cgoasm.arrival.mapper.HzShipperInformationMapper;
import com.sunyo.wlpt.cgoasm.arrival.service.HzShipperInformationService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
/**
* @author 子诚
* Description:
* 时间:2020/5/21 12:04
*/
@Service
public class HzShipperInformationServiceImpl implements HzShipperInformationService {
@Resource
private HzShipperInformationMapper hzShipperInformationMapper;
@Override
public HzShipperInformation getHzInfo(String hzInforId) {
return hzShipperInformationMapper.getHzInfo(hzInforId);
}
}
... ...
package com.sunyo.wlpt.cgoasm.arrival.service.impl;
import com.sunyo.wlpt.cgoasm.arrival.domain.HzWaybillInfo;
import com.sunyo.wlpt.cgoasm.arrival.mapper.HzWaybillInfoMapper;
import com.sunyo.wlpt.cgoasm.arrival.service.HzWaybillInfoService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
/**
* @author 子诚
* Description:
* 时间:2020/5/21 11:52
*/
@Service
public class HzWaybillInfoServiceImpl implements HzWaybillInfoService {
@Resource
private HzWaybillInfoMapper hzWaybillInfoMapper;
@Override
public List<HzWaybillInfo> getHzWaybillInfo(String waybillNoMaster) {
return hzWaybillInfoMapper.getHzWaybillInfo(waybillNoMaster);
}
}
... ...
package com.sunyo.wlpt.cgoasm.arrival.service.impl;
import com.sunyo.wlpt.cgoasm.arrival.domain.SdBigType;
import com.sunyo.wlpt.cgoasm.arrival.mapper.SdBigTypeMapper;
import com.sunyo.wlpt.cgoasm.arrival.service.SdBigTypeService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.math.BigDecimal;
import java.util.List;
/**
* @author 子诚
* Description:
* 时间:2020/5/21 14:19
*/
@Service
public class SdBigTypeServiceImpl implements SdBigTypeService {
@Resource
private SdBigTypeMapper sdBigTypeMapper;
@Override
public List<SdBigType> getSdBigTypeInfo(BigDecimal bigTypeId) {
return sdBigTypeMapper.getSdBigTypeInfo(bigTypeId);
}
}
... ...
package com.sunyo.wlpt.cgoasm.arrival.service.impl;
import com.sunyo.wlpt.cgoasm.arrival.domain.SdCargoName;
import com.sunyo.wlpt.cgoasm.arrival.mapper.SdCargoNameMapper;
import com.sunyo.wlpt.cgoasm.arrival.service.SdCargoNameService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
/**
* @author 子诚
* Description:
* 时间:2020/5/21 14:13
*/
@Service
public class SdCargoNameServiceImpl implements SdCargoNameService {
@Resource
private SdCargoNameMapper sdCargoNameMapper;
@Override
public List<SdCargoName> getSdCargoName(String waybillNoMaster) {
return sdCargoNameMapper.getSdCargoName(waybillNoMaster);
}
}
... ...
package com.sunyo.wlpt.cgoasm.arrival.service.impl;
import com.sunyo.wlpt.cgoasm.arrival.domain.SdTwoType;
import com.sunyo.wlpt.cgoasm.arrival.mapper.SdTwoTypeMapper;
import com.sunyo.wlpt.cgoasm.arrival.service.SdTwoTypeService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
/**
* @author 子诚
* Description:
* 时间:2020/5/21 14:16
*/
@Service
public class SdTwoTypeServiceImpl implements SdTwoTypeService {
@Resource
private SdTwoTypeMapper sdTwoTypeMapper;
@Override
public List<SdTwoType> getSdTwoTypeInfo(String sdCargoName) {
return sdTwoTypeMapper.getSdTwoTypeInfo(sdCargoName);
}
}
... ...
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.sunyo.wlpt.cgoasm.arrival.mapper.HzShipperInformationMapper">
<resultMap id="BaseResultMap" type="com.sunyo.wlpt.cgoasm.arrival.domain.HzShipperInformation">
<!--@mbg.generated-->
<!--@Table HZ_SHIPPER_INFORMATION-->
<id column="ID" jdbcType="DECIMAL" property="id"/>
<result column="FOR_SHORT" jdbcType="VARCHAR" property="forShort"/>
<result column="FULL_NAME" jdbcType="VARCHAR" property="fullName"/>
<result column="THE_SHIPPER_TYPE" jdbcType="VARCHAR" property="theShipperType"/>
</resultMap>
<sql id="Base_Column_List">
<!--@mbg.generated-->
ID, FOR_SHORT, FULL_NAME, THE_SHIPPER_TYPE
</sql>
<select id="getHzInfo" parameterType="java.lang.String"
resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from HZ_SHIPPER_INFORMATION
where ID = #{hzInforId,jdbcType=VARCHAR}
</select>
</mapper>
... ...
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.sunyo.wlpt.cgoasm.arrival.mapper.HzWaybillInfoMapper">
<resultMap id="BaseResultMap" type="com.sunyo.wlpt.cgoasm.arrival.domain.HzWaybillInfo">
<!--@mbg.generated-->
<!--@Table HZ_WAYBILL_INFO-->
<result column="WAYBILL_ID" jdbcType="VARCHAR" property="waybillId"/>
<result column="HZINFOR_ID" jdbcType="VARCHAR" property="hzInforId"/>
</resultMap>
<sql id="Base_Column_List">
<!--@mbg.generated-->
WAYBILL_ID, HZINFOR_ID
</sql>
<select id="getHzWaybillInfo" parameterType="java.lang.String"
resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from HZ_WAYBILL_INFO
where WAYBILL_ID = #{waybillNoMaster,jdbcType=VARCHAR}
</select>
</mapper>
... ...
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.sunyo.wlpt.cgoasm.arrival.mapper.SdBigTypeMapper">
<resultMap id="BaseResultMap" type="com.sunyo.wlpt.cgoasm.arrival.domain.SdBigType">
<!--@mbg.generated-->
<!--@Table SD_BIG_TYPE-->
<id column="ID" jdbcType="DECIMAL" property="id" />
<result column="TYPE_NAME" jdbcType="VARCHAR" property="typeName" />
</resultMap>
<sql id="Base_Column_List">
<!--@mbg.generated-->
ID, TYPE_NAME
</sql>
<select id="getSdBigTypeInfo" parameterType="java.math.BigDecimal" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from SD_BIG_TYPE
where ID = #{bigTypeId,jdbcType=DECIMAL}
</select>
</mapper>
... ...
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.sunyo.wlpt.cgoasm.arrival.mapper.SdCargoNameMapper">
<resultMap id="BaseResultMap" type="com.sunyo.wlpt.cgoasm.arrival.domain.SdCargoName">
<!--@mbg.generated-->
<!--@Table SD_CARGO_NAME-->
<result column="SD_WAYBILL" jdbcType="VARCHAR" property="sdWaybill"/>
<result column="SD_CARGO_NAME" jdbcType="VARCHAR" property="sdCargoName"/>
</resultMap>
<sql id="Base_Column_List">
<!--@mbg.generated-->
SD_WAYBILL, SD_CARGO_NAME
</sql>
<select id="getSdCargoName" parameterType="java.lang.String"
resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from
SD_CARGO_NAME
where
SD_WAYBILL=#{waybillNoMaster,jdbcType=VARCHAR}
</select>
</mapper>
... ...
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.sunyo.wlpt.cgoasm.arrival.mapper.SdTwoTypeMapper">
<resultMap id="BaseResultMap" type="com.sunyo.wlpt.cgoasm.arrival.domain.SdTwoType">
<!--@mbg.generated-->
<!--@Table SD_TWO_TYPE-->
<result column="TWO_TYPE_NAME" jdbcType="VARCHAR" property="twoTypeName"/>
<result column="BIG_TYPE_ID" jdbcType="DECIMAL" property="bigTypeId"/>
<result column="CARGO_NAME" jdbcType="VARCHAR" property="cargoName"/>
</resultMap>
<sql id="Base_Column_List">
<!--@mbg.generated-->
TWO_TYPE_NAME, BIG_TYPE_ID, CARGO_NAME
</sql>
<select id="getSdTwoTypeInfo" parameterType="java.lang.String" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from SD_TWO_TYPE
where CARGO_NAME = #{sdCargoName,jdbcType=VARCHAR}
</select>
</mapper>
... ...