a.id as "id",
a.notice_title as "noticeTitle",
a.notice_type as "noticeType",
cast(a.notice_content as char) AS "noticeContent",
cast(a.notice_content_html as char) AS "noticeContentHtml",
a.status AS "status",
a.create_by AS "createBy",
a.create_time AS "createTime",
a.update_by AS "updateBy",
a.update_time AS "updateTime",
a.update_ip AS "updateIp",
a.remark AS "remark",
a.version AS "version",
a.topping AS "topping",
a.carousel_img_url AS "carouselImgUrl",
a.carousel AS "carousel"
order by topping desc, a.create_time desc
insert into sys_notice (
id,
notice_title,
notice_type,
notice_content,
notice_content_html,
status,
topping,
carousel,
carousel_img_url,
remark,
create_by,
create_dept,
create_time,
update_by,
update_time,
update_ip,
del_flag,
version
)values(
#{id},
#{noticeTitle},
#{noticeType},
#{noticeContent},
#{noticeContentHtml},
#{status},
#{topping},
#{carousel},
#{carouselImgUrl},
#{remark},
#{createBy},
#{createDept},
#{createTime},
#{updateBy},
#{updateTime},
#{updateIp},
#{DEL_FLAG_NORMAL},
1
)
update sys_notice
notice_title = #{noticeTitle},
notice_type = #{noticeType},
topping = #{topping},
carousel = #{carousel},
carousel_img_url = #{carouselImgUrl},
notice_content = #{noticeContent},
notice_content_html = #{noticeContentHtml},
status = #{status},
update_by = #{updateBy},
update_time = #{updateTime},
update_ip = #{updateIp},
version = version + 1
where id = #{id}
UPDATE sys_notice SET
del_flag = #{DEL_FLAG_DELETE}
WHERE id = #{id}
UPDATE sys_notice SET
del_flag = #{DEL_FLAG_DELETE}
WHERE id in
#{ids}