【新增】system user 和 role 接入新操作日志
This commit is contained in:
parent
87c7b3fac2
commit
f869a5718d
@ -7,8 +7,6 @@ package cn.iocoder.yudao.module.infra.enums;
|
|||||||
*/
|
*/
|
||||||
public interface DictTypeConstants {
|
public interface DictTypeConstants {
|
||||||
|
|
||||||
String REDIS_TIMEOUT_TYPE = "infra_redis_timeout_type"; // Redis 超时类型
|
|
||||||
|
|
||||||
String JOB_STATUS = "infra_job_status"; // 定时任务状态的枚举
|
String JOB_STATUS = "infra_job_status"; // 定时任务状态的枚举
|
||||||
String JOB_LOG_STATUS = "infra_job_log_status"; // 定时任务日志状态的枚举
|
String JOB_LOG_STATUS = "infra_job_log_status"; // 定时任务日志状态的枚举
|
||||||
|
|
||||||
@ -17,4 +15,6 @@ public interface DictTypeConstants {
|
|||||||
String CONFIG_TYPE = "infra_config_type"; // 参数配置类型
|
String CONFIG_TYPE = "infra_config_type"; // 参数配置类型
|
||||||
String BOOLEAN_STRING = "infra_boolean_string"; // Boolean 是否类型
|
String BOOLEAN_STRING = "infra_boolean_string"; // Boolean 是否类型
|
||||||
|
|
||||||
|
String OPERATE_TYPE = "infra_operate_type"; // 操作类型
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -70,7 +70,7 @@ public class ApiAccessLogRespVO {
|
|||||||
|
|
||||||
@Schema(description = "操作分类", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
@Schema(description = "操作分类", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||||
@ExcelProperty(value = "操作分类", converter = DictConvert.class)
|
@ExcelProperty(value = "操作分类", converter = DictConvert.class)
|
||||||
@DictFormat(DictTypeConstants.OPERATE_TYPE)
|
@DictFormat(cn.iocoder.yudao.module.infra.enums.DictTypeConstants.OPERATE_TYPE)
|
||||||
private Integer operateType;
|
private Integer operateType;
|
||||||
|
|
||||||
@Schema(description = "开始请求时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
@Schema(description = "开始请求时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
@ -14,8 +14,6 @@ public interface DictTypeConstants {
|
|||||||
|
|
||||||
String USER_SEX = "system_user_sex"; // 用户性别
|
String USER_SEX = "system_user_sex"; // 用户性别
|
||||||
|
|
||||||
String OPERATE_TYPE = "system_operate_type"; // 操作类型
|
|
||||||
|
|
||||||
String LOGIN_TYPE = "system_login_type"; // 登录日志的类型
|
String LOGIN_TYPE = "system_login_type"; // 登录日志的类型
|
||||||
String LOGIN_RESULT = "system_login_result"; // 登录结果
|
String LOGIN_RESULT = "system_login_result"; // 登录结果
|
||||||
|
|
||||||
|
@ -79,23 +79,6 @@ public class RoleServiceImplTest extends BaseDbUnitTest {
|
|||||||
assertPojoEquals(reqVO, newRoleDO);
|
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
|
@Test
|
||||||
public void testUpdateRoleDataScope() {
|
public void testUpdateRoleDataScope() {
|
||||||
// mock 数据
|
// mock 数据
|
||||||
|
Loading…
Reference in New Issue
Block a user