a.id,
a.parent_id AS "parent.id",
a.parent_ids,
a.code,
a.name,
a.href,
a.target,
a.icon,
a.sort,
a.is_show,
a.permission,
a.remarks,
a.create_by AS "createBy.id",
a.create_date,
a.update_by AS "updateBy.id",
a.update_date,
a.del_flag,
a.quick_action,
a.menu_bg,
p.name AS "parent.name",
a.is_top,
a.function_id
INSERT INTO sys_menu(
parent_id,
parent_ids,
code,
name,
href,
target,
icon,
sort,
is_show,
permission,
create_by,
create_date,
update_by,
update_date,
remarks,
del_flag,
is_top,
function_id
) VALUES (
#{parent.id},
#{parentIds},
#{code},
#{name},
#{href},
#{target},
#{icon},
#{sort},
#{isShow},
#{permission},
#{createBy.id},
#{createDate},
#{updateBy.id},
#{updateDate},
#{remarks},
#{delFlag},
#{isTop},
#{functionId}
)
UPDATE sys_menu SET
parent_id = #{parent.id},
parent_ids = #{parentIds},
code=#{code},
name = #{name},
href = #{href},
target = #{target},
icon = #{icon},
sort = #{sort},
is_show = #{isShow},
permission = #{permission},
update_by = #{updateBy.id},
update_date = #{updateDate},
remarks = #{remarks},
is_top = #{isTop},
function_id=#{functionId}
WHERE id = #{id}
UPDATE sys_menu SET
parent_id = #{parent.id},
parent_ids = #{parentIds}
WHERE id = #{id}
UPDATE sys_menu SET
sort = #{sort}
WHERE id = #{id}
UPDATE sys_menu SET
del_flag = #{DEL_FLAG_DELETE}
WHERE id = #{id} OR parent_ids LIKE
'%,'||#{id}||',%'
'%,'+#{id}+',%'
CONCAT('%,', #{id}, ',%')