Commit f869a5718df38236c7c637e286ae4e13097c55e7
1 parent
87c7b3fa
【新增】system user 和 role 接入新操作日志
Showing
4 changed files
with
3 additions
and
22 deletions
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; | @@ -7,8 +7,6 @@ package cn.iocoder.yudao.module.infra.enums; | ||
| 7 | */ | 7 | */ |
| 8 | public interface DictTypeConstants { | 8 | public interface DictTypeConstants { |
| 9 | 9 | ||
| 10 | - String REDIS_TIMEOUT_TYPE = "infra_redis_timeout_type"; // Redis 超时类型 | ||
| 11 | - | ||
| 12 | String JOB_STATUS = "infra_job_status"; // 定时任务状态的枚举 | 10 | String JOB_STATUS = "infra_job_status"; // 定时任务状态的枚举 |
| 13 | String JOB_LOG_STATUS = "infra_job_log_status"; // 定时任务日志状态的枚举 | 11 | String JOB_LOG_STATUS = "infra_job_log_status"; // 定时任务日志状态的枚举 |
| 14 | 12 | ||
| @@ -17,4 +15,6 @@ public interface DictTypeConstants { | @@ -17,4 +15,6 @@ public interface DictTypeConstants { | ||
| 17 | String CONFIG_TYPE = "infra_config_type"; // 参数配置类型 | 15 | String CONFIG_TYPE = "infra_config_type"; // 参数配置类型 |
| 18 | String BOOLEAN_STRING = "infra_boolean_string"; // Boolean 是否类型 | 16 | String BOOLEAN_STRING = "infra_boolean_string"; // Boolean 是否类型 |
| 19 | 17 | ||
| 18 | + String OPERATE_TYPE = "infra_operate_type"; // 操作类型 | ||
| 19 | + | ||
| 20 | } | 20 | } |
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 { | @@ -70,7 +70,7 @@ public class ApiAccessLogRespVO { | ||
| 70 | 70 | ||
| 71 | @Schema(description = "操作分类", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") | 71 | @Schema(description = "操作分类", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") |
| 72 | @ExcelProperty(value = "操作分类", converter = DictConvert.class) | 72 | @ExcelProperty(value = "操作分类", converter = DictConvert.class) |
| 73 | - @DictFormat(DictTypeConstants.OPERATE_TYPE) | 73 | + @DictFormat(cn.iocoder.yudao.module.infra.enums.DictTypeConstants.OPERATE_TYPE) |
| 74 | private Integer operateType; | 74 | private Integer operateType; |
| 75 | 75 | ||
| 76 | @Schema(description = "开始请求时间", requiredMode = Schema.RequiredMode.REQUIRED) | 76 | @Schema(description = "开始请求时间", requiredMode = Schema.RequiredMode.REQUIRED) |
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 { | @@ -14,8 +14,6 @@ public interface DictTypeConstants { | ||
| 14 | 14 | ||
| 15 | String USER_SEX = "system_user_sex"; // 用户性别 | 15 | String USER_SEX = "system_user_sex"; // 用户性别 |
| 16 | 16 | ||
| 17 | - String OPERATE_TYPE = "system_operate_type"; // 操作类型 | ||
| 18 | - | ||
| 19 | String LOGIN_TYPE = "system_login_type"; // 登录日志的类型 | 17 | String LOGIN_TYPE = "system_login_type"; // 登录日志的类型 |
| 20 | String LOGIN_RESULT = "system_login_result"; // 登录结果 | 18 | String LOGIN_RESULT = "system_login_result"; // 登录结果 |
| 21 | 19 |
yudao-module-system/yudao-module-system-biz/src/test/java/cn/iocoder/yudao/module/system/service/permission/RoleServiceImplTest.java
| @@ -80,23 +80,6 @@ public class RoleServiceImplTest extends BaseDbUnitTest { | @@ -80,23 +80,6 @@ public class RoleServiceImplTest extends BaseDbUnitTest { | ||
| 80 | } | 80 | } |
| 81 | 81 | ||
| 82 | @Test | 82 | @Test |
| 83 | - public void testUpdateRoleStatus() { | ||
| 84 | - // mock 数据 | ||
| 85 | - RoleDO roleDO = randomPojo(RoleDO.class, o -> o.setStatus(CommonStatusEnum.ENABLE.getStatus()) | ||
| 86 | - .setType(RoleTypeEnum.CUSTOM.getType())); | ||
| 87 | - roleMapper.insert(roleDO); | ||
| 88 | - | ||
| 89 | - // 准备参数 | ||
| 90 | - Long roleId = roleDO.getId(); | ||
| 91 | - | ||
| 92 | - // 调用 | ||
| 93 | - roleService.updateRoleStatus(roleId, CommonStatusEnum.DISABLE.getStatus()); | ||
| 94 | - // 断言 | ||
| 95 | - RoleDO dbRoleDO = roleMapper.selectById(roleId); | ||
| 96 | - assertEquals(CommonStatusEnum.DISABLE.getStatus(), dbRoleDO.getStatus()); | ||
| 97 | - } | ||
| 98 | - | ||
| 99 | - @Test | ||
| 100 | public void testUpdateRoleDataScope() { | 83 | public void testUpdateRoleDataScope() { |
| 101 | // mock 数据 | 84 | // mock 数据 |
| 102 | RoleDO roleDO = randomPojo(RoleDO.class, o -> o.setType(RoleTypeEnum.CUSTOM.getType())); | 85 | RoleDO roleDO = randomPojo(RoleDO.class, o -> o.setType(RoleTypeEnum.CUSTOM.getType())); |