sni.del_flag_=0 and sni.type_ = #{type} and sni.sub_type_ = #{subType} and sni.tenant_id_ = #{tenantId} and sni.status_ = #{status, typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler} and sni.title_ like '%' #{title} '%' and sni.title_ like '%' #{search} '%' and find_in_set(#{subjectId},sni.subject_id_list_) and sni.memo_ = #{memo} and (sni.memo_ is null or sni.memo_ = '') 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_,tenant_id_,attribute1_,attribute2_,subject_id_list_) VALUES(#{id},#{title},#{content},#{coverImage},#{videoCoverImage},#{type},#{onlineTime},#{offlineTime},#{subType},#{status, typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},now(),now(),#{linkUrl},#{hrefTarget},#{order},0,#{memo},#{tenantId},#{attribute1},#{attribute2},#{subjectIdList}) UPDATE sys_news_information status_ = #{status, typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}, title_ = #{title}, tenant_id_ = #{tenantId}, 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}, 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}