|  | @@ -0,0 +1,60 @@
 | 
	
		
			
				|  |  | +<?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.persagy.dmp.rwd.migrate.SyncDataMapper">
 | 
	
		
			
				|  |  | +  <resultMap id="BaseResultMap" type="com.persagy.dmp.rwd.migrate.entity.SyncData">
 | 
	
		
			
				|  |  | +    <id column="id" jdbcType="VARCHAR" property="id" />
 | 
	
		
			
				|  |  | +    <id column="table_name" jdbcType="VARCHAR" property="tableName" />
 | 
	
		
			
				|  |  | +    <result column="target_id" jdbcType="VARCHAR" property="targetId" />
 | 
	
		
			
				|  |  | +    <result column="obj_type" jdbcType="VARCHAR" property="objType" />
 | 
	
		
			
				|  |  | +    <result column="type" jdbcType="VARCHAR" property="type" />
 | 
	
		
			
				|  |  | +    <result column="project_id" jdbcType="VARCHAR" property="projectId" />
 | 
	
		
			
				|  |  | +    <result column="sign" jdbcType="INTEGER" property="sign" />
 | 
	
		
			
				|  |  | +    <result column="ops" jdbcType="VARCHAR" property="ops" />
 | 
	
		
			
				|  |  | +    <result column="ops_name" jdbcType="VARCHAR" property="opsName" />
 | 
	
		
			
				|  |  | +    <result column="from_id" jdbcType="VARCHAR" property="fromId" />
 | 
	
		
			
				|  |  | +    <result column="to_id" jdbcType="VARCHAR" property="toId" />
 | 
	
		
			
				|  |  | +    <result column="error" jdbcType="VARCHAR" property="error" />
 | 
	
		
			
				|  |  | +    <result column="class_code" jdbcType="VARCHAR" property="classCode" />
 | 
	
		
			
				|  |  | +    <result column="local_name" jdbcType="VARCHAR" property="localName" />
 | 
	
		
			
				|  |  | +    <result column="local_id" jdbcType="VARCHAR" property="localId" />
 | 
	
		
			
				|  |  | +    <result column="name" jdbcType="VARCHAR" property="name" />
 | 
	
		
			
				|  |  | +    <result column="code" jdbcType="VARCHAR" property="code" />
 | 
	
		
			
				|  |  | +    <result column="obj_name" jdbcType="VARCHAR" property="objName" />
 | 
	
		
			
				|  |  | +    <result column="creator" jdbcType="VARCHAR" property="creator" />
 | 
	
		
			
				|  |  | +    <result column="creation_time" jdbcType="CHAR" property="creationTime" />
 | 
	
		
			
				|  |  | +    <result column="modifier" jdbcType="VARCHAR" property="modifier" />
 | 
	
		
			
				|  |  | +    <result column="modified_time" jdbcType="CHAR" property="modifiedTime" />
 | 
	
		
			
				|  |  | +    <result column="valid" jdbcType="TINYINT" property="valid" />
 | 
	
		
			
				|  |  | +    <result column="ts" jdbcType="TIMESTAMP" property="ts" />
 | 
	
		
			
				|  |  | +  </resultMap>
 | 
	
		
			
				|  |  | +  <sql id="Base_Column_List">
 | 
	
		
			
				|  |  | +    id, table_name, target_id, obj_type, `type`, project_id, sign, ops, ops_name, from_id, to_id,
 | 
	
		
			
				|  |  | +    error, class_code, local_name, local_id, `name`, code, obj_name, creator, creation_time,
 | 
	
		
			
				|  |  | +    modifier, modified_time, `valid`, ts
 | 
	
		
			
				|  |  | +  </sql>
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +  <insert id="save">
 | 
	
		
			
				|  |  | +    insert into dt_sync_data (id,table_name,target_id, obj_type, `type`,
 | 
	
		
			
				|  |  | +      project_id, sign, ops, 
 | 
	
		
			
				|  |  | +      ops_name, from_id, to_id, 
 | 
	
		
			
				|  |  | +      error, class_code, local_name, 
 | 
	
		
			
				|  |  | +      local_id, `name`, code,
 | 
	
		
			
				|  |  | +      obj_name, creator, creation_time, 
 | 
	
		
			
				|  |  | +      modifier, modified_time, `valid`, 
 | 
	
		
			
				|  |  | +      ts)
 | 
	
		
			
				|  |  | +    <foreach collection="vos" item="vo" open="(" close=")" separator="),(">
 | 
	
		
			
				|  |  | +      #{vo.id},#{vo.tableName},#{vo.targetId},#{vo.objType},#{vo.type},#{vo.projectId},
 | 
	
		
			
				|  |  | +      #{vo.sign},#{vo.ops},#{vo.opsName},#{vo.fromId},#{vo.toId},
 | 
	
		
			
				|  |  | +      #{vo.error},#{vo.classCode},#{vo.localName},
 | 
	
		
			
				|  |  | +      #{vo.localId},#{vo.name},#{vo.code},
 | 
	
		
			
				|  |  | +      #{vo.creator},#{vo.creationTime},#{vo.modifier},#{vo.modifiedTime},#{vo.valid}
 | 
	
		
			
				|  |  | +    </foreach>
 | 
	
		
			
				|  |  | +    ON DUPLICATE KEY UPDATE
 | 
	
		
			
				|  |  | +    type = VALUES(type), ops = VALUES(ops), opsName = VALUES(opsName),
 | 
	
		
			
				|  |  | +    from_id = VALUES(from_id), to_id = VALUES(to_id), error = VALUES(error),
 | 
	
		
			
				|  |  | +    class_code = VALUES(class_code), local_name = VALUES(local_name), local_id = VALUES(local_id),
 | 
	
		
			
				|  |  | +    `name` = VALUES(name), code_name = VALUES(local_name), obj_name = VALUES(obj_name),code = VALUES(code),
 | 
	
		
			
				|  |  | +    modifier = VALUES(modifier), modified_time = VALUES(modified_time)
 | 
	
		
			
				|  |  | +  </insert>
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +</mapper>
 |