feat:数据同步(初)
parent
11b8eb0ada
commit
05d5e815c3
|
@ -94,8 +94,7 @@
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
<insert id="batchInsert" parameterType="com.muyu.etl.domain.AssetModel">
|
<insert id="batchInsert" parameterType="com.muyu.etl.domain.AssetModel">
|
||||||
insert into `asset_model`
|
insert into `asset_model` (
|
||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
||||||
`data_asset_id`,
|
`data_asset_id`,
|
||||||
`name`,
|
`name`,
|
||||||
comment,
|
comment,
|
||||||
|
@ -109,29 +108,66 @@
|
||||||
default_value,
|
default_value,
|
||||||
dict_key,
|
dict_key,
|
||||||
create_by,
|
create_by,
|
||||||
create_time,
|
create_time
|
||||||
</trim>
|
) values
|
||||||
values
|
|
||||||
<foreach collection="tableAssets" item="item" separator=",">
|
<foreach collection="tableAssets" item="item" separator=",">
|
||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
(
|
||||||
<if test="item.dataAssetId != null">#{item.dataAssetId},</if>
|
#{item.dataAssetId},
|
||||||
<if test="item.name != null">#{item.name},</if>
|
#{item.name},
|
||||||
<if test="item.comment != null">#{item.comment},</if>
|
#{item.comment},
|
||||||
<if test="item.isPrimaryKey != null">#{item.isPrimaryKey},</if>
|
#{item.isPrimaryKey},
|
||||||
<if test="item.type != null">#{item.type},</if>
|
#{item.type},
|
||||||
<if test="item.mappingType != null">#{item.mappingType},</if>
|
#{item.mappingType},
|
||||||
<if test="item.length != null">#{item.length},</if>
|
#{item.length},
|
||||||
<if test="item.decimalPlaces != null">#{item.decimalPlaces},</if>
|
#{item.decimalPlaces},
|
||||||
<if test="item.isNull != null">#{item.isNull},</if>
|
#{item.isNull},
|
||||||
<if test="item.isDict != null">#{item.isDict},</if>
|
#{item.isDict},
|
||||||
<if test="item.defaultValue != null">#{item.defaultValue},</if>
|
#{item.defaultValue},
|
||||||
<if test="item.dictKey != null">#{item.dictKey},</if>
|
#{item.dictKey},
|
||||||
<if test="item.createBy != null and item.createBy != ''">#{item.createBy},</if>
|
#{item.createBy},
|
||||||
<if test="item.createTime != null">#{item.createTime},</if>
|
#{item.createTime}
|
||||||
</trim>
|
)
|
||||||
</foreach>
|
</foreach>
|
||||||
|
|
||||||
</insert>
|
</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 id="updateAssetModel" parameterType="com.muyu.etl.domain.AssetModel">
|
||||||
update asset_model
|
update asset_model
|
||||||
|
|
Loading…
Reference in New Issue