From f869a5718df38236c7c637e286ae4e13097c55e7 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Thu, 4 Apr 2024 09:57:06 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E6=96=B0=E5=A2=9E=E3=80=91system=20us?= =?UTF-8?q?er=20=E5=92=8C=20role=20=E6=8E=A5=E5=85=A5=E6=96=B0=E6=93=8D?= =?UTF-8?q?=E4=BD=9C=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../module/infra/enums/DictTypeConstants.java | 4 ++-- .../vo/apiaccesslog/ApiAccessLogRespVO.java | 2 +- .../module/system/enums/DictTypeConstants.java | 2 -- .../service/permission/RoleServiceImplTest.java | 17 ----------------- 4 files changed, 3 insertions(+), 22 deletions(-) diff --git a/yudao-module-infra/yudao-module-infra-api/src/main/java/cn/iocoder/yudao/module/infra/enums/DictTypeConstants.java b/yudao-module-infra/yudao-module-infra-api/src/main/java/cn/iocoder/yudao/module/infra/enums/DictTypeConstants.java index 53ab807cb..36ad63d56 100644 --- a/yudao-module-infra/yudao-module-infra-api/src/main/java/cn/iocoder/yudao/module/infra/enums/DictTypeConstants.java +++ b/yudao-module-infra/yudao-module-infra-api/src/main/java/cn/iocoder/yudao/module/infra/enums/DictTypeConstants.java @@ -7,8 +7,6 @@ package cn.iocoder.yudao.module.infra.enums; */ public interface DictTypeConstants { - String REDIS_TIMEOUT_TYPE = "infra_redis_timeout_type"; // Redis 超时类型 - String JOB_STATUS = "infra_job_status"; // 定时任务状态的枚举 String JOB_LOG_STATUS = "infra_job_log_status"; // 定时任务日志状态的枚举 @@ -17,4 +15,6 @@ public interface DictTypeConstants { String CONFIG_TYPE = "infra_config_type"; // 参数配置类型 String BOOLEAN_STRING = "infra_boolean_string"; // Boolean 是否类型 + String OPERATE_TYPE = "infra_operate_type"; // 操作类型 + } diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/logger/vo/apiaccesslog/ApiAccessLogRespVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/logger/vo/apiaccesslog/ApiAccessLogRespVO.java index ff0fed7a3..e991450a4 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/logger/vo/apiaccesslog/ApiAccessLogRespVO.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/logger/vo/apiaccesslog/ApiAccessLogRespVO.java @@ -70,7 +70,7 @@ public class ApiAccessLogRespVO { @Schema(description = "操作分类", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") @ExcelProperty(value = "操作分类", converter = DictConvert.class) - @DictFormat(DictTypeConstants.OPERATE_TYPE) + @DictFormat(cn.iocoder.yudao.module.infra.enums.DictTypeConstants.OPERATE_TYPE) private Integer operateType; @Schema(description = "开始请求时间", requiredMode = Schema.RequiredMode.REQUIRED) diff --git a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/enums/DictTypeConstants.java b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/enums/DictTypeConstants.java index c0e342383..d7967fe28 100644 --- a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/enums/DictTypeConstants.java +++ b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/enums/DictTypeConstants.java @@ -14,8 +14,6 @@ public interface DictTypeConstants { String USER_SEX = "system_user_sex"; // 用户性别 - String OPERATE_TYPE = "system_operate_type"; // 操作类型 - String LOGIN_TYPE = "system_login_type"; // 登录日志的类型 String LOGIN_RESULT = "system_login_result"; // 登录结果 diff --git a/yudao-module-system/yudao-module-system-biz/src/test/java/cn/iocoder/yudao/module/system/service/permission/RoleServiceImplTest.java b/yudao-module-system/yudao-module-system-biz/src/test/java/cn/iocoder/yudao/module/system/service/permission/RoleServiceImplTest.java index d2c400719..941b7bca1 100644 --- a/yudao-module-system/yudao-module-system-biz/src/test/java/cn/iocoder/yudao/module/system/service/permission/RoleServiceImplTest.java +++ b/yudao-module-system/yudao-module-system-biz/src/test/java/cn/iocoder/yudao/module/system/service/permission/RoleServiceImplTest.java @@ -79,23 +79,6 @@ public class RoleServiceImplTest extends BaseDbUnitTest { assertPojoEquals(reqVO, newRoleDO); } - @Test - public void testUpdateRoleStatus() { - // mock 数据 - RoleDO roleDO = randomPojo(RoleDO.class, o -> o.setStatus(CommonStatusEnum.ENABLE.getStatus()) - .setType(RoleTypeEnum.CUSTOM.getType())); - roleMapper.insert(roleDO); - - // 准备参数 - Long roleId = roleDO.getId(); - - // 调用 - roleService.updateRoleStatus(roleId, CommonStatusEnum.DISABLE.getStatus()); - // 断言 - RoleDO dbRoleDO = roleMapper.selectById(roleId); - assertEquals(CommonStatusEnum.DISABLE.getStatus(), dbRoleDO.getStatus()); - } - @Test public void testUpdateRoleDataScope() { // mock 数据