提交代码
parent
4c189dd5a4
commit
5fb316b69f
|
@ -71,12 +71,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
<delete id="deleteSysUserExtById" parameterType="SysUserExt">
|
<delete id="deleteSysUserExtById" parameterType="SysUserExt">
|
||||||
delete from sys_user_ext where user_id = #{userId} and project_id=#{projectId}
|
update sys_user_ext set status=1
|
||||||
|
<where>
|
||||||
|
<if test="userId != null">and user_id = #{userId}</if>
|
||||||
|
<if test="projectId != null">and project_id = #{projectId}</if>
|
||||||
|
</where>
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
<update id="clearAllActive" parameterType="SysUserExt">
|
<update id="clearAllActive" parameterType="SysUserExt">
|
||||||
update sys_user_ext set is_active=0 where user_id=#{userId} and com_id=#{comId}
|
update sys_user_ext set is_active=0 where user_id=#{userId} and com_id=#{comId}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
<update id="setActive" parameterType="SysUserExt">
|
<update id="setActive" parameterType="SysUserExt">
|
||||||
update sys_user_ext set is_active=1 where user_id=#{userId} and com_id=#{comId} and project_id=#{projectId}
|
update sys_user_ext set is_active=1 where user_id=#{userId} and com_id=#{comId} and project_id=#{projectId}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
|
@ -48,5 +48,10 @@ public interface ISysUserExtService
|
||||||
*/
|
*/
|
||||||
public int deleteSysUserExtById(SysUserExt sysUserExt);
|
public int deleteSysUserExtById(SysUserExt sysUserExt);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除系统用户扩展信息
|
||||||
|
*/
|
||||||
|
public int deleteSysUserExtByUserId(Long user);
|
||||||
|
|
||||||
public void updateBySysUser(SysUser sysUser);
|
public void updateBySysUser(SysUser sysUser);
|
||||||
}
|
}
|
||||||
|
|
|
@ -77,6 +77,17 @@ public class SysUserExtServiceImpl implements ISysUserExtService
|
||||||
return sysUserExtMapper.deleteSysUserExtById(sysUserExt);
|
return sysUserExtMapper.deleteSysUserExtById(sysUserExt);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除系统用户扩展信息
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteSysUserExtByUserId(Long userId)
|
||||||
|
{
|
||||||
|
SysUserExt sysUserExt = new SysUserExt();
|
||||||
|
sysUserExt.setUserId(userId);
|
||||||
|
return sysUserExtMapper.deleteSysUserExtById(sysUserExt);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updateBySysUser(SysUser sysUser) {
|
public void updateBySysUser(SysUser sysUser) {
|
||||||
SysUserExt where=new SysUserExt();
|
SysUserExt where=new SysUserExt();
|
||||||
|
|
|
@ -890,6 +890,8 @@ public class SysUserServiceImpl implements ISysUserService
|
||||||
userRoleMapper.deleteUserRoleByUserId(userId);
|
userRoleMapper.deleteUserRoleByUserId(userId);
|
||||||
// 删除用户与岗位表
|
// 删除用户与岗位表
|
||||||
userPostMapper.deleteUserPostByUserId(userId);
|
userPostMapper.deleteUserPostByUserId(userId);
|
||||||
|
// 删除用户岗位映射表
|
||||||
|
userExtService.deleteSysUserExtByUserId(userId);
|
||||||
return userMapper.deleteUserById(userId);
|
return userMapper.deleteUserById(userId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -907,6 +909,8 @@ public class SysUserServiceImpl implements ISysUserService
|
||||||
{
|
{
|
||||||
checkUserAllowed(new SysUser(userId));
|
checkUserAllowed(new SysUser(userId));
|
||||||
checkUserDataScope(userId);
|
checkUserDataScope(userId);
|
||||||
|
// 删除用户岗位映射表
|
||||||
|
userExtService.deleteSysUserExtByUserId(userId);
|
||||||
}
|
}
|
||||||
// 删除用户与角色关联
|
// 删除用户与角色关联
|
||||||
userRoleMapper.deleteUserRole(userIds);
|
userRoleMapper.deleteUserRole(userIds);
|
||||||
|
|
Loading…
Reference in New Issue