sql:
在navicat中执行正常,在mapper.xml执行异常
mapper.xml 正确方式:
<update id="updateMenuNumbers">
update sys_admin_menu_extend same set same.sys_menu_numbers = #{menuNumbers}
where same.sys_admin_id in
( select * from
( select same.sys_admin_id from sys_admin_menu_extend same, sys_admin_role sar
where same.sys_admin_id = sar.user_id and sar.role_id = #{roleId} and sar.t_status != 2
) temp
)
</update>
要在子查询外,再加一层查询并写别名!
评论前必须登录!
注册