diff --git a/tyr-server/src/main/java/cn/axzo/tyr/server/controller/role/SaasRoleController.java b/tyr-server/src/main/java/cn/axzo/tyr/server/controller/role/SaasRoleController.java index aa6e8282..7352f439 100644 --- a/tyr-server/src/main/java/cn/axzo/tyr/server/controller/role/SaasRoleController.java +++ b/tyr-server/src/main/java/cn/axzo/tyr/server/controller/role/SaasRoleController.java @@ -260,15 +260,15 @@ public class SaasRoleController implements TyrSaasRoleApi { if (exchangeRole == null) { throw new ServiceException("未找到可以移动的位置"); } - roleService.saveOrUpdate(SaveOrUpdateRoleVO.builder() - .id(saasRole.getId()) - .sort(exchangeRole.getSort()) - .build()); + SaasRole newSaasRole = new SaasRole(); + newSaasRole.setId(saasRole.getId()); + newSaasRole.setSort(exchangeRole.getSort()); + roleService.updateById(newSaasRole); - roleService.saveOrUpdate(SaveOrUpdateRoleVO.builder() - .id(exchangeRole.getId()) - .sort(saasRole.getSort()) - .build()); + SaasRole oldSaasRole = new SaasRole(); + oldSaasRole.setId(exchangeRole.getId()); + oldSaasRole.setSort(saasRole.getSort()); + roleService.updateById(oldSaasRole); return ApiResult.ok(); }