SELECT a.id, a.user_id, a.channel_id, a.model_id, a.title, a.flag, a.style, a.image, a.keywords, a.description, a.tags, a.weigh, a.views, a.comments, a.likes, a.dislikes, a.diyname, a.createtime, a.updatetime, a.publishtime, a.deletetime, a.memo, a.`status`, a.admin_id, a.data_org, a.subtitle, a.origin, a.image_list, a.rejection_desc, a.rejection_time, a.audit_status, if(a.admin_id != 0, u.nick_name, zu.nickname) as user_name, if(a.admin_id != 0, u.avatar, zu.avatar) as avatar from zdy_cms_archives a left join sys_user u on a.admin_id = u.user_id left join zdy_user zu on a.user_id= zu.id insert into zdy_cms_archives user_id, channel_id, model_id, title, flag, style, image, keywords, description, tags, weigh, views, comments, likes, dislikes, diyname, createtime, updatetime, publishtime, deletetime, memo, status, admin_id, subtitle, origin, image_list, rejection_desc, rejection_time audit_status, #{userId}, #{channelId}, #{modelId}, #{title}, #{flag}, #{style}, #{image}, #{keywords}, #{description}, #{tags}, #{weigh}, #{views}, #{comments}, #{likes}, #{dislikes}, #{diyname}, #{createtime}, #{updatetime}, #{publishtime}, #{deletetime}, #{memo}, #{status}, #{adminId}, #{subtitle}, #{origin}, #{imageList}, #{rejectionDesc}, #{rejectionTime}, #{auditStatus}, update zdy_cms_archives user_id = #{userId}, channel_id = #{channelId}, model_id = #{modelId}, title = #{title}, flag = #{flag}, flag = '', style = #{style}, image = #{image}, keywords = #{keywords}, description = #{description}, tags = #{tags}, weigh = #{weigh}, views = #{views}, comments = #{comments}, likes = #{likes}, dislikes = #{dislikes}, diyname = #{diyname}, createtime = #{createtime}, updatetime = #{updatetime}, publishtime = #{publishtime}, deletetime = #{deletetime}, memo = #{memo}, status = #{status}, admin_id = #{adminId}, subtitle = #{subtitle}, origin = #{origin}, image_list = #{imageList}, rejection_desc = #{rejectionDesc}, rejection_time = #{rejectionTime}, audit_status = #{auditStatus}, where id = #{id} delete from zdy_cms_archives where id = #{id} delete from zdy_cms_archives where id in #{id} update zdy_cms_archives set deletetime = UNIX_TIMESTAMP(now()) where id in #{id} insert into ${tableName} ${key} #{value} on duplicate key update ${key} = values(${key}) insert into ${zdyCmsModel.table} (id, content) values (#{id}, #{content}) on duplicate key update content = values (content) update zdy_cms_archives set comments = comments + #{comments} where id = #{id} update zdy_cms_archives set `status` = #{status} where id = #{id}