对于批量插入 和 批量查询
要注意的就是是否有数据重复。
以为是批量插入的,这批数据的来源渠道和日期是一样的,
新一批数据来之后,取第一条数据的渠道和日期,去数据库查询,如果没有数据,则进行添加操作;如果有数据,表示是重复添加,不要添加了;、
distinct 去重
select distinct t.fund_code,t.happen_date
from counter.tb_post_table t
where t.fund_code='WEIXIN' and t.happen_date='20170824'