<insert id="addE2ERecordBatch" parameterType="java.util.List">
为生活加点乐子,TBDIAN:大欢乐情调
insert into t_e2e (collect_year_month,one_level_name,one_level_code,two_level_name,two_level_code,account_no,account_name,account_order,computing_code,computing_mode,normal_goal,normal_predict,nature_goal,nature_predict,active,create_time,last_update_time,create_by,last_modify_by)
<foreach collection ="list" item ="e2e" index ="index" separator ="union all">
<![CDATA[
select #{e2e.collectYearMonth,jdbcType=DATE},#{e2e.oneLevel,jdbcType=VARCHAR},#{e2e.oneLevelCode,jdbcType=VARCHAR},
#{e2e.twoLevel,jdbcType=VARCHAR},#{e2e.twoLevelCode,jdbcType=VARCHAR},#{e2e.accountNo,jdbcType=VARCHAR},
#{e2e.accountName,jdbcType=VARCHAR},#{e2e.order,jdbcType=INTEGER},#{e2e.computingCode,jdbcType=VARCHAR},
#{e2e.computingMode,jdbcType=VARCHAR},#{e2e.normalGoal,jdbcType=NUMERIC},#{e2e.normalPredict,jdbcType=NUMERIC},
#{e2e.natureGoal,jdbcType=NUMERIC},#{e2e.naturePredict,jdbcType=NUMERIC},#{e2e.active,jdbcType=VARCHAR},
#{e2e.gmtCreate,jdbcType=TIMESTAMP},#{e2e.gmtModified,jdbcType=TIMESTAMP},#{e2e.createBy,jdbcType=VARCHAR},
#{e2e.lastModifiedBy,jdbcType=VARCHAR} from dual
]]>
</foreach>
</insert>
<update id="editE2ERecordsBatch" parameterType="java.util.List">
begin
<foreach collection="list" item="e2e" index="index" separator=";">
update t_e2e
<set>
<if test="e2e.computingCode!=null and e2e.computingCode!=''">
computing_code=#{e2e.computingCode},
</if>
<if test="e2e.computingMode!=null and e2e.computingMode!=''">
computing_mode=#{e2e.computingMode},
</if>
<if test="e2e.normalGoal!=null and e2e.normalGoal!=''">
normal_goal=#{e2e.normalGoal},
</if>
<if test="e2e.normalPredict!=null and e2e.normalPredict!=''">
normal_predict=#{e2e.normalPredict},
</if>
<if test="e2e.natureGoal!=null and e2e.natureGoal!=''">
nature_goal=#{e2e.natureGoal},
</if>
<if test="e2e.naturePredict!=null and e2e.naturePredict!=''">
nature_predict=#{e2e.naturePredict},
</if>
<if test="e2e.lastModifiedBy!=null and e2e.lastModifiedBy!=''">
last_modify_by=#{e2e.lastModifiedBy},
</if>
<if test="e2e.gmtModified!=null and e2e.gmtModified!=''">
last_update_time=#{e2e.gmtModified}
</if>
</set>
where collect_year_month=#{e2e.collectYearMonth}
and one_level_name=#{e2e.oneLevel}
and two_level_name=#{e2e.twoLevel}
and account_no=#{e2e.accountNo}
and active='1'
</foreach>
;end;
</update>