-- 存款利率维护支持分段利率时，需将历史数据的表头利率写到分录中，如果分录中已经有生效日期等于表头生效日期的数据，则不写入,要支持多次部署
insert into t_ifm_product_entry(fentryid, fid, feffectivedate,fpricenum,fprice,finterestratedays,fopuser,foptime)
select fid, fid,feffectivedate,fpricenum,fprice,finterestratedays,fcreatorid,fcreatetime
  from t_ifm_product a
where feffectivedate is not null
  and fpricenum !=0
  and not exists (select 1 from t_ifm_product_entry c where c.fid=a.fid and c.fentryid=a.fid)
  and not exists (select 1 from t_ifm_product_entry b where b.fid=a.fid and b.feffectivedate=a.feffectivedate);