|
|
@@ -31,6 +31,7 @@ import com.ruoyi.system.service.ISysDeptService;
|
|
|
import com.ruoyi.system.service.ISysPostService;
|
|
|
import com.ruoyi.system.service.ISysRoleService;
|
|
|
import com.ruoyi.system.service.ISysUserService;
|
|
|
+import com.ruoyi.device.service.ITsbUserDeviceService;
|
|
|
|
|
|
/**
|
|
|
* 用户信息
|
|
|
@@ -53,6 +54,9 @@ public class SysUserController extends BaseController
|
|
|
@Autowired
|
|
|
private ISysPostService postService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private ITsbUserDeviceService tsbUserDeviceService;
|
|
|
+
|
|
|
/**
|
|
|
* 获取用户列表
|
|
|
*/
|
|
|
@@ -183,6 +187,9 @@ public class SysUserController extends BaseController
|
|
|
{
|
|
|
return error("当前用户不能删除");
|
|
|
}
|
|
|
+ // 先删除用户与设备的绑定关系
|
|
|
+ tsbUserDeviceService.deleteByUserIds(userIds);
|
|
|
+ // 再删除用户信息(包括角色、岗位关联)
|
|
|
return toAjax(userService.deleteUserByIds(userIds));
|
|
|
}
|
|
|
|