元素类型为 "mapper" 的内容必须匹配 "(cache-ref|cache|resultMap*|parameterMap*|sql*|insert*|update*|delete*|select)
// 更新用户
<update id="updateclazz" parameterType="java.util.ArrayList" >
update user set current=current+1 ,surplus=surplus-1
where id in (
select cu.userId
from clazz_user cu
where clazzId in (
select c.id
from clazz c
<where>
clazzname in
<foreach close=")" collection="clazznames" item="name" open="(" separator=",">
#{name}
</foreach>
</where>
)
) and roleId = 5
mapper文件中,使用了java文件的习惯,注释信息用错了,改为<!-- 更新用户 -->即可