insert into business_notice( operate,notice_type_cd,context,start_time,end_time,community_id,title,b_id,user_id,notice_id,obj_type,obj_id,state ) values ( #{operate},#{noticeTypeCd},#{context},#{startTime},#{endTime},#{communityId},#{title},#{bId},#{userId},#{noticeId}, #{objType},#{objId},#{state} ) insert into n_notice( notice_type_cd,context,start_time,end_time,status_cd,community_id,title,b_id,user_id,notice_id,obj_type,obj_id,state ) select t.notice_type_cd,t.context,t.start_time,t.end_time,'0',t.community_id,t.title,t.b_id,t.user_id,t.notice_id, t.obj_type,t.obj_id,t.state from business_notice t where 1=1 and t.operate= 'ADD' and t.notice_type_cd= #{noticeTypeCd} and t.context= #{context} and t.start_time= #{startTime} and t.end_time= #{endTime} and t.community_id= #{communityId} and t.title= #{title} and t.b_id= #{bId} and t.user_id= #{userId} and t.notice_id= #{noticeId} update n_notice t set t.status_cd = #{statusCd} ,t.b_id = #{newBId} , t.notice_type_cd= #{noticeTypeCd} , t.context= #{context} , t.start_time= #{startTime} , t.end_time= #{endTime} , t.community_id= #{communityId} , t.title= #{title} , t.state= #{state} where 1=1 and t.b_id= #{bId} and t.notice_id= #{noticeId}