<!-- 清空表数据 -->
<update id="truncateTable">
truncate table ${tableName}
</update>
<insert id="addHistoryByPostBatchno" parameterType="paramMap" useGeneratedKeys="false" >
Insert into
Tb_Dispatch_Mail_History
(
mail_no, rec_name, rec_address, rec_telephone,
customer_no, post_opter, mail_content_name, mail_weight,
actual_postage, delivery_area, post_time, post_condition,
post_status, post_batchNo, customer_id
)
select
mail_no, rec_name, rec_address, rec_telephone,
customer_no, post_opter, mail_content_name, mail_weight,
actual_postage, delivery_area, post_time, post_condition,
post_status, post_batchNo, customer_id
from Tb_Dispatch_Mail_Post tp
<where>
tp.post_batchno=#{paramMap.postBatchno}
</where>
<insert>