浏览代码

修复sql错误

zhouhao 6 年之前
父节点
当前提交
2beb911b3b

+ 2 - 2
hsweb-system/hsweb-system-authorization/hsweb-system-authorization-local/src/main/resources/org/hswebframework/web/dao/mybatis/mappers/authorization/UserRoleMapper.xml

@@ -49,12 +49,12 @@
 
     <select id="selectByUserId" parameterType="string" resultMap="UserRoleResultMap">
         <include refid="config"/> <include refid="BasicMapper.switcher"/>
-        delete from ${_fullTableName} where user_id=#{id}
+        select * from ${_fullTableName} where user_id=#{id}
     </select>
 
     <select id="selectByRoleId" parameterType="String" resultMap="UserRoleResultMap">
         <include refid="config"/> <include refid="BasicMapper.switcher"/>
-        delete from ${_fullTableName} where role_id=#{id}
+        select * from ${_fullTableName} where role_id=#{id}
     </select>
 
 </mapper>