tao.mo

kafka-cndc-server | 修改 | kafka501消息处理

mt
2024年11月1日16:53:57
......@@ -2,9 +2,8 @@ package com.fedex.connect.common.dao.biz;
import com.fedex.connect.common.model.biz.CeInfo;
import com.fedex.connect.common.model.biz.CeInfoExample;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface CeInfoMapper {
long countByExample(CeInfoExample example);
......
......@@ -15,7 +15,7 @@
<result column="MODIFY_TIME" jdbcType="TIMESTAMP" property="modifyTime" />
<result column="MODIFY_USER_ID" jdbcType="NUMERIC" property="modifyUserId" />
<result column="MODIFY_USER_NAME" jdbcType="VARCHAR" property="modifyUserName" />
<result column="COUNT_ORIGIN" jdbcType="VARCHAR" property="countOrigin" />
<result column="ORIGIN_COUNTRY" jdbcType="VARCHAR" property="originCountry" />
<result column="DESTINATION_COUNTRY" jdbcType="VARCHAR" property="destinationCountry" />
<result column="CUSTOMS_CURRENCY" jdbcType="VARCHAR" property="customsCurrency" />
<result column="CUSTOMS_VALUE" jdbcType="NUMERIC" property="customsValue" />
......@@ -99,7 +99,7 @@
<sql id="Base_Column_List">
ID, CONSIGNMENT_CODE, SEND_TIME, SHIP_DATE, SHIPPER_COUNTRY, RECIPIENT_COUNTRY, DEST_IATA_CODE,
CREATE_TIME, CREATE_USER_ID, CREATE_USER_NAME, MODIFY_TIME, MODIFY_USER_ID, MODIFY_USER_NAME,
COUNT_ORIGIN, DESTINATION_COUNTRY, CUSTOMS_CURRENCY, CUSTOMS_VALUE, WEIGHT, WEIGHTUNIT,
ORIGIN_COUNTRY, DESTINATION_COUNTRY, CUSTOMS_CURRENCY, CUSTOMS_VALUE, WEIGHT, WEIGHTUNIT,
SCANDATE, SHIPPER_CONTACT_NAME, SHIPPER_PHONE, SHIPPER_ACCOUNT, SHIPPER_COMPANY,
SHIPPER_ADDR_LINE1, SHIPPER_ADDR_LINE2, SHIPPER_CITY, SHIPPER_EMAIL, RECIPIENT_CONTACT_NAME,
RECIPIENT_PHONE, RECIPIENT_COMPANY, RECIPIENT_ADDR_LINE1, RECIPIENT_ADDR_LINE2, RECIPIENT_ADDR_LINE3,
......@@ -146,7 +146,7 @@
SHIP_DATE, SHIPPER_COUNTRY, RECIPIENT_COUNTRY,
DEST_IATA_CODE, CREATE_TIME, CREATE_USER_ID,
CREATE_USER_NAME, MODIFY_TIME, MODIFY_USER_ID,
MODIFY_USER_NAME, COUNT_ORIGIN, DESTINATION_COUNTRY,
MODIFY_USER_NAME, ORIGIN_COUNTRY, DESTINATION_COUNTRY,
CUSTOMS_CURRENCY, CUSTOMS_VALUE, WEIGHT,
WEIGHTUNIT, SCANDATE, SHIPPER_CONTACT_NAME,
SHIPPER_PHONE, SHIPPER_ACCOUNT, SHIPPER_COMPANY,
......@@ -158,7 +158,7 @@
#{shipDate,jdbcType=TIMESTAMP}, #{shipperCountry,jdbcType=VARCHAR}, #{recipientCountry,jdbcType=VARCHAR},
#{destIataCode,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{createUserId,jdbcType=NUMERIC},
#{createUserName,jdbcType=VARCHAR}, #{modifyTime,jdbcType=TIMESTAMP}, #{modifyUserId,jdbcType=NUMERIC},
#{modifyUserName,jdbcType=VARCHAR}, #{countOrigin,jdbcType=VARCHAR}, #{destinationCountry,jdbcType=VARCHAR},
#{modifyUserName,jdbcType=VARCHAR}, #{originCountry,jdbcType=VARCHAR}, #{destinationCountry,jdbcType=VARCHAR},
#{customsCurrency,jdbcType=VARCHAR}, #{customsValue,jdbcType=NUMERIC}, #{weight,jdbcType=NUMERIC},
#{weightunit,jdbcType=NUMERIC}, #{scandate,jdbcType=TIMESTAMP}, #{shipperContactName,jdbcType=VARCHAR},
#{shipperPhone,jdbcType=VARCHAR}, #{shipperAccount,jdbcType=VARCHAR}, #{shipperCompany,jdbcType=VARCHAR},
......@@ -210,8 +210,8 @@
<if test="modifyUserName != null">
MODIFY_USER_NAME,
</if>
<if test="countOrigin != null">
COUNT_ORIGIN,
<if test="originCountry != null">
ORIGIN_COUNTRY,
</if>
<if test="destinationCountry != null">
DESTINATION_COUNTRY,
......@@ -315,8 +315,8 @@
<if test="modifyUserName != null">
#{modifyUserName,jdbcType=VARCHAR},
</if>
<if test="countOrigin != null">
#{countOrigin,jdbcType=VARCHAR},
<if test="originCountry != null">
#{originCountry,jdbcType=VARCHAR},
</if>
<if test="destinationCountry != null">
#{destinationCountry,jdbcType=VARCHAR},
......@@ -431,8 +431,8 @@
<if test="record.modifyUserName != null">
MODIFY_USER_NAME = #{record.modifyUserName,jdbcType=VARCHAR},
</if>
<if test="record.countOrigin != null">
COUNT_ORIGIN = #{record.countOrigin,jdbcType=VARCHAR},
<if test="record.originCountry != null">
ORIGIN_COUNTRY = #{record.originCountry,jdbcType=VARCHAR},
</if>
<if test="record.destinationCountry != null">
DESTINATION_COUNTRY = #{record.destinationCountry,jdbcType=VARCHAR},
......@@ -517,7 +517,7 @@
MODIFY_TIME = #{record.modifyTime,jdbcType=TIMESTAMP},
MODIFY_USER_ID = #{record.modifyUserId,jdbcType=NUMERIC},
MODIFY_USER_NAME = #{record.modifyUserName,jdbcType=VARCHAR},
COUNT_ORIGIN = #{record.countOrigin,jdbcType=VARCHAR},
ORIGIN_COUNTRY = #{record.originCountry,jdbcType=VARCHAR},
DESTINATION_COUNTRY = #{record.destinationCountry,jdbcType=VARCHAR},
CUSTOMS_CURRENCY = #{record.customsCurrency,jdbcType=VARCHAR},
CUSTOMS_VALUE = #{record.customsValue,jdbcType=NUMERIC},
......@@ -582,8 +582,8 @@
<if test="modifyUserName != null">
MODIFY_USER_NAME = #{modifyUserName,jdbcType=VARCHAR},
</if>
<if test="countOrigin != null">
COUNT_ORIGIN = #{countOrigin,jdbcType=VARCHAR},
<if test="originCountry != null">
ORIGIN_COUNTRY = #{originCountry,jdbcType=VARCHAR},
</if>
<if test="destinationCountry != null">
DESTINATION_COUNTRY = #{destinationCountry,jdbcType=VARCHAR},
......@@ -665,7 +665,7 @@
MODIFY_TIME = #{modifyTime,jdbcType=TIMESTAMP},
MODIFY_USER_ID = #{modifyUserId,jdbcType=NUMERIC},
MODIFY_USER_NAME = #{modifyUserName,jdbcType=VARCHAR},
COUNT_ORIGIN = #{countOrigin,jdbcType=VARCHAR},
ORIGIN_COUNTRY = #{originCountry,jdbcType=VARCHAR},
DESTINATION_COUNTRY = #{destinationCountry,jdbcType=VARCHAR},
CUSTOMS_CURRENCY = #{customsCurrency,jdbcType=VARCHAR},
CUSTOMS_VALUE = #{customsValue,jdbcType=NUMERIC},
......
......@@ -8,7 +8,7 @@
<result column="SHIPPER_COUNTRY" jdbcType="VARCHAR" property="shipperCountry" />
<result column="RECIPIENT_COUNTRY" jdbcType="VARCHAR" property="recipientCountry" />
<result column="DEST_IATA_CODE" jdbcType="VARCHAR" property="destIataCode" />
<result column="COUNT_ORIGIN" jdbcType="VARCHAR" property="countOrigin" />
<result column="ORIGIN_COUNTRY" jdbcType="VARCHAR" property="originCountry" />
<result column="DESTINATION_COUNTRY" jdbcType="VARCHAR" property="destinationCountry" />
<result column="CUSTOMS_CURRENCY" jdbcType="VARCHAR" property="customsCurrency" />
<result column="CUSTOMS_VALUE" jdbcType="NUMERIC" property="customsValue" />
......@@ -104,7 +104,7 @@
</sql>
<sql id="Base_Column_List">
ID, CONSIGNMENT_CODE, SHIP_DATE, SHIPPER_COUNTRY, RECIPIENT_COUNTRY, DEST_IATA_CODE,
COUNT_ORIGIN, DESTINATION_COUNTRY, CUSTOMS_CURRENCY, CUSTOMS_VALUE, WEIGHT, WEIGHTUNIT,
ORIGIN_COUNTRY, DESTINATION_COUNTRY, CUSTOMS_CURRENCY, CUSTOMS_VALUE, WEIGHT, WEIGHTUNIT,
SCANDATE, SHIPPER_CONTACT_NAME, SHIPPER_PHONE, SHIPPER_ACCOUNT, SHIPPER_COMPANY,
SHIPPER_ADDR_LINE1, SHIPPER_ADDR_LINE2, SHIPPER_CITY, SHIPPER_EMAIL, RECIPIENT_CONTACT_NAME,
RECIPIENT_PHONE, RECIPIENT_COMPANY, RECIPIENT_ADDR_LINE1, RECIPIENT_ADDR_LINE2, RECIPIENT_ADDR_LINE3,
......@@ -151,7 +151,7 @@
</selectKey>
insert into T_BIZ_CONSIGNMENT (ID, CONSIGNMENT_CODE, SHIP_DATE,
SHIPPER_COUNTRY, RECIPIENT_COUNTRY, DEST_IATA_CODE,
COUNT_ORIGIN, DESTINATION_COUNTRY, CUSTOMS_CURRENCY,
ORIGIN_COUNTRY, DESTINATION_COUNTRY, CUSTOMS_CURRENCY,
CUSTOMS_VALUE, WEIGHT, WEIGHTUNIT,
SCANDATE, SHIPPER_CONTACT_NAME, SHIPPER_PHONE,
SHIPPER_ACCOUNT, SHIPPER_COMPANY, SHIPPER_ADDR_LINE1,
......@@ -166,7 +166,7 @@
)
values (#{id,jdbcType=NUMERIC}, #{consignmentCode,jdbcType=VARCHAR}, #{shipDate,jdbcType=TIMESTAMP},
#{shipperCountry,jdbcType=VARCHAR}, #{recipientCountry,jdbcType=VARCHAR}, #{destIataCode,jdbcType=VARCHAR},
#{countOrigin,jdbcType=VARCHAR}, #{destinationCountry,jdbcType=VARCHAR}, #{customsCurrency,jdbcType=VARCHAR},
#{originCountry,jdbcType=VARCHAR}, #{destinationCountry,jdbcType=VARCHAR}, #{customsCurrency,jdbcType=VARCHAR},
#{customsValue,jdbcType=NUMERIC}, #{weight,jdbcType=NUMERIC}, #{weightunit,jdbcType=NUMERIC},
#{scandate,jdbcType=TIMESTAMP}, #{shipperContactName,jdbcType=VARCHAR}, #{shipperPhone,jdbcType=VARCHAR},
#{shipperAccount,jdbcType=VARCHAR}, #{shipperCompany,jdbcType=VARCHAR}, #{shipperAddrLine1,jdbcType=VARCHAR},
......@@ -202,8 +202,8 @@
<if test="destIataCode != null">
DEST_IATA_CODE,
</if>
<if test="countOrigin != null">
COUNT_ORIGIN,
<if test="originCountry != null">
ORIGIN_COUNTRY,
</if>
<if test="destinationCountry != null">
DESTINATION_COUNTRY,
......@@ -325,8 +325,8 @@
<if test="destIataCode != null">
#{destIataCode,jdbcType=VARCHAR},
</if>
<if test="countOrigin != null">
#{countOrigin,jdbcType=VARCHAR},
<if test="originCountry != null">
#{originCountry,jdbcType=VARCHAR},
</if>
<if test="destinationCountry != null">
#{destinationCountry,jdbcType=VARCHAR},
......@@ -459,8 +459,8 @@
<if test="record.destIataCode != null">
DEST_IATA_CODE = #{record.destIataCode,jdbcType=VARCHAR},
</if>
<if test="record.countOrigin != null">
COUNT_ORIGIN = #{record.countOrigin,jdbcType=VARCHAR},
<if test="record.originCountry != null">
ORIGIN_COUNTRY = #{record.originCountry,jdbcType=VARCHAR},
</if>
<if test="record.destinationCountry != null">
DESTINATION_COUNTRY = #{record.destinationCountry,jdbcType=VARCHAR},
......@@ -577,7 +577,7 @@
SHIPPER_COUNTRY = #{record.shipperCountry,jdbcType=VARCHAR},
RECIPIENT_COUNTRY = #{record.recipientCountry,jdbcType=VARCHAR},
DEST_IATA_CODE = #{record.destIataCode,jdbcType=VARCHAR},
COUNT_ORIGIN = #{record.countOrigin,jdbcType=VARCHAR},
ORIGIN_COUNTRY = #{record.originCountry,jdbcType=VARCHAR},
DESTINATION_COUNTRY = #{record.destinationCountry,jdbcType=VARCHAR},
CUSTOMS_CURRENCY = #{record.customsCurrency,jdbcType=VARCHAR},
CUSTOMS_VALUE = #{record.customsValue,jdbcType=NUMERIC},
......@@ -634,8 +634,8 @@
<if test="destIataCode != null">
DEST_IATA_CODE = #{destIataCode,jdbcType=VARCHAR},
</if>
<if test="countOrigin != null">
COUNT_ORIGIN = #{countOrigin,jdbcType=VARCHAR},
<if test="originCountry != null">
ORIGIN_COUNTRY = #{originCountry,jdbcType=VARCHAR},
</if>
<if test="destinationCountry != null">
DESTINATION_COUNTRY = #{destinationCountry,jdbcType=VARCHAR},
......@@ -749,7 +749,7 @@
SHIPPER_COUNTRY = #{shipperCountry,jdbcType=VARCHAR},
RECIPIENT_COUNTRY = #{recipientCountry,jdbcType=VARCHAR},
DEST_IATA_CODE = #{destIataCode,jdbcType=VARCHAR},
COUNT_ORIGIN = #{countOrigin,jdbcType=VARCHAR},
ORIGIN_COUNTRY = #{originCountry,jdbcType=VARCHAR},
DESTINATION_COUNTRY = #{destinationCountry,jdbcType=VARCHAR},
CUSTOMS_CURRENCY = #{customsCurrency,jdbcType=VARCHAR},
CUSTOMS_VALUE = #{customsValue,jdbcType=NUMERIC},
......
......@@ -76,7 +76,7 @@ public class CeInfo implements Serializable {
/**
* 原产国全称
*/
private String countOrigin;
private String originCountry;
/**
* 目的国全称
......@@ -289,12 +289,12 @@ public class CeInfo implements Serializable {
this.modifyUserName = modifyUserName == null ? null : modifyUserName.trim();
}
public String getCountOrigin() {
return countOrigin;
public String getOriginCountry() {
return originCountry;
}
public void setCountOrigin(String countOrigin) {
this.countOrigin = countOrigin == null ? null : countOrigin.trim();
public void setOriginCountry(String originCountry) {
this.originCountry = originCountry == null ? null : originCountry.trim();
}
public String getDestinationCountry() {
......@@ -484,7 +484,7 @@ public class CeInfo implements Serializable {
sb.append(", modifyTime=").append(modifyTime);
sb.append(", modifyUserId=").append(modifyUserId);
sb.append(", modifyUserName=").append(modifyUserName);
sb.append(", countOrigin=").append(countOrigin);
sb.append(", originCountry=").append(originCountry);
sb.append(", destinationCountry=").append(destinationCountry);
sb.append(", customsCurrency=").append(customsCurrency);
sb.append(", customsValue=").append(customsValue);
......
......@@ -965,73 +965,73 @@ public class CeInfoExample {
return (Criteria) this;
}
public Criteria andCountOriginIsNull() {
addCriterion("COUNT_ORIGIN is null");
public Criteria andOriginCountryIsNull() {
addCriterion("ORIGIN_COUNTRY is null");
return (Criteria) this;
}
public Criteria andCountOriginIsNotNull() {
addCriterion("COUNT_ORIGIN is not null");
public Criteria andOriginCountryIsNotNull() {
addCriterion("ORIGIN_COUNTRY is not null");
return (Criteria) this;
}
public Criteria andCountOriginEqualTo(String value) {
addCriterion("COUNT_ORIGIN =", value, "countOrigin");
public Criteria andOriginCountryEqualTo(String value) {
addCriterion("ORIGIN_COUNTRY =", value, "originCountry");
return (Criteria) this;
}
public Criteria andCountOriginNotEqualTo(String value) {
addCriterion("COUNT_ORIGIN <>", value, "countOrigin");
public Criteria andOriginCountryNotEqualTo(String value) {
addCriterion("ORIGIN_COUNTRY <>", value, "originCountry");
return (Criteria) this;
}
public Criteria andCountOriginGreaterThan(String value) {
addCriterion("COUNT_ORIGIN >", value, "countOrigin");
public Criteria andOriginCountryGreaterThan(String value) {
addCriterion("ORIGIN_COUNTRY >", value, "originCountry");
return (Criteria) this;
}
public Criteria andCountOriginGreaterThanOrEqualTo(String value) {
addCriterion("COUNT_ORIGIN >=", value, "countOrigin");
public Criteria andOriginCountryGreaterThanOrEqualTo(String value) {
addCriterion("ORIGIN_COUNTRY >=", value, "originCountry");
return (Criteria) this;
}
public Criteria andCountOriginLessThan(String value) {
addCriterion("COUNT_ORIGIN <", value, "countOrigin");
public Criteria andOriginCountryLessThan(String value) {
addCriterion("ORIGIN_COUNTRY <", value, "originCountry");
return (Criteria) this;
}
public Criteria andCountOriginLessThanOrEqualTo(String value) {
addCriterion("COUNT_ORIGIN <=", value, "countOrigin");
public Criteria andOriginCountryLessThanOrEqualTo(String value) {
addCriterion("ORIGIN_COUNTRY <=", value, "originCountry");
return (Criteria) this;
}
public Criteria andCountOriginLike(String value) {
addCriterion("COUNT_ORIGIN like", value, "countOrigin");
public Criteria andOriginCountryLike(String value) {
addCriterion("ORIGIN_COUNTRY like", value, "originCountry");
return (Criteria) this;
}
public Criteria andCountOriginNotLike(String value) {
addCriterion("COUNT_ORIGIN not like", value, "countOrigin");
public Criteria andOriginCountryNotLike(String value) {
addCriterion("ORIGIN_COUNTRY not like", value, "originCountry");
return (Criteria) this;
}
public Criteria andCountOriginIn(List<String> values) {
addCriterion("COUNT_ORIGIN in", values, "countOrigin");
public Criteria andOriginCountryIn(List<String> values) {
addCriterion("ORIGIN_COUNTRY in", values, "originCountry");
return (Criteria) this;
}
public Criteria andCountOriginNotIn(List<String> values) {
addCriterion("COUNT_ORIGIN not in", values, "countOrigin");
public Criteria andOriginCountryNotIn(List<String> values) {
addCriterion("ORIGIN_COUNTRY not in", values, "originCountry");
return (Criteria) this;
}
public Criteria andCountOriginBetween(String value1, String value2) {
addCriterion("COUNT_ORIGIN between", value1, value2, "countOrigin");
public Criteria andOriginCountryBetween(String value1, String value2) {
addCriterion("ORIGIN_COUNTRY between", value1, value2, "originCountry");
return (Criteria) this;
}
public Criteria andCountOriginNotBetween(String value1, String value2) {
addCriterion("COUNT_ORIGIN not between", value1, value2, "countOrigin");
public Criteria andOriginCountryNotBetween(String value1, String value2) {
addCriterion("ORIGIN_COUNTRY not between", value1, value2, "originCountry");
return (Criteria) this;
}
......
......@@ -41,7 +41,7 @@ public class Consignment implements Serializable {
/**
* 原产国全称
*/
private String countOrigin;
private String originCountry;
/**
* 目的国全称
......@@ -263,12 +263,12 @@ public class Consignment implements Serializable {
this.destIataCode = destIataCode == null ? null : destIataCode.trim();
}
public String getCountOrigin() {
return countOrigin;
public String getOriginCountry() {
return originCountry;
}
public void setCountOrigin(String countOrigin) {
this.countOrigin = countOrigin == null ? null : countOrigin.trim();
public void setOriginCountry(String originCountry) {
this.originCountry = originCountry == null ? null : originCountry.trim();
}
public String getDestinationCountry() {
......@@ -555,7 +555,7 @@ public class Consignment implements Serializable {
sb.append(", shipperCountry=").append(shipperCountry);
sb.append(", recipientCountry=").append(recipientCountry);
sb.append(", destIataCode=").append(destIataCode);
sb.append(", countOrigin=").append(countOrigin);
sb.append(", originCountry=").append(originCountry);
sb.append(", destinationCountry=").append(destinationCountry);
sb.append(", customsCurrency=").append(customsCurrency);
sb.append(", customsValue=").append(customsValue);
......
......@@ -525,73 +525,73 @@ public class ConsignmentExample {
return (Criteria) this;
}
public Criteria andCountOriginIsNull() {
addCriterion("COUNT_ORIGIN is null");
public Criteria andOriginCountryIsNull() {
addCriterion("ORIGIN_COUNTRY is null");
return (Criteria) this;
}
public Criteria andCountOriginIsNotNull() {
addCriterion("COUNT_ORIGIN is not null");
public Criteria andOriginCountryIsNotNull() {
addCriterion("ORIGIN_COUNTRY is not null");
return (Criteria) this;
}
public Criteria andCountOriginEqualTo(String value) {
addCriterion("COUNT_ORIGIN =", value, "countOrigin");
public Criteria andOriginCountryEqualTo(String value) {
addCriterion("ORIGIN_COUNTRY =", value, "originCountry");
return (Criteria) this;
}
public Criteria andCountOriginNotEqualTo(String value) {
addCriterion("COUNT_ORIGIN <>", value, "countOrigin");
public Criteria andOriginCountryNotEqualTo(String value) {
addCriterion("ORIGIN_COUNTRY <>", value, "originCountry");
return (Criteria) this;
}
public Criteria andCountOriginGreaterThan(String value) {
addCriterion("COUNT_ORIGIN >", value, "countOrigin");
public Criteria andOriginCountryGreaterThan(String value) {
addCriterion("ORIGIN_COUNTRY >", value, "originCountry");
return (Criteria) this;
}
public Criteria andCountOriginGreaterThanOrEqualTo(String value) {
addCriterion("COUNT_ORIGIN >=", value, "countOrigin");
public Criteria andOriginCountryGreaterThanOrEqualTo(String value) {
addCriterion("ORIGIN_COUNTRY >=", value, "originCountry");
return (Criteria) this;
}
public Criteria andCountOriginLessThan(String value) {
addCriterion("COUNT_ORIGIN <", value, "countOrigin");
public Criteria andOriginCountryLessThan(String value) {
addCriterion("ORIGIN_COUNTRY <", value, "originCountry");
return (Criteria) this;
}
public Criteria andCountOriginLessThanOrEqualTo(String value) {
addCriterion("COUNT_ORIGIN <=", value, "countOrigin");
public Criteria andOriginCountryLessThanOrEqualTo(String value) {
addCriterion("ORIGIN_COUNTRY <=", value, "originCountry");
return (Criteria) this;
}
public Criteria andCountOriginLike(String value) {
addCriterion("COUNT_ORIGIN like", value, "countOrigin");
public Criteria andOriginCountryLike(String value) {
addCriterion("ORIGIN_COUNTRY like", value, "originCountry");
return (Criteria) this;
}
public Criteria andCountOriginNotLike(String value) {
addCriterion("COUNT_ORIGIN not like", value, "countOrigin");
public Criteria andOriginCountryNotLike(String value) {
addCriterion("ORIGIN_COUNTRY not like", value, "originCountry");
return (Criteria) this;
}
public Criteria andCountOriginIn(List<String> values) {
addCriterion("COUNT_ORIGIN in", values, "countOrigin");
public Criteria andOriginCountryIn(List<String> values) {
addCriterion("ORIGIN_COUNTRY in", values, "originCountry");
return (Criteria) this;
}
public Criteria andCountOriginNotIn(List<String> values) {
addCriterion("COUNT_ORIGIN not in", values, "countOrigin");
public Criteria andOriginCountryNotIn(List<String> values) {
addCriterion("ORIGIN_COUNTRY not in", values, "originCountry");
return (Criteria) this;
}
public Criteria andCountOriginBetween(String value1, String value2) {
addCriterion("COUNT_ORIGIN between", value1, value2, "countOrigin");
public Criteria andOriginCountryBetween(String value1, String value2) {
addCriterion("ORIGIN_COUNTRY between", value1, value2, "originCountry");
return (Criteria) this;
}
public Criteria andCountOriginNotBetween(String value1, String value2) {
addCriterion("COUNT_ORIGIN not between", value1, value2, "countOrigin");
public Criteria andOriginCountryNotBetween(String value1, String value2) {
addCriterion("ORIGIN_COUNTRY not between", value1, value2, "originCountry");
return (Criteria) this;
}
......
......@@ -40,7 +40,7 @@
sys:系统 系统相关表,例如kafka表
log: 日志 日志记录表,例如邮件发送日志表
-->
<javaModelGenerator targetPackage="com.fedex.connect.common.model.sys" targetProject="src/main/java">
<javaModelGenerator targetPackage="com.fedex.connect.common.model.biz" targetProject="src/main/java">
<!---enableSubPackages:如果true,MBG会根据catalog和schema来生成子包。如果false就会直接用targetPackage属性-->
<property name="enableSubPackages" value="false"/>
<!--该属性只对MyBatis3有效,如果true就会使用构造方法入参,如果false就会使用setter方式。默认为false-->
......@@ -52,13 +52,13 @@
</javaModelGenerator>
<!-- 生成映射文件*.xml的位置-->
<sqlMapGenerator targetPackage="mapper.sys" targetProject="src/main/java/com/fedex/connect/common">
<sqlMapGenerator targetPackage="mapper.biz" targetProject="src/main/java/com/fedex/connect/common">
<!--如果true,MBG会根据catalog和schema来生成子包。如果false就会直接用targetPackage属性。默认为false-->
<property name="enableSubPackages" value="false"/>
</sqlMapGenerator>
<!-- 生成DAO的包名和位置 -->
<javaClientGenerator type="XMLMAPPER" targetPackage="com.fedex.connect.common.dao.sys" targetProject="src/main/java">
<javaClientGenerator type="XMLMAPPER" targetPackage="com.fedex.connect.common.dao.biz" targetProject="src/main/java">
<!--如果true,MBG会根据catalog和schema来生成子包。如果false就会直接用targetPackage属性。默认为false-->
<property name="enableSubPackages" value="false"/>
</javaClientGenerator>
......@@ -91,18 +91,18 @@
<!-- selectByExampleQueryId="true">-->
<!-- <generatedKey column="ID" sqlStatement="SELECT SEQ_T_BIZ_ATTACHMENT.NEXTVAL FROM DUAL" />-->
<!-- </table>-->
<!-- <table schema="ICLEARIMP" tableName="T_BIZ_CE_INFO" domainObjectName="CeInfo"-->
<!-- enableCountByExample="true" enableUpdateByExample="true"-->
<!-- enableDeleteByExample="true" enableSelectByExample="true"-->
<!-- selectByExampleQueryId="true">-->
<!-- <generatedKey column="ID" sqlStatement="SELECT SEQ_T_BIZ_CE_INFO.NEXTVAL FROM DUAL" />-->
<!-- </table>-->
<!-- <table tableName="T_BIZ_CONSIGNMENT" domainObjectName="Consignment"-->
<!-- enableCountByExample="true" enableUpdateByExample="true"-->
<!-- enableDeleteByExample="true" enableSelectByExample="true"-->
<!-- selectByExampleQueryId="true">-->
<!-- <generatedKey column="ID" sqlStatement="SELECT SEQ_T_BIZ_CONSIGNMENT.NEXTVAL FROM DUAL" />-->
<!-- </table>-->
<table schema="ICLEARIMP" tableName="T_BIZ_CE_INFO" domainObjectName="CeInfo"
enableCountByExample="true" enableUpdateByExample="true"
enableDeleteByExample="true" enableSelectByExample="true"
selectByExampleQueryId="true">
<generatedKey column="ID" sqlStatement="SELECT SEQ_T_BIZ_CE_INFO.NEXTVAL FROM DUAL" />
</table>
<table tableName="T_BIZ_CONSIGNMENT" domainObjectName="Consignment"
enableCountByExample="true" enableUpdateByExample="true"
enableDeleteByExample="true" enableSelectByExample="true"
selectByExampleQueryId="true">
<generatedKey column="ID" sqlStatement="SELECT SEQ_T_BIZ_CONSIGNMENT.NEXTVAL FROM DUAL" />
</table>
<!-- <table tableName="T_BIZ_EMAIL" domainObjectName="Email"-->
<!-- enableCountByExample="true" enableUpdateByExample="true"-->
<!-- enableDeleteByExample="true" enableSelectByExample="true"-->
......@@ -173,12 +173,12 @@
<!-- selectByExampleQueryId="true">-->
<!-- <generatedKey column="ID" sqlStatement="SELECT SEQ_T_SYS_ROLE_PRIVILEGE.NEXTVAL FROM DUAL" />-->
<!-- </table>-->
<table schema="ICLEARIMP" tableName="T_SYS_USER" domainObjectName="User"
enableCountByExample="true" enableUpdateByExample="true"
enableDeleteByExample="true" enableSelectByExample="true"
selectByExampleQueryId="true">
<generatedKey column="ID" sqlStatement="SELECT SEQ_T_SYS_USER.NEXTVAL FROM DUAL" />
</table>
<!-- <table schema="ICLEARIMP" tableName="T_SYS_USER" domainObjectName="User"-->
<!-- enableCountByExample="true" enableUpdateByExample="true"-->
<!-- enableDeleteByExample="true" enableSelectByExample="true"-->
<!-- selectByExampleQueryId="true">-->
<!-- <generatedKey column="ID" sqlStatement="SELECT SEQ_T_SYS_USER.NEXTVAL FROM DUAL" />-->
<!-- </table>-->
<!-- <table schema="ICLEARIMP" tableName="T_SYS_USER_ROLE" domainObjectName="UserRole"-->
<!-- enableCountByExample="true" enableUpdateByExample="true"-->
<!-- enableDeleteByExample="true" enableSelectByExample="true"-->
......
package com.fedex.connect.common.dependencies.contants;
/**
* @Author mt
* @Description 类说明
* @Date 2024/11/1
*/
public interface SystemDefaultUserConstants {
/**
* @Author mt
* @Description 系统用户
* @Date 2024/11/1
*/
interface SYSTEM_USER_KEYS{
//系统用户ID
Long ID = 0L;
//登录账号
String LOGIN_NAME = "system";
//用户姓名
String USER_NAME = "system";
}
}
package com.fedex.connect.common.dependencies.util;
public class TableColumnInitUtil {
}
......@@ -11,8 +11,10 @@ import com.fedex.connect.kafka.data.dto.dm.dm501.Dm501Data;
import com.fedex.connect.kafka.service.IDm501Service;
import com.fedex.connect.kafka.service.base.BaseService;
import com.fedex.connect.kafka.util.Dm501Util;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
import java.util.Objects;
......@@ -22,6 +24,7 @@ import java.util.Objects;
* @Description dm501消息处理
* @Date 2024/4/19
*/
@Slf4j
@Service
public class Dm501ServiceImpl extends BaseService implements IDm501Service {
......@@ -43,13 +46,19 @@ public class Dm501ServiceImpl extends BaseService implements IDm501Service {
Dm501Data data = JSONObject.parseObject(kafKaTemporaryStorage.getData(), Dm501Data.class);
List<Dm501Consignments> dm501Consignments = data.getConsignments();
//遍历dm501
Utils.listOf(dm501Consignments).stream().filter(Objects::nonNull).forEach(consignment -> {
CeInfo bizCeInfo = ceInfoRepository.findBizCeInfoContainsByConsignmentCode(consignment.getTrackingNumber());
//将运单号保存
processResults.setConsignmentCode(consignment.getTrackingNumber());
//该运单号不存在创建时间为1个月内CE数据
if(Objects.isNull(bizCeInfo)){
CeInfo ceInfo = dm501Util.generateCeInfo(kafKaTemporaryStorage.getSendTime(),consignment);
Utils.listOf(dm501Consignments).stream().filter(Objects::nonNull).forEach(consignment501 -> {
try {
CeInfo bizCeInfo = ceInfoRepository.findBizCeInfoContainsByConsignmentCode(consignment501.getTrackingNumber());
//将运单号保存
processResults.setConsignmentCode(consignment501.getTrackingNumber());
//该运单号不存在创建时间为1个月内CE数据
if (Objects.isNull(bizCeInfo)) {
CeInfo ceInfo = dm501Util.generateCeInfo(consignment501,kafKaTemporaryStorage.getSendTime());
Consignment consignment = dm501Util.generateConsignment(ceInfo);
this.saveCeInfoAndConsignment(ceInfo,consignment);
}
}catch(Exception ex){
log.error("DM501消息处理异常:{}", ex.getMessage(),ex);
}
});
return processResults;
......@@ -63,7 +72,9 @@ public class Dm501ServiceImpl extends BaseService implements IDm501Service {
* @param consignment
* @return void
*/
@Transactional(rollbackFor = Exception.class)
public void saveCeInfoAndConsignment(CeInfo ceInfo, Consignment consignment){
consignmentRepository.save(consignment);
ceInfoRepository.save(ceInfo);
}
}
\ No newline at end of file
......
package com.fedex.connect.kafka.util;
import com.fedex.connect.common.dependencies.contants.SystemDefaultUserConstants;
import com.fedex.connect.common.dependencies.util.DateUtil;
import com.fedex.connect.common.model.biz.CeInfo;
import com.fedex.connect.common.model.biz.Consignment;
import com.fedex.connect.kafka.constants.Constant;
import com.fedex.connect.kafka.data.dto.dm.dm501.Dm501ConAddresses;
import com.fedex.connect.kafka.data.dto.dm.dm501.Dm501Consignments;
......@@ -21,11 +23,8 @@ public class Dm501Util {
* @param dm501Consignment
* @return com.fedex.connect.common.model.biz.CeInfo
*/
public CeInfo generateCeInfo(Date sendTime, Dm501Consignments dm501Consignment){
public CeInfo generateCeInfo(Dm501Consignments dm501Consignment,Date sendTime){
CeInfo ceInfo = new CeInfo();
ceInfo.setConsignmentCode(dm501Consignment.getTrackingNumber());
ceInfo.setCreateTime(new Date());
ceInfo.setDestIataCode(dm501Consignment.getDestIataCode());
//地址信息
List<Dm501ConAddresses> addressList = dm501Consignment.getAddresses();
//没有地址信息,不需要处理,不进CE业务表
......@@ -40,24 +39,86 @@ public class Dm501Util {
if(shipperAddress == null || recipientAddress == null){
return null;
}
//发件人国家
String shipperCountry = shipperAddress.getCountry();
//始发国(二字码)
ceInfo.setShipperCountry(shipperCountry);
//收件人国家
String recipientCountry = recipientAddress.getCountry();
//目的国家二字码
ceInfo.setRecipientCountry(recipientCountry);
//收件人国家不为CN,不需要处理,不进CE业务表
if(StringUtils.isEmpty(recipientCountry) || !recipientCountry.trim().equals(Constant.CE_INFO_KEYS.CN)){
return null;
}
/**
* 报文主体处理
*/
this.generateCeInfoBody(ceInfo,dm501Consignment,sendTime);
return ceInfo;
}
/**
* @Author mt
* @Description 报文主体处理
* @Date 2024/11/1
* @param
* @return void
*/
private void generateCeInfoBody(CeInfo ceInfo,Dm501Consignments dm501Consignment,Date sendTime){
ceInfo.setConsignmentCode(dm501Consignment.getTrackingNumber());
ceInfo.setDestIataCode(dm501Consignment.getDestIataCode());
//扫描状态日期
ceInfo.setScandate(dm501Consignment.getScanDate());
//DM发送时间
ceInfo.setSendTime(sendTime);
//预计取件时间
String shipDate = dm501Consignment.getShipDate();
if(StringUtils.isNotEmpty(shipDate)){
ceInfo.setShipDate(DateUtil.parse(shipDate));
}
return ceInfo;
ceInfo.setCreateTime(new Date());
ceInfo.setCreateUserId(SystemDefaultUserConstants.SYSTEM_USER_KEYS.ID);
// ceInfo.setCreateUserName();
}
/**
* @Author mt
* @Description 发件人信息处理
* @Date 2024/11/1
* @param
* @return void
*/
private void generateCeInfoShipper(){
//发件人国家
// String shipperCountry = shipperAddress.getCountry();
// //始发国(二字码)
// ceInfo.setShipperCountry(shipperCountry);
//原产国全称
// ceInfo.setOriginCountry();
}
/**
* @Author mt
* @Description 收件人信息处理
* @Date 2024/11/1
* @param
* @return void
*/
private void generateCeInfoRecipient(){
//收件人国家
// String recipientCountry = recipientAddress.getCountry();
// //目的国家二字码
// ceInfo.setRecipientCountry(recipientCountry);
//目的国全称
// ceInfo.setDestinationCountry();
}
/**
* @Author mt
* @Description 运单信息处理
* @Date 2024/11/1
* @param ceInfo
* @return com.fedex.connect.common.model.biz.Consignment
*/
public Consignment generateConsignment(CeInfo ceInfo) {
return null;
}
/**
......