insert into business_activities(collect_count, like_count, title, read_count, user_name, user_id, activities_id, operate, type_cd, context, start_time, end_time, community_id, b_id, header_img, state) values (#{collectCount}, #{likeCount}, #{title}, #{readCount}, #{userName}, #{userId}, #{activitiesId}, #{operate}, #{typeCd}, #{context}, #{startTime}, #{endTime}, #{communityId}, #{bId}, #{headerImg}, #{state}) insert into activities( collect_count,like_count,status_cd,title,read_count,user_name,user_id,activities_id,type_cd,context,start_time, end_time,community_id,b_id,header_img,state ) select t.collect_count,t.like_count,'0',t.title,t.read_count,t.user_name,t.user_id,t.activities_id,t.type_cd,t.context,t.start_time, t.end_time,t.community_id,t.b_id,t.header_img,t.state from business_activities t where 1=1 and t.collect_count= #{collectCount} and t.like_count= #{likeCount} and t.title= #{title} and t.read_count= #{readCount} and t.user_name= #{userName} and t.user_id= #{userId} and t.activities_id= #{activitiesId} and t.operate= 'ADD' and t.type_cd= #{typeCd} and t.context= #{context} and t.start_time= #{startTime} and t.end_time= #{endTime} and t.community_id= #{communityId} and t.b_id= #{bId} and t.header_img= #{headerImg} update activities t set t.status_cd = #{statusCd} ,t.b_id = #{newBId} , t.collect_count= #{collectCount} , t.like_count= #{likeCount} , t.title= #{title} , t.read_count= #{readCount} , t.user_name= #{userName} , t.user_id= #{userId} , t.type_cd= #{typeCd} , t.context= #{context} , t.start_time= #{startTime} , t.end_time= #{endTime} , t.community_id= #{communityId} , t.header_img= #{headerImg} , t.state= #{state} where 1=1 and t.activities_id= #{activitiesId} and t.b_id= #{bId}