fix(项目管理): 修复公共脚本日志记录key错误问题

--bug=1039811 --user=王旭 【项目管理】日志-公共脚本删除,新建,编辑日志中无操作对象 https://www.tapd.cn/55049933/s/1504055
This commit is contained in:
WangXu10 2024-04-22 11:32:18 +08:00 committed by 刘瑞斌
parent a2da01b4d1
commit 2865447903
4 changed files with 7 additions and 7 deletions

View File

@ -42,7 +42,7 @@ public class CustomFunctionLogService {
null,
null,
OperationLogType.ADD.name(),
OperationLogModule.PROJECT_CUSTOM_FUNCTION,
OperationLogModule.PROJECT_MANAGEMENT_COMMON_SCRIPT,
request.getName());
dto.setHistory(true);
dto.setPath("/project/custom/func/add");
@ -66,7 +66,7 @@ public class CustomFunctionLogService {
request.getId(),
null,
OperationLogType.UPDATE.name(),
OperationLogModule.PROJECT_CUSTOM_FUNCTION,
OperationLogModule.PROJECT_MANAGEMENT_COMMON_SCRIPT,
request.getName());
dto.setHistory(true);
dto.setPath("/project/custom/func/update");
@ -86,7 +86,7 @@ public class CustomFunctionLogService {
customFunctionDTO.getId(),
null,
OperationLogType.UPDATE.name(),
OperationLogModule.PROJECT_CUSTOM_FUNCTION,
OperationLogModule.PROJECT_MANAGEMENT_COMMON_SCRIPT,
customFunctionDTO.getName());
dto.setHistory(true);
dto.setPath("/project/custom/func/status" );
@ -112,7 +112,7 @@ public class CustomFunctionLogService {
customFunctionDTO.getId(),
null,
OperationLogType.DELETE.name(),
OperationLogModule.PROJECT_CUSTOM_FUNCTION,
OperationLogModule.PROJECT_MANAGEMENT_COMMON_SCRIPT,
customFunctionDTO.getName());
dto.setHistory(true);
dto.setPath("/project/custom/func/delete");

View File

@ -174,7 +174,7 @@ public class CustomFunctionService {
*/
public List<OperationHistoryDTO> list(OperationHistoryRequest request) {
OperationHistoryExample example = new OperationHistoryExample();
example.createCriteria().andProjectIdEqualTo(request.getProjectId()).andModuleIn(List.of(OperationLogModule.PROJECT_CUSTOM_FUNCTION))
example.createCriteria().andProjectIdEqualTo(request.getProjectId()).andModuleIn(List.of(OperationLogModule.PROJECT_MANAGEMENT_COMMON_SCRIPT))
.andSourceIdEqualTo(request.getSourceId());
List<OperationHistory> history = operationHistoryMapper.selectByExample(example);
if (org.apache.commons.collections4.CollectionUtils.isEmpty(history)) {

View File

@ -127,7 +127,7 @@ public class OperationLogModule {
public static final String PROJECT_MANAGEMENT_TEMPLATE_BUG_FIELD = "PROJECT_MANAGEMENT_TEMPLATE_API_FIELD";
public static final String PROJECT_MANAGEMENT_TEMPLATE_TEST_PLAN_FIELD = "PROJECT_MANAGEMENT_TEMPLATE_API_FIELD";
public static final String PROJECT_CUSTOM_FUNCTION = "PROJECT_CUSTOM_FUNCTION";// 项目公共脚本
public static final String PROJECT_MANAGEMENT_COMMON_SCRIPT = "PROJECT_MANAGEMENT_COMMON_SCRIPT";// 项目公共脚本
//用例
public static final String FUNCTIONAL_CASE = "CASE_MANAGEMENT_CASE";

View File

@ -718,7 +718,7 @@ export const pathMap: PathMapItem[] = [
level: MENU_LEVEL[2],
},
{
key: ' PROJECT_CUSTOM_FUNCTION', // 项目管理-公共脚本
key: 'PROJECT_MANAGEMENT_COMMON_SCRIPT', // 项目管理-公共脚本
locale: 'menu.projectManagement.commonScript',
route: RouteEnum.PROJECT_MANAGEMENT_COMMON_SCRIPT,
permission: [],