作者 朱兆平

init

  1 +#登录账号
  2 +loginname = NMMS
  3 +#登录密码
  4 +loginpass = NMMS_P
  5 +#发送报文目录,相对程序目录
  6 +readDirectory = /Users/mrz/Documents/java项目/test
  7 +#接收存储报文目录
  8 +bakDirectory = kakoRevice
  9 +#是否需要发送报文,默认N不发,Y将发送readDirectory下的XML扩展名的报文
  10 +isNeedSend = Y
  11 +#本地要保存的styp类型,用英文逗号分隔,注意中英文字符
  12 +saveStyp = DFDL,ARRE,ONRE,STLS
  13 +
  14 +#IMF MEAT报头配置
  15 +
  16 +RCVR=
  17 +TYPE=KAKO
  18 +STYP=CARM
  19 +AppId=warehouse
  1 +#log4j=log_api.xml
  2 +isneedlog=N
  3 +psip=218.28.199.134
  4 +#psip=10.50.3.74
  5 +psport=7484
  6 +encoding=UTF-8
  1 +########Log4j configuration#####################################
  2 +log4j.rootLogger=INFO, stdout, fileout
  3 +
  4 +
  5 +log4j.logger.com.fiscal = INFO
  6 +#*******************************
  7 +log4j.logger.com.system = INFO
  8 +#*******************************
  9 +log4j.appender.stdout=org.apache.log4j.ConsoleAppender
  10 +log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
  11 +log4j.appender.stdout.layout.ConversionPattern=%d{MM-dd HH:mm:ss,SSSS}[%p] %m%n
  12 +
  13 +#yyyy-MM-dd HH:mm:ss
  14 +
  15 +
  16 +log4j.appender.fileout=org.apache.log4j.RollingFileAppender
  17 +log4j.appender.fileout.File=logs/imf.log
  18 +log4j.appender.fileout.MaxFileSize=50MB
  19 +log4j.appender.fileout.MaxBackupIndex=10
  20 +log4j.appender.fileout.layout=org.apache.log4j.PatternLayout
  21 +log4j.appender.fileout.layout.ConversionPattern=%d{MM-dd HH:mm:ss,SSSS}[%p] %m%n
@@ -3,19 +3,137 @@ @@ -3,19 +3,137 @@
3 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 3 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5 <modelVersion>4.0.0</modelVersion> 5 <modelVersion>4.0.0</modelVersion>
6 - 6 + <packaging>pom</packaging>
  7 + <parent>
  8 + <groupId>org.springframework.boot</groupId>
  9 + <artifactId>spring-boot-starter-parent</artifactId>
  10 + <version>2.2.0.BUILD-SNAPSHOT</version>
  11 + <relativePath/> <!-- lookup parent from repository -->
  12 + </parent>
7 <groupId>com.tianbo</groupId> 13 <groupId>com.tianbo</groupId>
8 <artifactId>imfClient</artifactId> 14 <artifactId>imfClient</artifactId>
9 <version>1.0-SNAPSHOT</version> 15 <version>1.0-SNAPSHOT</version>
  16 + <name>imfClient</name>
  17 + <description>warehouse for Spring Boot</description>
  18 + <properties>
  19 + <druid.version>1.1.9</druid.version>
  20 + <spring-cloud.version>Greenwich.BUILD-SNAPSHOT</spring-cloud.version>
  21 + </properties>
  22 + <dependencies>
  23 + <!--spring boot-->
  24 + <dependency>
  25 + <groupId>org.springframework.boot</groupId>
  26 + <artifactId>spring-boot-starter-jdbc</artifactId>
  27 + </dependency>
  28 + <dependency>
  29 + <groupId>org.mybatis.spring.boot</groupId>
  30 + <artifactId>mybatis-spring-boot-starter</artifactId>
  31 + <version>1.3.2</version>
  32 + </dependency>
  33 + <dependency>
  34 + <groupId>org.springframework.boot</groupId>
  35 + <artifactId>spring-boot-starter-websocket</artifactId>
  36 + <exclusions>
  37 + <exclusion>
  38 + <groupId>org.springframework.boot</groupId>
  39 + <artifactId>spring-boot-starter</artifactId>
  40 + </exclusion>
  41 + </exclusions>
  42 + </dependency>
  43 + <dependency>
  44 + <groupId>org.springframework.boot</groupId>
  45 + <artifactId>spring-boot-starter-test</artifactId>
  46 + <scope>test</scope>
  47 + </dependency>
  48 + <!--clound-->
  49 + <dependency>
  50 + <groupId>org.springframework.cloud</groupId>
  51 + <artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
  52 + </dependency>
  53 +
  54 + <!--数据库-->
  55 + <dependency>
  56 + <groupId>com.alibaba</groupId>
  57 + <artifactId>druid</artifactId>
  58 + <version>${druid.version}</version>
  59 + </dependency>
  60 + <dependency>
  61 + <groupId>org.mybatis</groupId>
  62 + <artifactId>mybatis</artifactId>
  63 + <version>3.4.6</version>
  64 + </dependency>
  65 + <!-- mysql-->
  66 + <dependency>
  67 + <groupId>mysql</groupId>
  68 + <artifactId>mysql-connector-java</artifactId>
  69 + <version>8.0.15</version>
  70 + </dependency>
  71 + <!-- oracle-->
  72 + <dependency>
  73 + <groupId>com.oracle</groupId>
  74 + <artifactId>ojdbc6</artifactId>
  75 + <version>11.2.0.4.0-atlassian-hosted</version>
  76 + </dependency>
  77 + <!--util依赖-->
  78 + <dependency>
  79 + <groupId>com.tianbo</groupId>
  80 + <artifactId>util</artifactId>
  81 + <version>1.0-SNAPSHOT</version>
  82 + </dependency>
  83 + <!--util依赖-->
  84 + <!--IMF需要的包-->
  85 + <!-- https://mvnrepository.com/artifact/org.apache.xmlbeans/xmlbeans -->
  86 + <dependency>
  87 + <groupId>org.apache.xmlbeans</groupId>
  88 + <artifactId>xmlbeans</artifactId>
  89 + <version>2.4.0</version>
  90 + </dependency>
  91 + <!-- https://mvnrepository.com/artifact/org.apache.ws.commons.schema/XmlSchema -->
  92 + <dependency>
  93 + <groupId>org.apache.ws.commons.schema</groupId>
  94 + <artifactId>XmlSchema</artifactId>
  95 + <version>1.4.7</version>
  96 + </dependency>
  97 + <!-- https://mvnrepository.com/artifact/wsdl4j/wsdl4j -->
  98 + <dependency>
  99 + <groupId>wsdl4j</groupId>
  100 + <artifactId>wsdl4j</artifactId>
  101 + <version>1.6.2</version>
  102 + </dependency>
  103 + <!-- https://mvnrepository.com/artifact/org.apache.neethi/neethi -->
  104 + <dependency>
  105 + <groupId>org.apache.neethi</groupId>
  106 + <artifactId>neethi</artifactId>
  107 + <version>2.0.4</version>
  108 + </dependency>
  109 +
10 110
11 111
12 - <dependencies>  
13 <!-- LOG --> 112 <!-- LOG -->
14 <dependency> 113 <dependency>
15 <groupId>log4j</groupId> 114 <groupId>log4j</groupId>
16 <artifactId>log4j</artifactId> 115 <artifactId>log4j</artifactId>
17 <version>1.2.16</version> 116 <version>1.2.16</version>
18 </dependency> 117 </dependency>
  118 + <!-- https://mvnrepository.com/artifact/org.slf4j/slf4j-api -->
  119 + <dependency>
  120 + <groupId>org.slf4j</groupId>
  121 + <artifactId>slf4j-api</artifactId>
  122 + <version>1.6.1</version>
  123 + </dependency>
  124 + <!-- https://mvnrepository.com/artifact/org.slf4j/slf4j-jdk14 -->
  125 + <dependency>
  126 + <groupId>org.slf4j</groupId>
  127 + <artifactId>slf4j-jdk14</artifactId>
  128 + <version>1.6.1</version>
  129 + <scope>test</scope>
  130 + </dependency>
  131 + <!-- https://mvnrepository.com/artifact/org.apache.cxf.xjcplugins/cxf-xjc-boolean -->
  132 + <dependency>
  133 + <groupId>org.apache.cxf.xjcplugins</groupId>
  134 + <artifactId>cxf-xjc-boolean</artifactId>
  135 + <version>3.2.3</version>
  136 + </dependency>
19 <!--添加本地IMF包--> 137 <!--添加本地IMF包-->
20 <dependency> 138 <dependency>
21 <groupId>com.caac</groupId> 139 <groupId>com.caac</groupId>
@@ -236,11 +354,70 @@ @@ -236,11 +354,70 @@
236 <scope>system</scope> 354 <scope>system</scope>
237 <systemPath>${project.basedir}/lib/connector.jar</systemPath> 355 <systemPath>${project.basedir}/lib/connector.jar</systemPath>
238 </dependency> 356 </dependency>
239 - <dependency>  
240 - <groupId>org.springframework</groupId>  
241 - <artifactId>spring-context</artifactId>  
242 - <version>5.2.0.BUILD-SNAPSHOT</version>  
243 - </dependency>  
244 </dependencies> 357 </dependencies>
245 358
  359 + <dependencyManagement>
  360 + <dependencies>
  361 + <dependency>
  362 + <groupId>org.springframework.cloud</groupId>
  363 + <artifactId>spring-cloud-dependencies</artifactId>
  364 + <version>${spring-cloud.version}</version>
  365 + <type>pom</type>
  366 + <scope>import</scope>
  367 + </dependency>
  368 + </dependencies>
  369 + </dependencyManagement>
  370 + <build>
  371 + <plugins>
  372 + <plugin>
  373 + <groupId>org.springframework.boot</groupId>
  374 + <artifactId>spring-boot-maven-plugin</artifactId>
  375 + <configuration>
  376 + <includeSystemScope>true</includeSystemScope>
  377 + </configuration>
  378 + </plugin>
  379 + <!-- mybatis generator 自动生成代码插件 -->
  380 + <plugin>
  381 + <groupId>org.mybatis.generator</groupId>
  382 + <artifactId>mybatis-generator-maven-plugin</artifactId>
  383 + <version>1.3.2</version>
  384 + <configuration>
  385 + <configurationFile>${basedir}/src/main/resources/generator/generatorConfig.xml</configurationFile>
  386 + <overwrite>true</overwrite>
  387 + <verbose>true</verbose>
  388 + </configuration>
  389 + </plugin>
  390 + </plugins>
  391 + </build>
  392 +
  393 + <repositories>
  394 + <repository>
  395 + <id>spring-snapshots</id>
  396 + <name>Spring Snapshots</name>
  397 + <url>https://repo.spring.io/snapshot</url>
  398 + <snapshots>
  399 + <enabled>true</enabled>
  400 + </snapshots>
  401 + </repository>
  402 + <repository>
  403 + <id>spring-milestones</id>
  404 + <name>Spring Milestones</name>
  405 + <url>https://repo.spring.io/milestone</url>
  406 + </repository>
  407 + </repositories>
  408 + <pluginRepositories>
  409 + <pluginRepository>
  410 + <id>spring-snapshots</id>
  411 + <name>Spring Snapshots</name>
  412 + <url>https://repo.spring.io/snapshot</url>
  413 + <snapshots>
  414 + <enabled>true</enabled>
  415 + </snapshots>
  416 + </pluginRepository>
  417 + <pluginRepository>
  418 + <id>spring-milestones</id>
  419 + <name>Spring Milestones</name>
  420 + <url>https://repo.spring.io/milestone</url>
  421 + </pluginRepository>
  422 + </pluginRepositories>
246 </project> 423 </project>
1 package com.tianbo.imfClient; 1 package com.tianbo.imfClient;
2 2
3 import com.caac.imf.api.IMFClient; 3 import com.caac.imf.api.IMFClient;
4 -import com.tianbo.imfClient.handle.imfClient.handle.imfClient.IMFSaveHandle; 4 +import com.tianbo.imfClient.handle.IMFSaveHandle;
  5 +import com.tianbo.imfClient.schedul.IMF_Task;
5 import org.apache.log4j.Logger; 6 import org.apache.log4j.Logger;
6 7
7 public class IMF_Reader extends Thread{ 8 public class IMF_Reader extends Thread{
@@ -21,7 +22,7 @@ public class IMF_Reader extends Thread{ @@ -21,7 +22,7 @@ public class IMF_Reader extends Thread{
21 if (IMF_Task.LOGIN_OK) { 22 if (IMF_Task.LOGIN_OK) {
22 String message = this.client.getMSG(); 23 String message = this.client.getMSG();
23 if (message != null) { 24 if (message != null) {
24 - com.tianbo.imfClient.handle.imfClient.IMFSaveHandle imfSaveHandle = new com.tianbo.imfClient.handle.imfClient.IMFSaveHandle(); 25 + IMFSaveHandle imfSaveHandle = new IMFSaveHandle();
25 imfSaveHandle.handle(message); 26 imfSaveHandle.handle(message);
26 } 27 }
27 28
1 package com.tianbo.imfClient; 1 package com.tianbo.imfClient;
2 2
3 import com.caac.imf.api.IMFClient; 3 import com.caac.imf.api.IMFClient;
4 -import com.tianbo.warehouse.imf.schedul.IMF_Task;  
5 -import com.tianbo.warehouse.util.Date.DateUtil;  
6 -import com.tianbo.warehouse.util.IO.FileTool;  
7 -import com.tianbo.warehouse.util.XML.MakeImfMeta; 4 +import com.tianbo.imfClient.schedul.IMF_Task;
  5 +import com.tianbo.util.Date.DateUtil;
  6 +import com.tianbo.util.IO.FileTool;
  7 +import com.tianbo.util.XML.MakeImfMeta;
8 import org.apache.commons.io.FileUtils; 8 import org.apache.commons.io.FileUtils;
9 import org.apache.log4j.Logger; 9 import org.apache.log4j.Logger;
10 10
  1 +/**
  2 + * @author mrz
  3 + * @email 17966059@qq.com
  4 + */
  5 +package com.tianbo.imfClient;
  6 +
  7 +import org.mybatis.spring.annotation.MapperScan;
  8 +import org.springframework.boot.SpringApplication;
  9 +import org.springframework.boot.autoconfigure.SpringBootApplication;
  10 +import org.springframework.scheduling.annotation.EnableScheduling;
  11 +import org.springframework.transaction.annotation.EnableTransactionManagement;
  12 +
  13 +@SpringBootApplication
  14 +@EnableScheduling
  15 +//@EnableEurekaClient
  16 +@EnableTransactionManagement
  17 +@MapperScan("com.tianbo.imfClient.dao")
  18 +public class WarehouseApplication {
  19 +
  20 + public static void main(String[] args) {
  21 + SpringApplication.run(WarehouseApplication.class, args);
  22 + }
  23 +
  24 +}
  25 +
  1 +package com.tianbo.imfClient.controller;
  2 +
  3 +import com.tianbo.imfClient.handle.IO_Log_Handle;
  4 +import org.springframework.stereotype.Component;
  5 +
  6 +import javax.websocket.OnClose;
  7 +import javax.websocket.OnError;
  8 +import javax.websocket.OnOpen;
  9 +import javax.websocket.Session;
  10 +import javax.websocket.server.ServerEndpoint;
  11 +import java.io.IOException;
  12 +import java.io.InputStream;
  13 +import java.util.concurrent.CopyOnWriteArraySet;
  14 +
  15 +
  16 +@ServerEndpoint(value = "/log")
  17 +@Component
  18 +public class LogWebsockController {
  19 + private Process process;
  20 + private InputStream inputStream;
  21 + //与某个客户端的连接会话,需要通过它来给客户端发送数据
  22 + private Session session;
  23 +
  24 + //静态变量,用来记录当前在线连接数。应该把它设计成线程安全的。
  25 + private static int onlineCount = 0;
  26 + //concurrent包的线程安全Set,用来存放每个客户端对应的MyWebSocket对象。
  27 + private static CopyOnWriteArraySet<LogWebsockController> webSocketSet = new CopyOnWriteArraySet<LogWebsockController>();
  28 +
  29 +
  30 + @OnOpen
  31 + public void onOpen(Session session){
  32 + this.session = session;
  33 + webSocketSet.add(this);
  34 + addOnlineCount();
  35 + try {
  36 + process = Runtime.getRuntime().exec("tail -f logs/imf.log");
  37 + inputStream = process.getInputStream();
  38 + IO_Log_Handle thread = new IO_Log_Handle(inputStream, session);
  39 + thread.start();
  40 +
  41 + }catch (IOException e){
  42 + e.printStackTrace();
  43 + }
  44 +
  45 + }
  46 + /**
  47 + * WebSocket请求关闭
  48 + */
  49 + @OnClose
  50 + public void onClose() {
  51 + try {
  52 + if(inputStream != null) {
  53 + inputStream.close();
  54 + }
  55 + } catch (Exception e) {
  56 + e.printStackTrace();
  57 + }
  58 + if(process != null){
  59 + process.destroy();
  60 + }
  61 +
  62 + }
  63 +
  64 + @OnError
  65 + public void onError(Throwable thr) {
  66 + thr.printStackTrace();
  67 + }
  68 +
  69 + public static synchronized void addOnlineCount() {
  70 + LogWebsockController.onlineCount++;
  71 + }
  72 + public static synchronized int getOnlineCount() {
  73 + return onlineCount;
  74 + }
  75 +
  76 +
  77 +}
  1 +package com.tianbo.imfClient.dao;
  2 +
  3 +import com.tianbo.imfClient.model.T_ETL_MESSAGE;
  4 +
  5 +import java.math.BigDecimal;
  6 +
  7 +public interface T_ETL_MESSAGEMapper {
  8 + int deleteByPrimaryKey(BigDecimal fid);
  9 +
  10 + int insert(T_ETL_MESSAGE record);
  11 +
  12 + int insertSelective(T_ETL_MESSAGE record);
  13 +
  14 + T_ETL_MESSAGE selectByPrimaryKey(BigDecimal fid);
  15 +
  16 + int updateByPrimaryKeySelective(T_ETL_MESSAGE record);
  17 +
  18 + int updateByPrimaryKeyWithBLOBs(T_ETL_MESSAGE record);
  19 +
  20 + int updateByPrimaryKey(T_ETL_MESSAGE record);
  21 +}
1 package com.tianbo.imfClient.handle; 1 package com.tianbo.imfClient.handle;
2 2
3 -import com.tianbo.warehouse.model.T_ETL_MESSAGE;  
4 -import com.tianbo.warehouse.service.T_ETL_MESSAGEService;  
5 -import com.tianbo.warehouse.util.Date.DateUtil;  
6 -import com.tianbo.warehouse.util.IO.FileTool;  
7 -import com.tianbo.warehouse.util.XML.XML2ENTITY; 3 +import com.tianbo.imfClient.model.T_ETL_MESSAGE;
  4 +import com.tianbo.imfClient.service.T_ETL_MESSAGEService;
  5 +import com.tianbo.util.Date.DateUtil;
  6 +import com.tianbo.util.IO.FileTool;
  7 +import com.tianbo.util.XML.XML2ENTITY;
8 import org.apache.log4j.Logger; 8 import org.apache.log4j.Logger;
9 import org.dom4j.Document; 9 import org.dom4j.Document;
10 import org.dom4j.DocumentHelper; 10 import org.dom4j.DocumentHelper;
  1 +package com.tianbo.imfClient.handle;
  2 +
  3 +import javax.websocket.Session;
  4 +import java.io.BufferedReader;
  5 +import java.io.IOException;
  6 +import java.io.InputStream;
  7 +import java.io.InputStreamReader;
  8 +
  9 +public class IO_Log_Handle extends Thread{
  10 +
  11 + private BufferedReader reader;
  12 + private Session session;
  13 +
  14 + public IO_Log_Handle(InputStream in, Session session) {
  15 + this.reader = new BufferedReader(new InputStreamReader(in));
  16 + this.session = session;
  17 +
  18 + }
  19 +
  20 + @Override
  21 + public void run() {
  22 + String line;
  23 + try {
  24 + while((line = reader.readLine()) != null) {
  25 + // 将实时日志通过WebSocket发送给客户端,给每一行添加一个HTML换行
  26 + session.getBasicRemote().sendText(line + "<br>");
  27 + }
  28 + } catch (IOException e) {
  29 + e.printStackTrace();
  30 + }
  31 + }
  32 +}
  1 +package com.tianbo.imfClient.model;
  2 +
  3 +import java.math.BigDecimal;
  4 +import java.util.Date;
  5 +
  6 +public class T_ETL_MESSAGE {
  7 + private BigDecimal fid;
  8 +
  9 + private String oper;
  10 +
  11 + private Date sntm;
  12 +
  13 + private String sndr;
  14 +
  15 + private String rcvr;
  16 +
  17 + private String seqn;
  18 +
  19 + private Date ddtm;
  20 +
  21 + private String type;
  22 +
  23 + private String styp;
  24 +
  25 + private String transid;
  26 +
  27 + private String remark;
  28 +
  29 + private Date outtm;
  30 +
  31 + private BigDecimal outflag;
  32 +
  33 + private Date etltim;
  34 +
  35 + private BigDecimal etlflag;
  36 +
  37 + private Date errtm;
  38 +
  39 + private BigDecimal errflag;
  40 +
  41 + private String errlog;
  42 +
  43 + private String appid;
  44 +
  45 + private String content;
  46 +
  47 + public BigDecimal getFid() {
  48 + return fid;
  49 + }
  50 +
  51 + public void setFid(BigDecimal fid) {
  52 + this.fid = fid;
  53 + }
  54 +
  55 + public String getOper() {
  56 + return oper;
  57 + }
  58 +
  59 + public void setOper(String oper) {
  60 + this.oper = oper == null ? null : oper.trim();
  61 + }
  62 +
  63 + public Date getSntm() {
  64 + return sntm;
  65 + }
  66 +
  67 + public void setSntm(Date sntm) {
  68 + this.sntm = sntm;
  69 + }
  70 +
  71 + public String getSndr() {
  72 + return sndr;
  73 + }
  74 +
  75 + public void setSndr(String sndr) {
  76 + this.sndr = sndr == null ? null : sndr.trim();
  77 + }
  78 +
  79 + public String getRcvr() {
  80 + return rcvr;
  81 + }
  82 +
  83 + public void setRcvr(String rcvr) {
  84 + this.rcvr = rcvr == null ? null : rcvr.trim();
  85 + }
  86 +
  87 + public String getSeqn() {
  88 + return seqn;
  89 + }
  90 +
  91 + public void setSeqn(String seqn) {
  92 + this.seqn = seqn == null ? null : seqn.trim();
  93 + }
  94 +
  95 + public Date getDdtm() {
  96 + return ddtm;
  97 + }
  98 +
  99 + public void setDdtm(Date ddtm) {
  100 + this.ddtm = ddtm;
  101 + }
  102 +
  103 + public String getType() {
  104 + return type;
  105 + }
  106 +
  107 + public void setType(String type) {
  108 + this.type = type == null ? null : type.trim();
  109 + }
  110 +
  111 + public String getStyp() {
  112 + return styp;
  113 + }
  114 +
  115 + public void setStyp(String styp) {
  116 + this.styp = styp == null ? null : styp.trim();
  117 + }
  118 +
  119 + public String getTransid() {
  120 + return transid;
  121 + }
  122 +
  123 + public void setTransid(String transid) {
  124 + this.transid = transid == null ? null : transid.trim();
  125 + }
  126 +
  127 + public String getRemark() {
  128 + return remark;
  129 + }
  130 +
  131 + public void setRemark(String remark) {
  132 + this.remark = remark;
  133 + }
  134 +
  135 + public Date getOuttm() {
  136 + return outtm;
  137 + }
  138 +
  139 + public void setOuttm(Date outtm) {
  140 + this.outtm = outtm;
  141 + }
  142 +
  143 + public BigDecimal getOutflag() {
  144 + return outflag;
  145 + }
  146 +
  147 + public void setOutflag(BigDecimal outflag) {
  148 + this.outflag = outflag;
  149 + }
  150 +
  151 + public Date getEtltim() {
  152 + return etltim;
  153 + }
  154 +
  155 + public void setEtltim(Date etltim) {
  156 + this.etltim = etltim;
  157 + }
  158 +
  159 + public BigDecimal getEtlflag() {
  160 + return etlflag;
  161 + }
  162 +
  163 + public void setEtlflag(BigDecimal etlflag) {
  164 + this.etlflag = etlflag;
  165 + }
  166 +
  167 + public Date getErrtm() {
  168 + return errtm;
  169 + }
  170 +
  171 + public void setErrtm(Date errtm) {
  172 + this.errtm = errtm;
  173 + }
  174 +
  175 + public BigDecimal getErrflag() {
  176 + return errflag;
  177 + }
  178 +
  179 + public void setErrflag(BigDecimal errflag) {
  180 + this.errflag = errflag;
  181 + }
  182 +
  183 + public String getErrlog() {
  184 + return errlog;
  185 + }
  186 +
  187 + public void setErrlog(String errlog) {
  188 + this.errlog = errlog;
  189 + }
  190 +
  191 + public String getAppid() {
  192 + return appid;
  193 + }
  194 +
  195 + public void setAppid(String appid) {
  196 + this.appid = appid == null ? null : appid.trim();
  197 + }
  198 +
  199 + public String getContent() {
  200 + return content;
  201 + }
  202 +
  203 + public void setContent(String content) {
  204 + this.content = content == null ? null : content.trim();
  205 + }
  206 +}
@@ -7,6 +7,7 @@ import com.tianbo.imfClient.IMF_Sender; @@ -7,6 +7,7 @@ import com.tianbo.imfClient.IMF_Sender;
7 import com.tianbo.util.IO.FileTool; 7 import com.tianbo.util.IO.FileTool;
8 import org.apache.log4j.Logger; 8 import org.apache.log4j.Logger;
9 import org.apache.log4j.PropertyConfigurator; 9 import org.apache.log4j.PropertyConfigurator;
  10 +import org.springframework.scheduling.annotation.Scheduled;
10 import org.springframework.stereotype.Component; 11 import org.springframework.stereotype.Component;
11 import java.text.SimpleDateFormat; 12 import java.text.SimpleDateFormat;
12 13
@@ -22,7 +23,7 @@ public class IMF_Task { @@ -22,7 +23,7 @@ public class IMF_Task {
22 public static String isNeedSend = "N"; 23 public static String isNeedSend = "N";
23 24
24 25
25 -// @Scheduled(fixedRate = 5000) 26 + @Scheduled(fixedRate = 5000)
26 private static void start() throws Exception { 27 private static void start() throws Exception {
27 PropertyConfigurator.configure("config/log4j.properties"); 28 PropertyConfigurator.configure("config/log4j.properties");
28 client = IMFClientFactory.createInstance(); 29 client = IMFClientFactory.createInstance();
  1 +package com.tianbo.imfClient.service;
  2 +
  3 +import com.tianbo.imfClient.model.T_ETL_MESSAGE;
  4 +
  5 +public interface T_ETL_MESSAGEService {
  6 + int insert(T_ETL_MESSAGE record);
  7 + int insertSelective(T_ETL_MESSAGE record);
  8 +}
  1 +package com.tianbo.imfClient.service.imp;
  2 +
  3 +import com.tianbo.imfClient.dao.T_ETL_MESSAGEMapper;
  4 +import com.tianbo.imfClient.model.T_ETL_MESSAGE;
  5 +import com.tianbo.imfClient.service.T_ETL_MESSAGEService;
  6 +import org.springframework.beans.factory.annotation.Autowired;
  7 +import org.springframework.stereotype.Service;
  8 +
  9 +@Service("messageService")
  10 +public class T_ETL_MESSAGEServiceImp implements T_ETL_MESSAGEService{
  11 +
  12 + @Autowired
  13 + private T_ETL_MESSAGEMapper messageMapper;
  14 +
  15 + @Override
  16 + public int insert(T_ETL_MESSAGE record){
  17 + return messageMapper.insert(record);
  18 + }
  19 +
  20 + @Override
  21 + public int insertSelective(T_ETL_MESSAGE record){
  22 + return messageMapper.insertSelective(record);
  23 + }
  24 +}
  1 +
  2 +#服务端口
  3 +server.port=7003
  4 +server.servlet.context-path=${SERVER_CONTEXTPATH:}
  5 +
  6 +#静态资源,设置上传文件的访问,上传文件的路径,要带斜杠
  7 +web.upload-path=upload/
  8 +#表示所有的访问经过静态资源路径
  9 +springboot.mvc.static-path-pattern=/**
  10 +spring.resources.static-locations=classpath:/META-INF/resources/,classpath:/static,classpath:/resources/,file:${web.upload-path}
  11 +
  12 +
  13 +
  14 +#服务名
  15 +spring.application.name=tianbo.base.dev.devkit
  16 +
  17 +spring.jackson.serialization.fail-on-empty-beans=false
  18 +
  19 +#springboot2.0之后会把Date类型字段自动给转成UTC字符串 如:1990-11-26T16:00:00.000+0000,如果想转成时间戳在application.properties配置文件增加以下配置
  20 +#jackson相关配置
  21 +spring.jackson.date-format = yyyy-MM-dd HH:mm:ss
  22 +spring.jackson.serialization.write-dates-as-timestamps=false
  23 +#时区必须要设置
  24 +spring.jackson.time-zone=GMT+8
  25 +#ALWAYS的意思是即时属性为null,仍然也会输出这个key
  26 +spring.jackson.default-property-inclusion=always
  27 +
  28 +#springcloud 基本配置
  29 +
  30 +#eureka主机名,会在控制页面中显示
  31 +spring.cloud.features.enabled=false
  32 +spring.cloud.discovery.enabled=false
  33 +spring.cloud.service-registry.auto-registration.enabled=false
  34 +#eureka.instance.hostname=${spring.cloud.client.ip-address}
  35 +#eureka服务器页面中status的请求路径
  36 +#eureka.instance.status-page-url=http://${eureka.instance.hostname}:${server.port}/index
  37 +#eureka注册中心服务器地址
  38 +#eureka.client.service-url.defaultZone=http://10.50.3.82:19527/eureka/
  39 +#eureka.instance.prefer-ip-address=true
  40 +#eureka.instance.instance-id=${spring.cloud.client.ip-address}:${server.port}
  41 +#eureka.client.registry-fetch-interval-seconds=30
  42 +#eureka.instance.lease-renewal-interval-in-seconds=15
  43 +#eureka.instance.lease-expiration-duration-in-seconds=45
  44 +
  45 +#spring.datasource oracle
  46 +spring.datasource.type=com.alibaba.druid.pool.DruidDataSource
  47 +#spring.datasource.driver-class-name=oracle.jdbc.OracleDriver
  48 +#spring.datasource.url=jdbc:oracle:thin:@10.50.3.68:1521:CGODW
  49 +#spring.datasource.username=CGOETL
  50 +#spring.datasource.password=1q2w3e4r
  51 +
  52 +#spring datasource mysql,注意编码配置,缺少数据库编码配置容易引起中文入库乱码
  53 +spring.datasource.url=jdbc:mysql://127.0.0.1:3307/statistics?useUnicode=true&characterEncoding=utf8
  54 +spring.datasource.username=root
  55 +spring.datasource.password=
  56 +spring.datasource.driver-class-name=com.mysql.jdbc.Driver
  57 +spring.datasource.max-idle=10
  58 +spring.datasource.max-wait=10000
  59 +spring.datasource.min-idle=5
  60 +spring.datasource.initial-size=5
  61 +
  62 +#配置初始化大小/最小/最大
  63 +spring.datasource.druid.initial-size=1
  64 +spring.datasource.druid.min-idle=1
  65 +spring.datasource.druid.max-active=20
  66 +#获取连接等待超时时间
  67 +spring.datasource.druid.max-wait=60000
  68 +#一个连接在池中最小生存的时间
  69 +spring.datasource.druid.min-evictable-idle-time-millis=300000
  70 +#间隔多久进行一次检测,检测需要关闭的空闲连接
  71 +spring.datasource.druid.time-between-eviction-runs-millis=60000
  72 +#oracle
  73 +#spring.datasource.druid.validation-query=SELECT 'x' FROM DUAL
  74 +#mysql
  75 +spring.datasource.druid.validation-query=SELECT 1 FROM DUAL
  76 +spring.datasource.druid.test-while-idle=true
  77 +spring.datasource.druid.test-on-borrow=false
  78 +spring.datasource.druid.test-on-return=false
  79 +spring.datasource.druid.default-auto-commit=true
  80 +
  81 +
  82 +
  83 +mybatis.mapper-locations=classpath:mapping/*.xml
  84 +mybatis.type-aliases-package=com.tianbo.imfClient.model
  85 +
  86 +
  87 +
  88 +pagehelper.helper-dialect=mysql
  89 +#pagehelper.auto-dialect=true
  90 +#pagehelper.auto-runtime-dialect=true
  91 +pagehelper.reasonable=true
  92 +pagehelper.support-methods-arguments=true
  93 +pagehelper.params=count=countSql
  94 +
  95 +#debug配置
  96 +trace=false
  97 +debug=true
  98 +logging.level.org.apache.tomcat=info
  99 +logging.level.com.tianbo.imfClient.dao=DEBUG
  100 +
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<!DOCTYPE generatorConfiguration
  3 + PUBLIC "-//mybatis.org//DTD MyBatis Generator Configuration 1.0//EN"
  4 + "http://mybatis.org/dtd/mybatis-generator-config_1_0.dtd">
  5 +<generatorConfiguration>
  6 + <!-- 数据库驱动:选择你的本地硬盘上面的数据库驱动包-->
  7 + <classPathEntry location="/Users/mrz/Downloads/mybatis-generator-core-1.3.2/lib/mysql-connector-java-5.1.25-bin.jar"/>
  8 + <!--<classPathEntry location="/Users/mrz/Documents/maven/ojdbc6.jar"/>-->
  9 + <context id="DB2Tables" targetRuntime="MyBatis3">
  10 + <commentGenerator>
  11 + <property name="suppressDate" value="true"/>
  12 + <!-- 是否去除自动生成的注释 true:是 : false:否 -->
  13 + <property name="suppressAllComments" value="true"/>
  14 + </commentGenerator>
  15 + <!--数据库链接URL,用户名、密码 -->
  16 + <jdbcConnection driverClass="com.mysql.jdbc.Driver"
  17 + connectionURL="jdbc:mysql://127.0.0.1:3307/statistics"
  18 + userId="root"
  19 + password="">
  20 + </jdbcConnection>
  21 + <!--<jdbcConnection driverClass="oracle.jdbc.driver.OracleDriver"-->
  22 + <!--connectionURL="jdbc:oracle:thin:@10.50.3.68:1521:CGODW"-->
  23 + <!--userId="CGOETL"-->
  24 + <!--password="1q2w3e4r">-->
  25 + <!--</jdbcConnection>-->
  26 + <!-- 默认false,把JDBC DECIMAL 和 NUMERIC 类型解析为 Integer,为 true时把JDBC DECIMAL 和
  27 + NUMERIC 类型解析为java.math.BigDecimal -->
  28 + <!--<javaTypeResolver>-->
  29 + <!--<property name="forceBigDecimals" value="true" />-->
  30 + <!--</javaTypeResolver>-->
  31 + <javaTypeResolver>
  32 + <property name="forceBigDecimals" value="false"/>
  33 + </javaTypeResolver>
  34 + <!-- 生成模型的包名和位置-->
  35 + <javaModelGenerator targetPackage="com.tianbo.imfClient.model" targetProject="src/main/java">
  36 + <property name="enableSubPackages" value="true"/>
  37 + <property name="trimStrings" value="true"/>
  38 + </javaModelGenerator>
  39 + <!-- 生成映射文件的包名和位置-->
  40 + <sqlMapGenerator targetPackage="mapping" targetProject="src/main/resources">
  41 + <property name="enableSubPackages" value="true"/>
  42 + </sqlMapGenerator>
  43 + <!-- 生成DAO的包名和位置-->
  44 + <javaClientGenerator type="XMLMAPPER" targetPackage="com.tianbo.imfClient.dao" targetProject="src/main/java">
  45 + <property name="enableSubPackages" value="true"/>
  46 + </javaClientGenerator>
  47 + <!-- 要生成的表 tableName是数据库中的表名或视图名 domainObjectName是实体类名-->
  48 + <table tableName="attachment" domainObjectName="Attachment" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false"></table>
  49 + </context>
  50 +</generatorConfiguration>
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  3 +<mapper namespace="com.tianbo.imfClient.dao.T_ETL_MESSAGEMapper">
  4 + <resultMap id="BaseResultMap" type="com.tianbo.imfClient.model.T_ETL_MESSAGE">
  5 + <id column="FID" jdbcType="DECIMAL" property="fid" />
  6 + <result column="OPER" jdbcType="VARCHAR" property="oper" />
  7 + <result column="SNTM" jdbcType="TIMESTAMP" property="sntm" />
  8 + <result column="SNDR" jdbcType="VARCHAR" property="sndr" />
  9 + <result column="RCVR" jdbcType="VARCHAR" property="rcvr" />
  10 + <result column="SEQN" jdbcType="VARCHAR" property="seqn" />
  11 + <result column="DDTM" jdbcType="TIMESTAMP" property="ddtm" />
  12 + <result column="TYPE" jdbcType="VARCHAR" property="type" />
  13 + <result column="STYP" jdbcType="VARCHAR" property="styp" />
  14 + <result column="TRANSID" jdbcType="VARCHAR" property="transid" />
  15 + <result column="REMARK" jdbcType="NVARCHAR" property="remark" />
  16 + <result column="OUTTM" jdbcType="TIMESTAMP" property="outtm" />
  17 + <result column="OUTFLAG" jdbcType="DECIMAL" property="outflag" />
  18 + <result column="ETLTIM" jdbcType="TIMESTAMP" property="etltim" />
  19 + <result column="ETLFLAG" jdbcType="DECIMAL" property="etlflag" />
  20 + <result column="ERRTM" jdbcType="TIMESTAMP" property="errtm" />
  21 + <result column="ERRFLAG" jdbcType="DECIMAL" property="errflag" />
  22 + <result column="ERRLOG" jdbcType="NVARCHAR" property="errlog" />
  23 + <result column="APPID" jdbcType="VARCHAR" property="appid" />
  24 + </resultMap>
  25 + <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.tianbo.imfClient.model.T_ETL_MESSAGE">
  26 + <result column="CONTENT" jdbcType="CLOB" property="content" />
  27 + </resultMap>
  28 + <sql id="Base_Column_List">
  29 + FID, OPER, SNTM, SNDR, RCVR, SEQN, DDTM, TYPE, STYP, TRANSID, REMARK, OUTTM, OUTFLAG,
  30 + ETLTIM, ETLFLAG, ERRTM, ERRFLAG, ERRLOG, APPID
  31 + </sql>
  32 + <sql id="Blob_Column_List">
  33 + CONTENT
  34 + </sql>
  35 + <select id="selectByPrimaryKey" parameterType="java.math.BigDecimal" resultMap="ResultMapWithBLOBs">
  36 + select
  37 + <include refid="Base_Column_List" />
  38 + ,
  39 + <include refid="Blob_Column_List" />
  40 + from T_ETL_MESSAGE
  41 + where FID = #{fid,jdbcType=DECIMAL}
  42 + </select>
  43 + <delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal">
  44 + delete from T_ETL_MESSAGE
  45 + where FID = #{fid,jdbcType=DECIMAL}
  46 + </delete>
  47 + <insert id="insert" parameterType="com.tianbo.imfClient.model.T_ETL_MESSAGE">
  48 + insert into T_ETL_MESSAGE (FID, OPER, SNTM,
  49 + SNDR, RCVR, SEQN, DDTM,
  50 + TYPE, STYP, TRANSID,
  51 + REMARK, OUTTM, OUTFLAG,
  52 + ETLTIM, ETLFLAG, ERRTM,
  53 + ERRFLAG, ERRLOG, APPID,
  54 + CONTENT)
  55 + values (#{fid,jdbcType=DECIMAL}, #{oper,jdbcType=VARCHAR}, #{sntm,jdbcType=TIMESTAMP},
  56 + #{sndr,jdbcType=VARCHAR}, #{rcvr,jdbcType=VARCHAR}, #{seqn,jdbcType=VARCHAR}, #{ddtm,jdbcType=TIMESTAMP},
  57 + #{type,jdbcType=VARCHAR}, #{styp,jdbcType=VARCHAR}, #{transid,jdbcType=VARCHAR},
  58 + #{remark,jdbcType=NVARCHAR}, #{outtm,jdbcType=TIMESTAMP}, #{outflag,jdbcType=DECIMAL},
  59 + #{etltim,jdbcType=TIMESTAMP}, #{etlflag,jdbcType=DECIMAL}, #{errtm,jdbcType=TIMESTAMP},
  60 + #{errflag,jdbcType=DECIMAL}, #{errlog,jdbcType=NVARCHAR}, #{appid,jdbcType=VARCHAR},
  61 + #{content,jdbcType=CLOB})
  62 + </insert>
  63 + <insert id="insertSelective" parameterType="com.tianbo.imfClient.model.T_ETL_MESSAGE">
  64 + insert into T_ETL_MESSAGE
  65 + <trim prefix="(" suffix=")" suffixOverrides=",">
  66 + <if test="fid != null">
  67 + FID,
  68 + </if>
  69 + <if test="oper != null">
  70 + OPER,
  71 + </if>
  72 + <if test="sntm != null">
  73 + SNTM,
  74 + </if>
  75 + <if test="sndr != null">
  76 + SNDR,
  77 + </if>
  78 + <if test="rcvr != null">
  79 + RCVR,
  80 + </if>
  81 + <if test="seqn != null">
  82 + SEQN,
  83 + </if>
  84 + <if test="ddtm != null">
  85 + DDTM,
  86 + </if>
  87 + <if test="type != null">
  88 + TYPE,
  89 + </if>
  90 + <if test="styp != null">
  91 + STYP,
  92 + </if>
  93 + <if test="transid != null">
  94 + TRANSID,
  95 + </if>
  96 + <if test="remark != null">
  97 + REMARK,
  98 + </if>
  99 + <if test="outtm != null">
  100 + OUTTM,
  101 + </if>
  102 + <if test="outflag != null">
  103 + OUTFLAG,
  104 + </if>
  105 + <if test="etltim != null">
  106 + ETLTIM,
  107 + </if>
  108 + <if test="etlflag != null">
  109 + ETLFLAG,
  110 + </if>
  111 + <if test="errtm != null">
  112 + ERRTM,
  113 + </if>
  114 + <if test="errflag != null">
  115 + ERRFLAG,
  116 + </if>
  117 + <if test="errlog != null">
  118 + ERRLOG,
  119 + </if>
  120 + <if test="appid != null">
  121 + APPID,
  122 + </if>
  123 + <if test="content != null">
  124 + CONTENT,
  125 + </if>
  126 + </trim>
  127 + <trim prefix="values (" suffix=")" suffixOverrides=",">
  128 + <if test="fid != null">
  129 + #{fid,jdbcType=DECIMAL},
  130 + </if>
  131 + <if test="oper != null">
  132 + #{oper,jdbcType=VARCHAR},
  133 + </if>
  134 + <if test="sntm != null">
  135 + #{sntm,jdbcType=TIMESTAMP},
  136 + </if>
  137 + <if test="sndr != null">
  138 + #{sndr,jdbcType=VARCHAR},
  139 + </if>
  140 + <if test="rcvr != null">
  141 + #{rcvr,jdbcType=VARCHAR},
  142 + </if>
  143 + <if test="seqn != null">
  144 + #{seqn,jdbcType=VARCHAR},
  145 + </if>
  146 + <if test="ddtm != null">
  147 + #{ddtm,jdbcType=TIMESTAMP},
  148 + </if>
  149 + <if test="type != null">
  150 + #{type,jdbcType=VARCHAR},
  151 + </if>
  152 + <if test="styp != null">
  153 + #{styp,jdbcType=VARCHAR},
  154 + </if>
  155 + <if test="transid != null">
  156 + #{transid,jdbcType=VARCHAR},
  157 + </if>
  158 + <if test="remark != null">
  159 + #{remark,jdbcType=OTHER},
  160 + </if>
  161 + <if test="outtm != null">
  162 + #{outtm,jdbcType=TIMESTAMP},
  163 + </if>
  164 + <if test="outflag != null">
  165 + #{outflag,jdbcType=DECIMAL},
  166 + </if>
  167 + <if test="etltim != null">
  168 + #{etltim,jdbcType=TIMESTAMP},
  169 + </if>
  170 + <if test="etlflag != null">
  171 + #{etlflag,jdbcType=DECIMAL},
  172 + </if>
  173 + <if test="errtm != null">
  174 + #{errtm,jdbcType=TIMESTAMP},
  175 + </if>
  176 + <if test="errflag != null">
  177 + #{errflag,jdbcType=DECIMAL},
  178 + </if>
  179 + <if test="errlog != null">
  180 + #{errlog,jdbcType=OTHER},
  181 + </if>
  182 + <if test="appid != null">
  183 + #{appid,jdbcType=VARCHAR},
  184 + </if>
  185 + <if test="content != null">
  186 + #{content,jdbcType=CLOB},
  187 + </if>
  188 + </trim>
  189 + </insert>
  190 + <update id="updateByPrimaryKeySelective" parameterType="com.tianbo.imfClient.model.T_ETL_MESSAGE">
  191 + update T_ETL_MESSAGE
  192 + <set>
  193 + <if test="oper != null">
  194 + OPER = #{oper,jdbcType=VARCHAR},
  195 + </if>
  196 + <if test="sntm != null">
  197 + SNTM = #{sntm,jdbcType=TIMESTAMP},
  198 + </if>
  199 + <if test="sndr != null">
  200 + SNDR = #{sndr,jdbcType=VARCHAR},
  201 + </if>
  202 + <if test="rcvr != null">
  203 + RCVR = #{rcvr,jdbcType=VARCHAR},
  204 + </if>
  205 + <if test="seqn != null">
  206 + SEQN = #{seqn,jdbcType=VARCHAR},
  207 + </if>
  208 + <if test="ddtm != null">
  209 + DDTM = #{ddtm,jdbcType=TIMESTAMP},
  210 + </if>
  211 + <if test="type != null">
  212 + TYPE = #{type,jdbcType=VARCHAR},
  213 + </if>
  214 + <if test="styp != null">
  215 + STYP = #{styp,jdbcType=VARCHAR},
  216 + </if>
  217 + <if test="transid != null">
  218 + TRANSID = #{transid,jdbcType=VARCHAR},
  219 + </if>
  220 + <if test="remark != null">
  221 + REMARK = #{remark,jdbcType=OTHER},
  222 + </if>
  223 + <if test="outtm != null">
  224 + OUTTM = #{outtm,jdbcType=TIMESTAMP},
  225 + </if>
  226 + <if test="outflag != null">
  227 + OUTFLAG = #{outflag,jdbcType=DECIMAL},
  228 + </if>
  229 + <if test="etltim != null">
  230 + ETLTIM = #{etltim,jdbcType=TIMESTAMP},
  231 + </if>
  232 + <if test="etlflag != null">
  233 + ETLFLAG = #{etlflag,jdbcType=DECIMAL},
  234 + </if>
  235 + <if test="errtm != null">
  236 + ERRTM = #{errtm,jdbcType=TIMESTAMP},
  237 + </if>
  238 + <if test="errflag != null">
  239 + ERRFLAG = #{errflag,jdbcType=DECIMAL},
  240 + </if>
  241 + <if test="errlog != null">
  242 + ERRLOG = #{errlog,jdbcType=OTHER},
  243 + </if>
  244 + <if test="appid != null">
  245 + APPID = #{appid,jdbcType=VARCHAR},
  246 + </if>
  247 + <if test="content != null">
  248 + CONTENT = #{content,jdbcType=CLOB},
  249 + </if>
  250 + </set>
  251 + where FID = #{fid,jdbcType=DECIMAL}
  252 + </update>
  253 + <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.tianbo.imfClient.model.T_ETL_MESSAGE">
  254 + update T_ETL_MESSAGE
  255 + set OPER = #{oper,jdbcType=VARCHAR},
  256 + SNTM = #{sntm,jdbcType=TIMESTAMP},
  257 + SNDR = #{sndr,jdbcType=VARCHAR},
  258 + RCVR = #{rcvr,jdbcType=VARCHAR},
  259 + SEQN = #{seqn,jdbcType=VARCHAR},
  260 + DDTM = #{ddtm,jdbcType=TIMESTAMP},
  261 + TYPE = #{type,jdbcType=VARCHAR},
  262 + STYP = #{styp,jdbcType=VARCHAR},
  263 + TRANSID = #{transid,jdbcType=VARCHAR},
  264 + REMARK = #{remark,jdbcType=OTHER},
  265 + OUTTM = #{outtm,jdbcType=TIMESTAMP},
  266 + OUTFLAG = #{outflag,jdbcType=DECIMAL},
  267 + ETLTIM = #{etltim,jdbcType=TIMESTAMP},
  268 + ETLFLAG = #{etlflag,jdbcType=DECIMAL},
  269 + ERRTM = #{errtm,jdbcType=TIMESTAMP},
  270 + ERRFLAG = #{errflag,jdbcType=DECIMAL},
  271 + ERRLOG = #{errlog,jdbcType=OTHER},
  272 + APPID = #{appid,jdbcType=VARCHAR},
  273 + CONTENT = #{content,jdbcType=CLOB}
  274 + where FID = #{fid,jdbcType=DECIMAL}
  275 + </update>
  276 + <update id="updateByPrimaryKey" parameterType="com.tianbo.imfClient.model.T_ETL_MESSAGE">
  277 + update T_ETL_MESSAGE
  278 + set OPER = #{oper,jdbcType=VARCHAR},
  279 + SNTM = #{sntm,jdbcType=TIMESTAMP},
  280 + SNDR = #{sndr,jdbcType=VARCHAR},
  281 + RCVR = #{rcvr,jdbcType=VARCHAR},
  282 + SEQN = #{seqn,jdbcType=VARCHAR},
  283 + DDTM = #{ddtm,jdbcType=TIMESTAMP},
  284 + TYPE = #{type,jdbcType=VARCHAR},
  285 + STYP = #{styp,jdbcType=VARCHAR},
  286 + TRANSID = #{transid,jdbcType=VARCHAR},
  287 + REMARK = #{remark,jdbcType=OTHER},
  288 + OUTTM = #{outtm,jdbcType=TIMESTAMP},
  289 + OUTFLAG = #{outflag,jdbcType=DECIMAL},
  290 + ETLTIM = #{etltim,jdbcType=TIMESTAMP},
  291 + ETLFLAG = #{etlflag,jdbcType=DECIMAL},
  292 + ERRTM = #{errtm,jdbcType=TIMESTAMP},
  293 + ERRFLAG = #{errflag,jdbcType=DECIMAL},
  294 + ERRLOG = #{errlog,jdbcType=OTHER},
  295 + APPID = #{appid,jdbcType=VARCHAR}
  296 + where FID = #{fid,jdbcType=DECIMAL}
  297 + </update>
  298 +
  299 +</mapper>
  1 +<!DOCTYPE html>
  2 +<html xmlns:th="http://www.thymeleaf.org">
  3 +<head>
  4 + <meta content="text/html;charset=UTF-8"/>
  5 + <title>登录页面</title>
  6 + <link rel="stylesheet" th:href="@{css/bootstrap.min.css}"/>
  7 + <style type="text/css">
  8 + body {
  9 + padding-top: 50px;
  10 + }
  11 + .starter-template {
  12 + padding: 40px 15px;
  13 + text-align: center;
  14 + }
  15 + </style>
  16 +</head>
  17 +<body>
  18 +
  19 +<nav class="navbar navbar-inverse navbar-fixed-top">
  20 + <div class="container">
  21 + <div class="navbar-header">
  22 + <a class="navbar-brand" href="#">Spring Security演示</a>
  23 + </div>
  24 + <div id="navbar" class="collapse navbar-collapse">
  25 + <ul class="nav navbar-nav">
  26 + <li><a th:href="@{/}"> 首页 </a></li>
  27 +
  28 + </ul>
  29 + </div><!--/.nav-collapse -->
  30 + </div>
  31 +</nav>
  32 +<div class="container">
  33 + welcom
  34 +</div>
  35 +</body>
  36 +</html>
此 diff 太大无法显示。
  1 +<!DOCTYPE html>
  2 +<html xmlns:th="http://www.thymeleaf.org">
  3 +<head>
  4 + <meta content="text/html;charset=UTF-8"/>
  5 + <title>错误页面</title>
  6 + <link rel="stylesheet" th:href="@{css/bootstrap.min.css}"/>
  7 + <style type="text/css">
  8 + body {
  9 + padding-top: 50px;
  10 + }
  11 + .starter-template {
  12 + padding: 40px 15px;
  13 + text-align: center;
  14 + }
  15 + </style>
  16 +</head>
  17 +<body>
  18 +
  19 +
  20 +<div class="container">
  21 +error
  22 +</div>
  23 +</body>
  24 +</html>
  1 +<!DOCTYPE html>
  2 +<html xmlns:th="http://www.thymeleaf.org"
  3 + xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity4">
  4 +<head>
  5 + <meta content="text/html;charset=UTF-8"/>
  6 + <title sec:authentication="name"></title>
  7 + <link rel="stylesheet" th:href="@{css/bootstrap.min.css}" />
  8 + <style type="text/css">
  9 + body {
  10 + padding-top: 50px;
  11 + }
  12 + .starter-template {
  13 + padding: 40px 15px;
  14 + text-align: center;
  15 + }
  16 + </style>
  17 +</head>
  18 +<body>
  19 +
  20 +<div class="container">
  21 +
  22 + imfclient
  23 +
  24 +</div>
  25 +
  26 +
  27 +</body>
  28 +</html>
  1 +<!DOCTYPE html>
  2 +<html>
  3 +<head>
  4 + <meta charset="utf-8">
  5 + <title>tail log</title>
  6 + <script src="/js/jquery.js"></script>
  7 +</head>
  8 +<body>
  9 +<div id="log-container" style="height: 450px; overflow-y: scroll; background: #333; color: #aaa; padding: 10px;">
  10 + <div>
  11 + </div>
  12 +</div>
  13 +</body>
  14 +<script>
  15 + $(document).ready(function() {
  16 + // 指定websocket路径
  17 + var websocket = new WebSocket('ws://localhost:7003/log');
  18 + websocket.onmessage = function(event) {
  19 + // 接收服务端的实时日志并添加到HTML页面中
  20 + $("#log-container div").append(event.data);
  21 + // 滚动条滚动到最低部
  22 + $("#log-container").scrollTop($("#log-container div").height() - $("#log-container").height());
  23 + };
  24 + });
  25 +</script>
  26 +</body>
  27 +</html>