From fff04954fcab42a07c9fd67df3853926298e69e7 Mon Sep 17 00:00:00 2001 From: lilong Date: Mon, 15 Apr 2024 22:19:16 +0800 Subject: [PATCH] =?UTF-8?q?feat:(REQ-2227)=20=E4=BF=AE=E6=94=B9=E8=A7=92?= =?UTF-8?q?=E8=89=B2=E7=A7=BB=E4=BD=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/role/SaasRoleController.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) 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(); }