sni.del_flag_=0 and sni.type_ = #{type} and sni.sub_type_ = #{subType} and sni.status_ = #{status} and (sni.title_ like '%' #{title} '%' or sni.id_ like concat('%',#{title},'%') ) and sni.title_ like '%' #{search} '%' and find_in_set(#{subjectId},sni.subject_id_list_) and sni.status_ = 1 and if(sni.online_time_ is not null,sni.online_time_ <= now(),1=1) and if(sni.offline_time_ is not null,sni.offline_time_ >= now(),1=1) and sni.client_type_ = #{platformType} and sni.client_type_ = #{platformType} and sni.client_type_ = #{platformType} and sni.client_type_ = #{clientType} AND sni.id_ NOT IN #{excludeId} and sni.attribute1_ = #{version} and sni.attribute2_ = #{attribute2} INSERT INTO sys_news_information (id_,title_,content_,cover_image_,video_cover_image_,type_,online_time_,offline_time_,sub_type_,status_,create_time_,update_time_,link_url_,href_target_,order_,del_flag_,memo_,attribute1_,attribute2_,subject_id_list_,create_by_,update_by_,show_time_,link_type_,client_type_,background_) VALUES(#{id},#{title},#{content},#{coverImage},#{videoCoverImage},#{type},#{onlineTime},#{offlineTime},#{subType},#{status, typeHandler=com.yonge.toolset.mybatis.dal.CustomEnumTypeHandler},now(),now(),#{linkUrl},#{hrefTarget},#{order},0,#{memo},#{attribute1},#{attribute2},#{subjectIdList},#{createBy},#{updateBy},#{showTime},#{linkType},#{clientType},#{background}) UPDATE sys_news_information status_ = #{status, typeHandler=com.yonge.toolset.mybatis.dal.CustomEnumTypeHandler}, title_ = #{title}, update_time_ = NOW(), content_ = #{content}, cover_image_ = #{coverImage}, video_cover_image_ = #{videoCoverImage}, type_ = #{type}, online_time_ = #{onlineTime}, offline_time_ = #{offlineTime}, sub_type_ = #{subType}, link_url_ = #{linkUrl}, href_target_ = #{hrefTarget}, order_ = #{order}, memo_ = #{memo}, del_flag_ = #{delFlag}, attribute1_ = #{attribute1}, attribute2_ = #{attribute2}, subject_id_list_ = #{subjectIdList}, update_by_ = #{updateBy}, link_type_ = #{linkType}, client_type_ = #{clientType}, background_ = #{background}, show_time_ = #{showTime} WHERE id_ = #{id} DELETE FROM sys_news_information WHERE id_ = #{id} UPDATE sys_news_information SET del_flag_ = 1,update_time_ = NOW() WHERE id_ = #{id} UPDATE sys_news_information SET status_ = if(status_ = 0,1,0),update_time_ = NOW() WHERE id_ = #{id}