作者 朱兆平

合并前

正在显示 27 个修改的文件 包含 66 行增加68 行删除
... ... @@ -51,7 +51,7 @@ spring:
# username: root
# password:
# driver-class-name: com.mysql.jdbc.Driver
max-idle: 10
max-idle: 20
max-wait: 10000
min-idle: 5
initial-size: 5
... ... @@ -59,7 +59,8 @@ spring:
druid:
initial-size: 1
min-idle: 1
max-active: 20
#最大并发连接数
max-active: 40
#获取连接等待超时时间
max-wait: 60000
#一个连接在池中最小生存的时间
... ...
... ... @@ -174,7 +174,7 @@
<springProfile name="dev">
<logger name="org.springframework.boot" level="trace"/>
<logger name="org.apache.tomcat" level="info" />
<logger name="com.tianbo.imfClient.dao" level="DEBUG" />
<logger name="com.tianbo.analysis.dao" level="DEBUG" />
<root level="INFO">
<appender-ref ref="CONSOLE" />
<!--<appender-ref ref="DEBUG_FILE" />-->
... ... @@ -187,7 +187,7 @@
<!--生产环境:输出到文件-->
<springProfile name="pro">
<logger name="org.springframework.boot" level="trace"/>
<logger name="com.tianbo.imfClient.dao" level="DEBUG" />
<logger name="com.tianbo.analysis.dao" level="DEBUG" />
<root level="info">
<appender-ref ref="CONSOLE" />
<appender-ref ref="DEBUG_FILE" />
... ...
... ... @@ -11,10 +11,10 @@
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.tianbo</groupId>
<artifactId>imfClient</artifactId>
<artifactId>analysis</artifactId>
<version>1.0-SNAPSHOT</version>
<name>imfClient</name>
<description>warehouse for Spring Boot</description>
<name>customAnalysis</name>
<description>Analysis waybill recept</description>
<properties>
<druid.version>1.1.9</druid.version>
<spring-cloud.version>Greenwich.BUILD-SNAPSHOT</spring-cloud.version>
... ...
... ... @@ -2,7 +2,7 @@
* @author mrz
* @email 17966059@qq.com
*/
package com.tianbo.imfClient;
package com.tianbo.analysis;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
... ... @@ -12,7 +12,6 @@ import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import org.springframework.web.client.RestTemplate;
... ... @@ -20,8 +19,8 @@ import org.springframework.web.client.RestTemplate;
//@EnableScheduling
@EnableDiscoveryClient
@EnableTransactionManagement
@MapperScan("com.tianbo.imfClient.dao")
@ComponentScan({"com.tianbo.imfClient"})
@MapperScan("com.tianbo.analysis.dao")
@ComponentScan({"com.tianbo.analysis"})
public class ImfClientApplication {
public static void main(String[] args) {
... ...
package com.tianbo.imfClient.config;
package com.tianbo.analysis.config;
import org.springframework.boot.web.server.ErrorPage;
import org.springframework.boot.web.server.ErrorPageRegistrar;
... ...
package com.tianbo.imfClient.config;
package com.tianbo.analysis.config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
... ...
package com.tianbo.imfClient.controller;
package com.tianbo.analysis.controller;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
... ...
package com.tianbo.imfClient.controller;
package com.tianbo.analysis.controller;
import com.tianbo.imfClient.dao.CUSTOMSMESSAGEMapper;
import com.tianbo.imfClient.dao.ORIGINMANIFESTMASTERMapper;
import com.tianbo.imfClient.model.CUSTOMSMESSAGE;
import com.tianbo.imfClient.model.ResultJson;
import com.tianbo.analysis.dao.CUSTOMSMESSAGEMapper;
import com.tianbo.analysis.dao.ORIGINMANIFESTMASTERMapper;
import com.tianbo.analysis.model.CUSTOMSMESSAGE;
import com.tianbo.analysis.model.ResultJson;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
... ...
package com.tianbo.imfClient.controller;
package com.tianbo.analysis.controller;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
@Controller
public class ImfLogController {
... ...
package com.tianbo.imfClient.controller;
package com.tianbo.analysis.controller;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
@Controller
... ...
package com.tianbo.imfClient.controller;
package com.tianbo.analysis.controller;
import com.tianbo.imfClient.handle.IO_Log_Handle;
import com.tianbo.analysis.handle.IO_Log_Handle;
import org.springframework.stereotype.Component;
import javax.websocket.OnClose;
... ...
package com.tianbo.imfClient.dao;
package com.tianbo.analysis.dao;
import com.tianbo.imfClient.model.CUSTOMSMESSAGE;
import com.tianbo.imfClient.model.CUSTOMSMESSAGEWithBLOBs;
import com.tianbo.analysis.model.CUSTOMSMESSAGE;
import com.tianbo.analysis.model.CUSTOMSMESSAGEWithBLOBs;
import java.util.List;
... ...
package com.tianbo.imfClient.dao;
package com.tianbo.analysis.dao;
import com.tianbo.imfClient.model.ORIGINMANIFESTMASTER;
import com.tianbo.analysis.model.ORIGINMANIFESTMASTER;
import java.util.HashMap;
... ...
package com.tianbo.imfClient.dao;
package com.tianbo.analysis.dao;
import com.tianbo.imfClient.model.T_ETL_MESSAGE;
import com.tianbo.analysis.model.T_ETL_MESSAGE;
import java.math.BigDecimal;
... ...
package com.tianbo.imfClient.handle;
package com.tianbo.analysis.handle;
import com.tianbo.imfClient.model.T_ETL_MESSAGE;
import com.tianbo.imfClient.service.T_ETL_MESSAGEService;
import com.tianbo.analysis.model.T_ETL_MESSAGE;
import com.tianbo.analysis.service.T_ETL_MESSAGEService;
import com.tianbo.util.Date.DateUtil;
import com.tianbo.util.IO.FileTool;
import com.tianbo.util.XML.XML2ENTITY;
... ...
package com.tianbo.imfClient.handle;
package com.tianbo.analysis.handle;
import javax.websocket.Session;
import java.io.BufferedReader;
... ...
package com.tianbo.imfClient.model;
package com.tianbo.analysis.model;
import java.math.BigDecimal;
import java.util.Date;
... ...
package com.tianbo.imfClient.model;
package com.tianbo.analysis.model;
public class CUSTOMSMESSAGEWithBLOBs extends CUSTOMSMESSAGE {
private String messagecontent;
... ...
package com.tianbo.imfClient.model;
package com.tianbo.analysis.model;
import lombok.Data;
... ...
package com.tianbo.imfClient.model;
package com.tianbo.analysis.model;
import java.math.BigDecimal;
import java.util.Date;
... ...
package com.tianbo.imfClient.service;
package com.tianbo.analysis.service;
import com.tianbo.imfClient.model.T_ETL_MESSAGE;
import com.tianbo.analysis.model.T_ETL_MESSAGE;
public interface T_ETL_MESSAGEService {
int insert(T_ETL_MESSAGE record);
... ...
package com.tianbo.imfClient.service.imp;
package com.tianbo.analysis.service.imp;
import com.tianbo.imfClient.dao.T_ETL_MESSAGEMapper;
import com.tianbo.imfClient.model.T_ETL_MESSAGE;
import com.tianbo.imfClient.service.T_ETL_MESSAGEService;
import com.tianbo.analysis.dao.T_ETL_MESSAGEMapper;
import com.tianbo.analysis.model.T_ETL_MESSAGE;
import com.tianbo.analysis.service.T_ETL_MESSAGEService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
... ...
... ... @@ -32,7 +32,7 @@
<property name="forceBigDecimals" value="false"/>
</javaTypeResolver>
<!-- 生成模型的包名和位置-->
<javaModelGenerator targetPackage="com.tianbo.imfClient.model" targetProject="src/main/java">
<javaModelGenerator targetPackage="com.tianbo.analysis.model" targetProject="src/main/java">
<property name="enableSubPackages" value="true"/>
<property name="trimStrings" value="true"/>
</javaModelGenerator>
... ... @@ -41,7 +41,7 @@
<property name="enableSubPackages" value="true"/>
</sqlMapGenerator>
<!-- 生成DAO的包名和位置-->
<javaClientGenerator type="XMLMAPPER" targetPackage="com.tianbo.imfClient.dao" targetProject="src/main/java">
<javaClientGenerator type="XMLMAPPER" targetPackage="com.tianbo.analysis.dao" targetProject="src/main/java">
<property name="enableSubPackages" value="true"/>
</javaClientGenerator>
<!-- 要生成的表 tableName是数据库中的表名或视图名 domainObjectName是实体类名-->
... ...
<?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.tianbo.imfClient.dao.CUSTOMSMESSAGEMapper" >
<resultMap id="BaseResultMap" type="com.tianbo.imfClient.model.CUSTOMSMESSAGE" >
<mapper namespace="com.tianbo.analysis.dao.CUSTOMSMESSAGEMapper" >
<resultMap id="BaseResultMap" type="com.tianbo.analysis.model.CUSTOMSMESSAGE" >
<result column="AUTOID" property="autoid" jdbcType="VARCHAR" />
<result column="MESSAGEID" property="messageid" jdbcType="VARCHAR" />
<result column="MESSAGETYPE" property="messagetype" jdbcType="VARCHAR" />
... ... @@ -21,7 +21,7 @@
<result column="RESPONSETEXT" property="responsetext" jdbcType="VARCHAR" />
<result column="CREATETIME" property="createtime" jdbcType="TIMESTAMP" />
</resultMap>
<resultMap id="ResultMapWithBLOBs" type="com.tianbo.imfClient.model.CUSTOMSMESSAGEWithBLOBs" extends="BaseResultMap" >
<resultMap id="ResultMapWithBLOBs" type="com.tianbo.analysis.model.CUSTOMSMESSAGEWithBLOBs" extends="BaseResultMap" >
<result column="MESSAGECONTENT" property="messagecontent" jdbcType="CLOB" />
<result column="RECEIVECONTENT" property="receivecontent" jdbcType="CLOB" />
</resultMap>
... ... @@ -31,7 +31,7 @@
<sql id="Response_Base">
MESSAGETYPE, WAYBILLNOMASTER, WAYBILLNOSECONDARY, RESPONSETEXT
</sql>
<select id="selectCustomResponse" parameterType="java.lang.String" resultType="com.tianbo.imfClient.model.CUSTOMSMESSAGE">
<select id="selectCustomResponse" parameterType="java.lang.String" resultType="com.tianbo.analysis.model.CUSTOMSMESSAGE">
SELECT
<include refid="Response_Base" />
FROM
... ... @@ -40,7 +40,7 @@
WAYBILLNOMASTER = #{waybillnomaster,jdbcType=VARCHAR}
ORDER BY MESSAGETYPE
</select>
<select id="selectCustomId" parameterType="java.lang.String" resultType="com.tianbo.imfClient.model.CUSTOMSMESSAGE">
<select id="selectCustomId" parameterType="java.lang.String" resultType="com.tianbo.analysis.model.CUSTOMSMESSAGE">
SELECT
MESSAGEID,
<include refid="Response_Base" />
... ... @@ -50,7 +50,7 @@
WAYBILLNOMASTER = #{waybillnomaster,jdbcType=VARCHAR}
ORDER BY MESSAGETYPE
</select>
<insert id="insert" parameterType="com.tianbo.imfClient.model.CUSTOMSMESSAGEWithBLOBs" >
<insert id="insert" parameterType="com.tianbo.analysis.model.CUSTOMSMESSAGEWithBLOBs" >
insert into CUSTOMSMESSAGE (AUTOID, MESSAGEID, MESSAGETYPE,
MESSAGESTATUS, SENDTIME, RECEIVETIME,
OBJECTID, FLIGHTNO, FLIGHTDATE,
... ... @@ -66,7 +66,7 @@
#{responsecode,jdbcType=VARCHAR}, #{responsetext,jdbcType=VARCHAR}, #{createtime,jdbcType=TIMESTAMP},
#{messagecontent,jdbcType=CLOB}, #{receivecontent,jdbcType=CLOB})
</insert>
<insert id="insertSelective" parameterType="com.tianbo.imfClient.model.CUSTOMSMESSAGEWithBLOBs" >
<insert id="insertSelective" parameterType="com.tianbo.analysis.model.CUSTOMSMESSAGEWithBLOBs" >
insert into CUSTOMSMESSAGE
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="autoid != null" >
... ...
<?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.tianbo.imfClient.dao.ORIGINMANIFESTMASTERMapper" >
<resultMap id="BaseResultMap" type="com.tianbo.imfClient.model.ORIGINMANIFESTMASTER" >
<mapper namespace="com.tianbo.analysis.dao.ORIGINMANIFESTMASTERMapper" >
<resultMap id="BaseResultMap" type="com.tianbo.analysis.model.ORIGINMANIFESTMASTER" >
<result column="AUTOID" property="autoid" jdbcType="VARCHAR" />
<result column="WAYBILLNOMASTER" property="waybillnomaster" jdbcType="VARCHAR" />
<result column="SEGMENT" property="segment" jdbcType="VARCHAR" />
... ... @@ -47,7 +47,7 @@
<result column="SPECIFIC_CONSIGNEE_PHONE" property="specificConsigneePhone" jdbcType="VARCHAR" />
<result column="CONSIGNEE_PHONE" property="consigneePhone" jdbcType="VARCHAR" />
</resultMap>
<insert id="insert" parameterType="com.tianbo.imfClient.model.ORIGINMANIFESTMASTER" >
<insert id="insert" parameterType="com.tianbo.analysis.model.ORIGINMANIFESTMASTER" >
insert into ORIGINMANIFESTMASTER (AUTOID, WAYBILLNOMASTER, SEGMENT,
ORIGINATINGSTATION, DESTINATIONSTATION,
TOTALWEIGHT, TOTALPIECE, MANIFESTTOTALPIECE,
... ... @@ -81,7 +81,7 @@
#{specificConsigneename,jdbcType=VARCHAR}, #{specificConsigneePhone,jdbcType=VARCHAR},
#{consigneePhone,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.tianbo.imfClient.model.ORIGINMANIFESTMASTER" >
<insert id="insertSelective" parameterType="com.tianbo.analysis.model.ORIGINMANIFESTMASTER" >
insert into ORIGINMANIFESTMASTER
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="autoid != null" >
... ...
<?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.tianbo.imfClient.dao.T_ETL_MESSAGEMapper">
<resultMap id="BaseResultMap" type="com.tianbo.imfClient.model.T_ETL_MESSAGE">
<mapper namespace="com.tianbo.analysis.dao.T_ETL_MESSAGEMapper">
<resultMap id="BaseResultMap" type="com.tianbo.analysis.model.T_ETL_MESSAGE">
<id column="FID" jdbcType="DECIMAL" property="fid" />
<result column="OPER" jdbcType="VARCHAR" property="oper" />
<result column="SNTM" jdbcType="TIMESTAMP" property="sntm" />
... ... @@ -22,7 +22,7 @@
<result column="ERRLOG" jdbcType="NVARCHAR" property="errlog" />
<result column="APPID" jdbcType="VARCHAR" property="appid" />
</resultMap>
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.tianbo.imfClient.model.T_ETL_MESSAGE">
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.tianbo.analysis.model.T_ETL_MESSAGE">
<result column="CONTENT" jdbcType="CLOB" property="content" />
</resultMap>
<sql id="Base_Column_List">
... ... @@ -44,7 +44,7 @@
delete from T_ETL_MESSAGE
where FID = #{fid,jdbcType=DECIMAL}
</delete>
<insert id="insert" parameterType="com.tianbo.imfClient.model.T_ETL_MESSAGE">
<insert id="insert" parameterType="com.tianbo.analysis.model.T_ETL_MESSAGE">
insert into T_ETL_MESSAGE (FID, OPER, SNTM,
SNDR, RCVR, SEQN, DDTM,
TYPE, STYP, TRANSID,
... ... @@ -60,7 +60,7 @@
#{errflag,jdbcType=DECIMAL}, #{errlog,jdbcType=NVARCHAR}, #{appid,jdbcType=VARCHAR},
#{content,jdbcType=CLOB})
</insert>
<insert id="insertSelective" parameterType="com.tianbo.imfClient.model.T_ETL_MESSAGE">
<insert id="insertSelective" parameterType="com.tianbo.analysis.model.T_ETL_MESSAGE">
insert into T_ETL_MESSAGE
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="fid != null">
... ... @@ -187,7 +187,7 @@
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.tianbo.imfClient.model.T_ETL_MESSAGE">
<update id="updateByPrimaryKeySelective" parameterType="com.tianbo.analysis.model.T_ETL_MESSAGE">
update T_ETL_MESSAGE
<set>
<if test="oper != null">
... ... @@ -250,7 +250,7 @@
</set>
where FID = #{fid,jdbcType=DECIMAL}
</update>
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.tianbo.imfClient.model.T_ETL_MESSAGE">
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.tianbo.analysis.model.T_ETL_MESSAGE">
update T_ETL_MESSAGE
set OPER = #{oper,jdbcType=VARCHAR},
SNTM = #{sntm,jdbcType=TIMESTAMP},
... ... @@ -273,7 +273,7 @@
CONTENT = #{content,jdbcType=CLOB}
where FID = #{fid,jdbcType=DECIMAL}
</update>
<update id="updateByPrimaryKey" parameterType="com.tianbo.imfClient.model.T_ETL_MESSAGE">
<update id="updateByPrimaryKey" parameterType="com.tianbo.analysis.model.T_ETL_MESSAGE">
update T_ETL_MESSAGE
set OPER = #{oper,jdbcType=VARCHAR},
SNTM = #{sntm,jdbcType=TIMESTAMP},
... ...