作者 朱兆平

写入数据仓库T_ELT_MESSAGE表原始报文,并本地存储接收报文,并记录入库异常的报文

/target/
!.mvn/wrapper/maven-wrapper.jar
/logs/
/out/
.mvn
### STS ###
.apt_generated
... ...
... ... @@ -6,9 +6,12 @@ loginpass = KKW1
readDirectory = /Users/mrz/Downloads/3.CV972/1.CV报文
#接收存储报文目录
bakDirectory = xmlFromImf
#程序入库出错备份报文目录
errBakDirectory = xmlerr
#IMF MEAT报头配置
RCVR=
TYPE=KAKO
STYP=CARM
\ No newline at end of file
STYP=CARM
AppId=warehouse
\ No newline at end of file
... ...
/**
* @author mrz
* @email 17966059@qq.com
*/
package com.tianbo.warehouse;
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.context.annotation.ComponentScan;
import org.springframework.scheduling.annotation.EnableScheduling;
@SpringBootApplication
@EnableScheduling
@EnableEurekaClient
@MapperScan("com.tianbo.warehouse.dao")
public class WarehouseApplication {
public static void main(String[] args) {
... ...
package com.tianbo.warehouse.dao;
import com.tianbo.warehouse.model.T_ETL_MESSAGE;
import java.math.BigDecimal;
public interface T_ETL_MESSAGEMapper {
int deleteByPrimaryKey(BigDecimal fid);
int insert(T_ETL_MESSAGE record);
int insertSelective(T_ETL_MESSAGE record);
T_ETL_MESSAGE selectByPrimaryKey(BigDecimal fid);
int updateByPrimaryKeySelective(T_ETL_MESSAGE record);
int updateByPrimaryKeyWithBLOBs(T_ETL_MESSAGE record);
int updateByPrimaryKey(T_ETL_MESSAGE record);
}
\ No newline at end of file
... ...
package com.tianbo.warehouse.handle;
import com.tianbo.warehouse.model.T_ETL_MESSAGE;
import com.tianbo.warehouse.service.T_ETL_MESSAGEService;
import com.tianbo.warehouse.util.Date.DateUtil;
import com.tianbo.warehouse.util.IO.FileTool;
import com.tianbo.warehouse.util.XML.XMLXPath;
import org.apache.log4j.Logger;
import org.dom4j.Document;
import org.dom4j.DocumentHelper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import javax.annotation.PostConstruct;
import java.util.Date;
/**
* 存储IMF过来的原始报文到数据仓库T_ELT_MESSAGE原始报文表中
*/
@Component
public class IMFSaveHandle {
@Autowired
protected T_ETL_MESSAGEService messageService;
private static IMFSaveHandle saveHandle;
public final static String SNDR = "//MSG/META/SNDR";
public final static String RCVR = "//MSG/META/RCVR";
public final static String DDTM = "//MSG/META/DDTM";
public final static String TYPE = "//MSG/META/TYPE";
public final static String STYP = "//MSG/META/STYP";
public final static String SEQN = "//MSG/META/SEQN";
protected static final Logger logger = Logger.getLogger(IMFSaveHandle.class);
@PostConstruct
public void init(){
saveHandle = this;
saveHandle.messageService = this.messageService;
}
public void handle(String xmlmessage){
try {
Document document = DocumentHelper.parseText(xmlmessage);
T_ETL_MESSAGE message = new T_ETL_MESSAGE();
String ddtm = XMLXPath.getSingleValueByPath(document,DDTM);
Date ddtmDate = DateUtil.formatByyyyyMMddHHmmss(ddtm);
message.setDdtm(ddtmDate);
message.setSntm(ddtmDate);
message.setOper("ALL");
message.setAppid("W");
message.setEtltim(new Date());
message.setSndr(XMLXPath.getSingleValueByPath(document,SNDR));
message.setRcvr(XMLXPath.getSingleValueByPath(document,RCVR));
message.setType(XMLXPath.getSingleValueByPath(document,TYPE));
message.setStyp(XMLXPath.getSingleValueByPath(document,STYP));
message.setSeqn(XMLXPath.getSingleValueByPath(document,SEQN));
message.setContent(xmlmessage);
int i = saveHandle.messageService.insertSelective(message);
}catch (Exception e){
FileTool.writeFile("err",xmlmessage,false);
logger.warn("*报文入库失败已存储成备份文件*");
logger.error(e);
logger.warn(e);
}
}
}
... ...
package com.tianbo.warehouse.imf;
import com.caac.imf.api.IMFClient;
import com.tianbo.warehouse.handle.IMFSaveHandle;
import com.tianbo.warehouse.schedul.IMF_Task;
import com.tianbo.warehouse.util.IO.FileTool;
import org.apache.log4j.Logger;
... ... @@ -22,17 +23,18 @@ public class IMF_Reader extends Thread{
if (IMF_Task.LOGIN_OK) {
String message = this.client.getMSG();
if (message != null) {
//存储至备份目录
FileTool.writeFileToBak(message);
// IMF_Message_MainHandle mainHandle = new IMF_Message_MainHandle();
// IMF_META meta = mainHandle.messageHandle(message);
IMFSaveHandle imfSaveHandle = new IMFSaveHandle();
imfSaveHandle.handle(message);
}
logger.info("当前线程:"+Thread.currentThread().getName());
logger.info("当前读取线程:"+Thread.currentThread().getName());
} else {
//logger.info("***");
}
try {
Thread.sleep(500L);
Thread.sleep(30000L);
} catch (InterruptedException var3) {
var3.printStackTrace();
... ...
... ... @@ -10,6 +10,8 @@ import org.apache.log4j.Logger;
import org.xml.sax.SAXParseException;
import java.io.File;
import java.io.UnsupportedEncodingException;
import java.util.Iterator;
import java.util.List;
public class IMF_Sender extends Thread{
... ... @@ -28,7 +30,7 @@ public class IMF_Sender extends Thread{
@Override
public void run(){
try {
String sendDir = FileTool.readProperties("readDirectory");
String SNDR = FileTool.readProperties("loginname");
String TYPE = FileTool.readProperties("TYPE");
... ... @@ -47,16 +49,21 @@ public class IMF_Sender extends Thread{
while (true){
//发送报文
List<File> files = FileTool.readDirectoryFiles(new File(sendDir));
for (File file:files) {
String sendMsg = MakeImfMeta.makeImfDocument(SNDR,RCVR,TYPE,STYP,DDTM,SEQN,file);
String returnMsg = this.client.sendMSG(sendMsg);
//发送成功处理,删除已发送成功的目录下的文件
if(returnMsg.indexOf("<CODE>9</CODE>")>=0){
FileUtils.forceDelete(file);
String sendMsg = "";
Iterator<File> it = files.iterator();
while(it.hasNext()){
File file = it.next();
try {
sendMsg = MakeImfMeta.makeImfDocument(SNDR,RCVR,TYPE,STYP,DDTM,SEQN,file);
String returnMsg = this.client.sendMSG(sendMsg);
if(returnMsg.indexOf("<CODE>9</CODE>")>=0){
FileUtils.forceDelete(file);
}
}catch (Exception e){
e.printStackTrace();
}
}
try {
Thread.sleep(500L);
} catch (InterruptedException var3) {
... ... @@ -68,11 +75,8 @@ public class IMF_Sender extends Thread{
}
}
}catch (Exception var14) {
var14.printStackTrace();
logger.info(var14.getMessage());
}
isrunning=false;
logger.info("<<<<<<<<<<<发送线程结束>>>>>>>>>>>>");
}
... ...
package com.tianbo.warehouse.model;
import java.math.BigDecimal;
import java.util.Date;
public class T_ETL_MESSAGE {
private BigDecimal fid;
private String oper;
private Date sntm;
private String sndr;
private String rcvr;
private String seqn;
private Date ddtm;
private String type;
private String styp;
private String transid;
private String remark;
private Date outtm;
private BigDecimal outflag;
private Date etltim;
private BigDecimal etlflag;
private Date errtm;
private BigDecimal errflag;
private String errlog;
private String appid;
private String content;
public BigDecimal getFid() {
return fid;
}
public void setFid(BigDecimal fid) {
this.fid = fid;
}
public String getOper() {
return oper;
}
public void setOper(String oper) {
this.oper = oper == null ? null : oper.trim();
}
public Date getSntm() {
return sntm;
}
public void setSntm(Date sntm) {
this.sntm = sntm;
}
public String getSndr() {
return sndr;
}
public void setSndr(String sndr) {
this.sndr = sndr == null ? null : sndr.trim();
}
public String getRcvr() {
return rcvr;
}
public void setRcvr(String rcvr) {
this.rcvr = rcvr == null ? null : rcvr.trim();
}
public String getSeqn() {
return seqn;
}
public void setSeqn(String seqn) {
this.seqn = seqn == null ? null : seqn.trim();
}
public Date getDdtm() {
return ddtm;
}
public void setDdtm(Date ddtm) {
this.ddtm = ddtm;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type == null ? null : type.trim();
}
public String getStyp() {
return styp;
}
public void setStyp(String styp) {
this.styp = styp == null ? null : styp.trim();
}
public String getTransid() {
return transid;
}
public void setTransid(String transid) {
this.transid = transid == null ? null : transid.trim();
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
public Date getOuttm() {
return outtm;
}
public void setOuttm(Date outtm) {
this.outtm = outtm;
}
public BigDecimal getOutflag() {
return outflag;
}
public void setOutflag(BigDecimal outflag) {
this.outflag = outflag;
}
public Date getEtltim() {
return etltim;
}
public void setEtltim(Date etltim) {
this.etltim = etltim;
}
public BigDecimal getEtlflag() {
return etlflag;
}
public void setEtlflag(BigDecimal etlflag) {
this.etlflag = etlflag;
}
public Date getErrtm() {
return errtm;
}
public void setErrtm(Date errtm) {
this.errtm = errtm;
}
public BigDecimal getErrflag() {
return errflag;
}
public void setErrflag(BigDecimal errflag) {
this.errflag = errflag;
}
public String getErrlog() {
return errlog;
}
public void setErrlog(String errlog) {
this.errlog = errlog;
}
public String getAppid() {
return appid;
}
public void setAppid(String appid) {
this.appid = appid == null ? null : appid.trim();
}
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content == null ? null : content.trim();
}
}
\ No newline at end of file
... ...
... ... @@ -39,7 +39,7 @@ public class IMF_Task {
IMF_Sender kako_sender = new IMF_Sender(client);
if(!IMF_Sender.isrunning) {
kako_sender.start();
// kako_sender.start();
}
}
... ...
package com.tianbo.warehouse.service;
import com.tianbo.warehouse.model.T_ETL_MESSAGE;
public interface T_ETL_MESSAGEService {
int insert(T_ETL_MESSAGE record);
int insertSelective(T_ETL_MESSAGE record);
}
... ...
package com.tianbo.warehouse.service.imp;
import com.tianbo.warehouse.dao.T_ETL_MESSAGEMapper;
import com.tianbo.warehouse.model.T_ETL_MESSAGE;
import com.tianbo.warehouse.service.T_ETL_MESSAGEService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@Service("messageService")
public class T_ETL_MESSAGEServiceImp implements T_ETL_MESSAGEService{
@Autowired
T_ETL_MESSAGEMapper messageMapper;
@Override
public int insert(T_ETL_MESSAGE record){
return messageMapper.insert(record);
}
@Override
public int insertSelective(T_ETL_MESSAGE record){
return messageMapper.insertSelective(record);
}
}
... ...
package com.tianbo.warehouse.util.Date;
import java.text.SimpleDateFormat;
import java.time.LocalDateTime;
import java.time.ZoneId;
import java.time.format.DateTimeFormatter;
import java.time.format.DateTimeParseException;
import java.util.Date;
public final class DateUtil {
... ... @@ -14,4 +18,16 @@ public final class DateUtil {
public static String getDDTM(){
return timesdf.format(currentDate);
}
public static Date formatByyyyyMMddHHmmss(String dateStr) throws DateTimeParseException{
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyMMddHHmmss");
LocalDateTime dateTime = LocalDateTime.parse(dateStr, formatter);
return convertLDTToDate(dateTime);
}
//LocalDateTime转换为Date
public static Date convertLDTToDate(LocalDateTime time) {
return Date.from(time.atZone(ZoneId.systemDefault()).toInstant());
}
}
... ...
... ... @@ -39,7 +39,7 @@ public final class FileTool {
}
public static String readfile(File file) throws IOException{
String fileToString = FileUtils.readFileToString(file, "GB2312");
String fileToString = FileUtils.readFileToString(file, "utf-8");
return fileToString;
}
... ...
... ... @@ -13,8 +13,8 @@ spring.application.name=imf-warehouse-reader
#spring.datasource.name=CGOETL
spring.datasource.type=com.alibaba.druid.pool.DruidDataSource
spring.datasource.driver-class-name=oracle.jdbc.OracleDriver
spring.datasource.url=jdbc:oracle:thin:@10.50.3.70:1521:CGODB
spring.datasource.username=CGONMS
spring.datasource.url=jdbc:oracle:thin:@10.50.3.68:1521:CGODW
spring.datasource.username=CGOETL
spring.datasource.password=1q2w3e4r
#配置初始化大小/最小/最大
spring.datasource.druid.initial-size=1
... ...
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE generatorConfiguration
PUBLIC "-//mybatis.org//DTD MyBatis Generator Configuration 1.0//EN"
"http://mybatis.org/dtd/mybatis-generator-config_1_0.dtd">
<generatorConfiguration>
<!-- 数据库驱动:选择你的本地硬盘上面的数据库驱动包-->
<!--<classPathEntry location="/Users/mrz/Downloads/mybatis-generator-core-1.3.2/lib/mysql-connector-java-5.1.25-bin.jar"/>-->
<classPathEntry location="/Users/mrz/Documents/maven/ojdbc6.jar"/>
<context id="DB2Tables" targetRuntime="MyBatis3">
<commentGenerator>
<property name="suppressDate" value="true"/>
<!-- 是否去除自动生成的注释 true:是 : false:否 -->
<property name="suppressAllComments" value="true"/>
</commentGenerator>
<!--数据库链接URL,用户名、密码 -->
<!--<jdbcConnection driverClass="com.mysql.jdbc.Driver" connectionURL="jdbc:mysql://127.0.0.1:3307/statistics" userId="root" password="">-->
<!--</jdbcConnection>-->
<jdbcConnection driverClass="oracle.jdbc.driver.OracleDriver"
connectionURL="jdbc:oracle:thin:@10.50.3.68:1521:CGODW"
userId="CGOETL"
password="1q2w3e4r">
</jdbcConnection>
<!-- 默认false,把JDBC DECIMAL 和 NUMERIC 类型解析为 Integer,为 true时把JDBC DECIMAL 和
NUMERIC 类型解析为java.math.BigDecimal -->
<!--<javaTypeResolver>-->
<!--<property name="forceBigDecimals" value="true" />-->
<!--</javaTypeResolver>-->
<javaTypeResolver>
<property name="forceBigDecimals" value="false"/>
</javaTypeResolver>
<!-- 生成模型的包名和位置-->
<javaModelGenerator targetPackage="com.tianbo.warehouse.model" targetProject="src/main/java">
<property name="enableSubPackages" value="true"/>
<property name="trimStrings" value="true"/>
</javaModelGenerator>
<!-- 生成映射文件的包名和位置-->
<sqlMapGenerator targetPackage="mapping" targetProject="src/main/resources">
<property name="enableSubPackages" value="true"/>
</sqlMapGenerator>
<!-- 生成DAO的包名和位置-->
<javaClientGenerator type="XMLMAPPER" targetPackage="com.tianbo.warehouse.dao" targetProject="src/main/java">
<property name="enableSubPackages" value="true"/>
</javaClientGenerator>
<!-- 要生成的表 tableName是数据库中的表名或视图名 domainObjectName是实体类名-->
<table tableName="T_ETL_MESSAGE" domainObjectName="T_ETL_MESSAGE" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false"></table>
</context>
</generatorConfiguration>
\ No newline at end of file
... ...
<?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.warehouse.dao.T_ETL_MESSAGEMapper">
<resultMap id="BaseResultMap" type="com.tianbo.warehouse.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" />
<result column="SNDR" jdbcType="VARCHAR" property="sndr" />
<result column="RCVR" jdbcType="VARCHAR" property="rcvr" />
<result column="SEQN" jdbcType="VARCHAR" property="seqn" />
<result column="DDTM" jdbcType="TIMESTAMP" property="ddtm" />
<result column="TYPE" jdbcType="VARCHAR" property="type" />
<result column="STYP" jdbcType="VARCHAR" property="styp" />
<result column="TRANSID" jdbcType="VARCHAR" property="transid" />
<result column="REMARK" jdbcType="NVARCHAR" property="remark" />
<result column="OUTTM" jdbcType="TIMESTAMP" property="outtm" />
<result column="OUTFLAG" jdbcType="DECIMAL" property="outflag" />
<result column="ETLTIM" jdbcType="TIMESTAMP" property="etltim" />
<result column="ETLFLAG" jdbcType="DECIMAL" property="etlflag" />
<result column="ERRTM" jdbcType="TIMESTAMP" property="errtm" />
<result column="ERRFLAG" jdbcType="DECIMAL" property="errflag" />
<result column="ERRLOG" jdbcType="NVARCHAR" property="errlog" />
<result column="APPID" jdbcType="VARCHAR" property="appid" />
</resultMap>
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.tianbo.warehouse.model.T_ETL_MESSAGE">
<result column="CONTENT" jdbcType="CLOB" property="content" />
</resultMap>
<sql id="Base_Column_List">
FID, OPER, SNTM, SNDR, RCVR, SEQN, DDTM, TYPE, STYP, TRANSID, REMARK, OUTTM, OUTFLAG,
ETLTIM, ETLFLAG, ERRTM, ERRFLAG, ERRLOG, APPID
</sql>
<sql id="Blob_Column_List">
CONTENT
</sql>
<select id="selectByPrimaryKey" parameterType="java.math.BigDecimal" resultMap="ResultMapWithBLOBs">
select
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from T_ETL_MESSAGE
where FID = #{fid,jdbcType=DECIMAL}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal">
delete from T_ETL_MESSAGE
where FID = #{fid,jdbcType=DECIMAL}
</delete>
<insert id="insert" parameterType="com.tianbo.warehouse.model.T_ETL_MESSAGE">
insert into T_ETL_MESSAGE (FID, OPER, SNTM,
SNDR, RCVR, SEQN, DDTM,
TYPE, STYP, TRANSID,
REMARK, OUTTM, OUTFLAG,
ETLTIM, ETLFLAG, ERRTM,
ERRFLAG, ERRLOG, APPID,
CONTENT)
values (#{fid,jdbcType=DECIMAL}, #{oper,jdbcType=VARCHAR}, #{sntm,jdbcType=TIMESTAMP},
#{sndr,jdbcType=VARCHAR}, #{rcvr,jdbcType=VARCHAR}, #{seqn,jdbcType=VARCHAR}, #{ddtm,jdbcType=TIMESTAMP},
#{type,jdbcType=VARCHAR}, #{styp,jdbcType=VARCHAR}, #{transid,jdbcType=VARCHAR},
#{remark,jdbcType=NVARCHAR}, #{outtm,jdbcType=TIMESTAMP}, #{outflag,jdbcType=DECIMAL},
#{etltim,jdbcType=TIMESTAMP}, #{etlflag,jdbcType=DECIMAL}, #{errtm,jdbcType=TIMESTAMP},
#{errflag,jdbcType=DECIMAL}, #{errlog,jdbcType=NVARCHAR}, #{appid,jdbcType=VARCHAR},
#{content,jdbcType=CLOB})
</insert>
<insert id="insertSelective" parameterType="com.tianbo.warehouse.model.T_ETL_MESSAGE">
insert into T_ETL_MESSAGE
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="fid != null">
FID,
</if>
<if test="oper != null">
OPER,
</if>
<if test="sntm != null">
SNTM,
</if>
<if test="sndr != null">
SNDR,
</if>
<if test="rcvr != null">
RCVR,
</if>
<if test="seqn != null">
SEQN,
</if>
<if test="ddtm != null">
DDTM,
</if>
<if test="type != null">
TYPE,
</if>
<if test="styp != null">
STYP,
</if>
<if test="transid != null">
TRANSID,
</if>
<if test="remark != null">
REMARK,
</if>
<if test="outtm != null">
OUTTM,
</if>
<if test="outflag != null">
OUTFLAG,
</if>
<if test="etltim != null">
ETLTIM,
</if>
<if test="etlflag != null">
ETLFLAG,
</if>
<if test="errtm != null">
ERRTM,
</if>
<if test="errflag != null">
ERRFLAG,
</if>
<if test="errlog != null">
ERRLOG,
</if>
<if test="appid != null">
APPID,
</if>
<if test="content != null">
CONTENT,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="fid != null">
#{fid,jdbcType=DECIMAL},
</if>
<if test="oper != null">
#{oper,jdbcType=VARCHAR},
</if>
<if test="sntm != null">
#{sntm,jdbcType=TIMESTAMP},
</if>
<if test="sndr != null">
#{sndr,jdbcType=VARCHAR},
</if>
<if test="rcvr != null">
#{rcvr,jdbcType=VARCHAR},
</if>
<if test="seqn != null">
#{seqn,jdbcType=VARCHAR},
</if>
<if test="ddtm != null">
#{ddtm,jdbcType=TIMESTAMP},
</if>
<if test="type != null">
#{type,jdbcType=VARCHAR},
</if>
<if test="styp != null">
#{styp,jdbcType=VARCHAR},
</if>
<if test="transid != null">
#{transid,jdbcType=VARCHAR},
</if>
<if test="remark != null">
#{remark,jdbcType=OTHER},
</if>
<if test="outtm != null">
#{outtm,jdbcType=TIMESTAMP},
</if>
<if test="outflag != null">
#{outflag,jdbcType=DECIMAL},
</if>
<if test="etltim != null">
#{etltim,jdbcType=TIMESTAMP},
</if>
<if test="etlflag != null">
#{etlflag,jdbcType=DECIMAL},
</if>
<if test="errtm != null">
#{errtm,jdbcType=TIMESTAMP},
</if>
<if test="errflag != null">
#{errflag,jdbcType=DECIMAL},
</if>
<if test="errlog != null">
#{errlog,jdbcType=OTHER},
</if>
<if test="appid != null">
#{appid,jdbcType=VARCHAR},
</if>
<if test="content != null">
#{content,jdbcType=CLOB},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.tianbo.warehouse.model.T_ETL_MESSAGE">
update T_ETL_MESSAGE
<set>
<if test="oper != null">
OPER = #{oper,jdbcType=VARCHAR},
</if>
<if test="sntm != null">
SNTM = #{sntm,jdbcType=TIMESTAMP},
</if>
<if test="sndr != null">
SNDR = #{sndr,jdbcType=VARCHAR},
</if>
<if test="rcvr != null">
RCVR = #{rcvr,jdbcType=VARCHAR},
</if>
<if test="seqn != null">
SEQN = #{seqn,jdbcType=VARCHAR},
</if>
<if test="ddtm != null">
DDTM = #{ddtm,jdbcType=TIMESTAMP},
</if>
<if test="type != null">
TYPE = #{type,jdbcType=VARCHAR},
</if>
<if test="styp != null">
STYP = #{styp,jdbcType=VARCHAR},
</if>
<if test="transid != null">
TRANSID = #{transid,jdbcType=VARCHAR},
</if>
<if test="remark != null">
REMARK = #{remark,jdbcType=OTHER},
</if>
<if test="outtm != null">
OUTTM = #{outtm,jdbcType=TIMESTAMP},
</if>
<if test="outflag != null">
OUTFLAG = #{outflag,jdbcType=DECIMAL},
</if>
<if test="etltim != null">
ETLTIM = #{etltim,jdbcType=TIMESTAMP},
</if>
<if test="etlflag != null">
ETLFLAG = #{etlflag,jdbcType=DECIMAL},
</if>
<if test="errtm != null">
ERRTM = #{errtm,jdbcType=TIMESTAMP},
</if>
<if test="errflag != null">
ERRFLAG = #{errflag,jdbcType=DECIMAL},
</if>
<if test="errlog != null">
ERRLOG = #{errlog,jdbcType=OTHER},
</if>
<if test="appid != null">
APPID = #{appid,jdbcType=VARCHAR},
</if>
<if test="content != null">
CONTENT = #{content,jdbcType=CLOB},
</if>
</set>
where FID = #{fid,jdbcType=DECIMAL}
</update>
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.tianbo.warehouse.model.T_ETL_MESSAGE">
update T_ETL_MESSAGE
set OPER = #{oper,jdbcType=VARCHAR},
SNTM = #{sntm,jdbcType=TIMESTAMP},
SNDR = #{sndr,jdbcType=VARCHAR},
RCVR = #{rcvr,jdbcType=VARCHAR},
SEQN = #{seqn,jdbcType=VARCHAR},
DDTM = #{ddtm,jdbcType=TIMESTAMP},
TYPE = #{type,jdbcType=VARCHAR},
STYP = #{styp,jdbcType=VARCHAR},
TRANSID = #{transid,jdbcType=VARCHAR},
REMARK = #{remark,jdbcType=OTHER},
OUTTM = #{outtm,jdbcType=TIMESTAMP},
OUTFLAG = #{outflag,jdbcType=DECIMAL},
ETLTIM = #{etltim,jdbcType=TIMESTAMP},
ETLFLAG = #{etlflag,jdbcType=DECIMAL},
ERRTM = #{errtm,jdbcType=TIMESTAMP},
ERRFLAG = #{errflag,jdbcType=DECIMAL},
ERRLOG = #{errlog,jdbcType=OTHER},
APPID = #{appid,jdbcType=VARCHAR},
CONTENT = #{content,jdbcType=CLOB}
where FID = #{fid,jdbcType=DECIMAL}
</update>
<update id="updateByPrimaryKey" parameterType="com.tianbo.warehouse.model.T_ETL_MESSAGE">
update T_ETL_MESSAGE
set OPER = #{oper,jdbcType=VARCHAR},
SNTM = #{sntm,jdbcType=TIMESTAMP},
SNDR = #{sndr,jdbcType=VARCHAR},
RCVR = #{rcvr,jdbcType=VARCHAR},
SEQN = #{seqn,jdbcType=VARCHAR},
DDTM = #{ddtm,jdbcType=TIMESTAMP},
TYPE = #{type,jdbcType=VARCHAR},
STYP = #{styp,jdbcType=VARCHAR},
TRANSID = #{transid,jdbcType=VARCHAR},
REMARK = #{remark,jdbcType=OTHER},
OUTTM = #{outtm,jdbcType=TIMESTAMP},
OUTFLAG = #{outflag,jdbcType=DECIMAL},
ETLTIM = #{etltim,jdbcType=TIMESTAMP},
ETLFLAG = #{etlflag,jdbcType=DECIMAL},
ERRTM = #{errtm,jdbcType=TIMESTAMP},
ERRFLAG = #{errflag,jdbcType=DECIMAL},
ERRLOG = #{errlog,jdbcType=OTHER},
APPID = #{appid,jdbcType=VARCHAR}
where FID = #{fid,jdbcType=DECIMAL}
</update>
</mapper>
\ No newline at end of file
... ...