feat:数据同步(初)

master
Jiang Peng 2024-04-24 15:29:00 +08:00
parent 11b8eb0ada
commit 05d5e815c3
1 changed files with 72 additions and 36 deletions

View File

@ -93,45 +93,81 @@
<if test="remark != null">#{remark},</if>
</trim>
</insert>
<insert id="batchInsert" parameterType="com.muyu.etl.domain.AssetModel" >
insert into `asset_model`
<trim prefix="(" suffix=")" suffixOverrides=",">
`data_asset_id`,
`name`,
comment,
is_primary_key,
`type`,
mapping_type,
`length`,
decimal_places,
is_null,
is_dict,
default_value,
dict_key,
create_by,
create_time,
</trim>
values
<insert id="batchInsert" parameterType="com.muyu.etl.domain.AssetModel">
insert into `asset_model` (
`data_asset_id`,
`name`,
comment,
is_primary_key,
`type`,
mapping_type,
`length`,
decimal_places,
is_null,
is_dict,
default_value,
dict_key,
create_by,
create_time
) values
<foreach collection="tableAssets" item="item" separator=",">
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="item.dataAssetId != null">#{item.dataAssetId},</if>
<if test="item.name != null">#{item.name},</if>
<if test="item.comment != null">#{item.comment},</if>
<if test="item.isPrimaryKey != null">#{item.isPrimaryKey},</if>
<if test="item.type != null">#{item.type},</if>
<if test="item.mappingType != null">#{item.mappingType},</if>
<if test="item.length != null">#{item.length},</if>
<if test="item.decimalPlaces != null">#{item.decimalPlaces},</if>
<if test="item.isNull != null">#{item.isNull},</if>
<if test="item.isDict != null">#{item.isDict},</if>
<if test="item.defaultValue != null">#{item.defaultValue},</if>
<if test="item.dictKey != null">#{item.dictKey},</if>
<if test="item.createBy != null and item.createBy != ''">#{item.createBy},</if>
<if test="item.createTime != null">#{item.createTime},</if>
</trim>
(
#{item.dataAssetId},
#{item.name},
#{item.comment},
#{item.isPrimaryKey},
#{item.type},
#{item.mappingType},
#{item.length},
#{item.decimalPlaces},
#{item.isNull},
#{item.isDict},
#{item.defaultValue},
#{item.dictKey},
#{item.createBy},
#{item.createTime}
)
</foreach>
</insert>
<!-- <insert id="batchInsert" parameterType="com.muyu.etl.domain.AssetModel" >-->
<!-- insert into `asset_model`-->
<!-- <trim prefix="(" suffix=")" suffixOverrides=",">-->
<!-- `data_asset_id`,-->
<!-- `name`,-->
<!-- comment,-->
<!-- is_primary_key,-->
<!-- `type`,-->
<!-- mapping_type,-->
<!-- `length`,-->
<!-- decimal_places,-->
<!-- is_null,-->
<!-- is_dict,-->
<!-- default_value,-->
<!-- dict_key,-->
<!-- create_by,-->
<!-- create_time,-->
<!-- </trim>-->
<!-- values-->
<!-- <foreach collection="tableAssets" item="item" separator=",">-->
<!-- <trim prefix="(" suffix=")" suffixOverrides=",">-->
<!-- <if test="item.dataAssetId != null">#{item.dataAssetId},</if>-->
<!-- <if test="item.name != null">#{item.name},</if>-->
<!-- <if test="item.comment != null">#{item.comment},</if>-->
<!-- <if test="item.isPrimaryKey != null">#{item.isPrimaryKey},</if>-->
<!-- <if test="item.type != null">#{item.type},</if>-->
<!-- <if test="item.mappingType != null">#{item.mappingType},</if>-->
<!-- <if test="item.length != null">#{item.length},</if>-->
<!-- <if test="item.decimalPlaces != null">#{item.decimalPlaces},</if>-->
<!-- <if test="item.isNull != null">#{item.isNull},</if>-->
<!-- <if test="item.isDict != null">#{item.isDict},</if>-->
<!-- <if test="item.defaultValue != null">#{item.defaultValue},</if>-->
<!-- <if test="item.dictKey != null">#{item.dictKey},</if>-->
<!-- <if test="item.createBy != null and item.createBy != ''">#{item.createBy},</if>-->
<!-- <if test="item.createTime != null">#{item.createTime},</if>-->
<!-- </trim>-->
<!-- </foreach>-->
<!-- </insert>-->
<update id="updateAssetModel" parameterType="com.muyu.etl.domain.AssetModel">
update asset_model