fix(用例管理): 修复新增/编辑用例记录的日志所属模块不详细问题

--bug=1035361 --user=王旭 【系统设置】组织-日志,操作对象选择子菜单无法找到数据 https://www.tapd.cn/55049933/s/1460562
This commit is contained in:
WangXu10 2024-02-05 15:14:37 +08:00 committed by 刘瑞斌
parent 87c2ee444b
commit a7b04cc69b
4 changed files with 13 additions and 10 deletions

View File

@ -71,7 +71,7 @@ public class FunctionalCaseLogService {
requests.getId(), requests.getId(),
null, null,
OperationLogType.UPDATE.name(), OperationLogType.UPDATE.name(),
OperationLogModule.FUNCTIONAL_CASE, OperationLogModule.CASE_MANAGEMENT_CASE_UPDATE,
requests.getName()); requests.getName());
dto.setHistory(true); dto.setHistory(true);
dto.setPath("/functional/case/update"); dto.setPath("/functional/case/update");

View File

@ -179,7 +179,7 @@ public class FunctionalCaseService {
//记录日志 //记录日志
FunctionalCaseHistoryLogDTO historyLogDTO = getImportLogModule(functionalCase); FunctionalCaseHistoryLogDTO historyLogDTO = getImportLogModule(functionalCase);
saveImportDataLog(functionalCase, new FunctionalCaseHistoryLogDTO(), historyLogDTO, userId, organizationId, OperationLogType.ADD.name()); saveImportDataLog(functionalCase, new FunctionalCaseHistoryLogDTO(), historyLogDTO, userId, organizationId, OperationLogType.ADD.name(),OperationLogModule.CASE_MANAGEMENT_CASE_CREATE);
return functionalCase; return functionalCase;
} }
@ -962,7 +962,7 @@ public class FunctionalCaseService {
List<FunctionalCaseCustomField> customFields = functionalCaseCustomFieldMapper.selectByExample(fieldExample); List<FunctionalCaseCustomField> customFields = functionalCaseCustomFieldMapper.selectByExample(fieldExample);
FunctionalCaseHistoryLogDTO historyLogDTO = new FunctionalCaseHistoryLogDTO(functionalCase, caseBlob, customFields, new ArrayList<>(), new ArrayList<>()); FunctionalCaseHistoryLogDTO historyLogDTO = new FunctionalCaseHistoryLogDTO(functionalCase, caseBlob, customFields, new ArrayList<>(), new ArrayList<>());
saveImportDataLog(functionalCase, new FunctionalCaseHistoryLogDTO(), historyLogDTO, userId, organizationId, OperationLogType.IMPORT.name()); saveImportDataLog(functionalCase, new FunctionalCaseHistoryLogDTO(), historyLogDTO, userId, organizationId, OperationLogType.IMPORT.name(),OperationLogModule.CASE_MANAGEMENT_CASE_CREATE);
} }
@ -1071,7 +1071,7 @@ public class FunctionalCaseService {
//记录新值 //记录新值
FunctionalCaseHistoryLogDTO modifiedLogDTO = getImportLogModule(functionalCase); FunctionalCaseHistoryLogDTO modifiedLogDTO = getImportLogModule(functionalCase);
//记录日志 //记录日志
saveImportDataLog(functionalCase, originalValue, modifiedLogDTO, userId, organizationId, OperationLogType.IMPORT.name()); saveImportDataLog(functionalCase, originalValue, modifiedLogDTO, userId, organizationId, OperationLogType.IMPORT.name(),OperationLogModule.CASE_MANAGEMENT_CASE_UPDATE);
} }
private void handleUpdateCustomField(FunctionalCaseExcelData functionalCaseExcelData, String caseId, FunctionalCaseCustomFieldMapper customFieldMapper, Map<String, TemplateCustomFieldDTO> customFieldsMap) { private void handleUpdateCustomField(FunctionalCaseExcelData functionalCaseExcelData, String caseId, FunctionalCaseCustomFieldMapper customFieldMapper, Map<String, TemplateCustomFieldDTO> customFieldsMap) {
@ -1089,14 +1089,14 @@ public class FunctionalCaseService {
* @param originalValue 原值 * @param originalValue 原值
* @param modifiedLogDTO 新值 * @param modifiedLogDTO 新值
*/ */
private void saveImportDataLog(FunctionalCase functionalCase, FunctionalCaseHistoryLogDTO originalValue, FunctionalCaseHistoryLogDTO modifiedLogDTO, String userId, String organizationId, String type) { private void saveImportDataLog(FunctionalCase functionalCase, FunctionalCaseHistoryLogDTO originalValue, FunctionalCaseHistoryLogDTO modifiedLogDTO, String userId, String organizationId, String type,String module) {
LogDTO dto = new LogDTO( LogDTO dto = new LogDTO(
functionalCase.getProjectId(), functionalCase.getProjectId(),
organizationId, organizationId,
functionalCase.getId(), functionalCase.getId(),
userId, userId,
type, type,
OperationLogModule.FUNCTIONAL_CASE, module,
functionalCase.getName()); functionalCase.getName());
dto.setHistory(true); dto.setHistory(true);
dto.setPath("/functional/case/import/excel"); dto.setPath("/functional/case/import/excel");

View File

@ -92,6 +92,9 @@ public class OperationLogModule {
//用例 //用例
public static final String FUNCTIONAL_CASE = "CASE_MANAGEMENT_CASE"; public static final String FUNCTIONAL_CASE = "CASE_MANAGEMENT_CASE";
public static final String CASE_MANAGEMENT_CASE_CREATE = "CASE_MANAGEMENT_CASE_CREATE";
public static final String CASE_MANAGEMENT_CASE_UPDATE = "CASE_MANAGEMENT_CASE_UPDATE";
public static final String CASE_MANAGEMENT_CASE_RECYCLE = "CASE_MANAGEMENT_CASE_RECYCLE";
public static final String CASE_REVIEW = "CASE_MANAGEMENT_REVIEW"; public static final String CASE_REVIEW = "CASE_MANAGEMENT_REVIEW";

View File

@ -375,13 +375,13 @@ export const pathMap: PathMapItem[] = [
permission: [], permission: [],
level: MENU_LEVEL[2], level: MENU_LEVEL[2],
}, },
{ /*{
key: 'PROJECT_MANAGEMENT_PERMISSION_VERSION', // 项目管理-项目与权限-项目版本 key: 'PROJECT_MANAGEMENT_PERMISSION_VERSION', // 项目管理-项目与权限-项目版本
locale: 'project.permission.projectVersion', locale: 'project.permission.projectVersion',
route: RouteEnum.PROJECT_MANAGEMENT_PERMISSION_VERSION, route: RouteEnum.PROJECT_MANAGEMENT_PERMISSION_VERSION,
permission: [], permission: [],
level: MENU_LEVEL[2], level: MENU_LEVEL[2],
}, },*/
{ {
key: 'PROJECT_MANAGEMENT_PERMISSION_MEMBER', // 项目管理-项目与权限-成员 key: 'PROJECT_MANAGEMENT_PERMISSION_MEMBER', // 项目管理-项目与权限-成员
locale: 'project.permission.member', locale: 'project.permission.member',
@ -497,7 +497,7 @@ export const pathMap: PathMapItem[] = [
], ],
}, },
// 测试计划 // 测试计划
{ /*{
key: 'TEST_PLAN', // 测试计划 key: 'TEST_PLAN', // 测试计划
locale: 'menu.testPlan', locale: 'menu.testPlan',
route: RouteEnum.TEST_PLAN, route: RouteEnum.TEST_PLAN,
@ -512,7 +512,7 @@ export const pathMap: PathMapItem[] = [
level: MENU_LEVEL[2], level: MENU_LEVEL[2],
}, },
], ],
}, },*/
{ {
key: 'PERSONAL_INFORMATION', // 个人信息 key: 'PERSONAL_INFORMATION', // 个人信息
locale: 'ms.personal', locale: 'ms.personal',