varobj=_connection.QueryFirstOrDefault<Models.dc_auto_sales_config>("select * from dc_auto_sales_config where id="+m.id);
if(obj==null)
{
obj=newdc_auto_sales_config
{
};
}
obj.id=m.id;
obj.platform_type=m.platform_type;
obj.web_site=m.web_site;
obj.multiple=m.multiple;
obj.start_date=m.start_date;
obj.end_date=m.end_date;
// 检查该数据是否有存在
varoldData=_connection.QueryFirstOrDefault(" select * from dc_auto_sales_config where platform_type=@platform_type and web_site=@web_site and id!=@id ",new{m.platform_type,m.web_site,m.id});