|
@@ -17,8 +17,8 @@
|
|
|
</select>
|
|
|
|
|
|
<!--先去数据库查询 看是否已有的账号不能在修改了 -->
|
|
|
- <select id="findUserByuserIdandusername" parameterType="com.fuzamei.entity.User" resultType = "com.fuzamei.entity.User">
|
|
|
- select * from users where user_id != #{userId} and username = #{username}
|
|
|
+ <select id="findUserByuserIdandusername" parameterType="com.fuzamei.entity.User" resultType = "int">
|
|
|
+ select count(*) from users where username = #{username}
|
|
|
</select>
|
|
|
<!--根据用户id 查询角色名称 --><!-- ??????????待待删??? -->
|
|
|
<select id="selectRoleNameByuserId">
|
|
@@ -83,7 +83,7 @@
|
|
|
|
|
|
<!--参数类型为1001,1002,1003等, 批量删除 -->
|
|
|
<delete id="deleteFromUserId" parameterType="string">
|
|
|
- delete from users where user_id in
|
|
|
+ delete from users where user_id in (userids)
|
|
|
<foreach item="userids" collection="array" open="(" separator="," close=")">
|
|
|
#{userids}
|
|
|
</foreach>
|
|
@@ -110,5 +110,14 @@
|
|
|
#{hash})
|
|
|
</insert>
|
|
|
|
|
|
+
|
|
|
+ <insert id="insertOperationHistoryOfDelete" parameterType="User">
|
|
|
+ insert into
|
|
|
+ operation_history_admin(operator_id,operation_type_id,be_operated_id,operation_time,hash)
|
|
|
+ values
|
|
|
+ <foreach collection="#{userIdbs}" separator="," item="userIdb">
|
|
|
+ (#{userId},#{operationTypeId},#{userIdb},#{operationTime},#{hash})
|
|
|
+ </foreach>
|
|
|
+ </insert>
|
|
|
|
|
|
</mapper>
|