fix(接口测试): 分享操作日志跳转问题

--bug=1047818 --user=宋昌昌 【接口测试】定义-分享-新建/编辑分享-操作日志-点击名称跳转报错 https://www.tapd.cn/55049933/s/1596290
This commit is contained in:
song-cc-rock 2024-10-23 14:00:51 +08:00 committed by Craftsman
parent 6a6297bdfd
commit 21e12756d9
4 changed files with 15 additions and 4 deletions

View File

@ -26,7 +26,7 @@ public class ApiDocShareLogService {
* @return 日志
*/
public LogDTO addLog(ApiDocShareEditRequest request) {
LogDTO dto = new LogDTO(request.getProjectId(), null, null, null,OperationLogType.SHARE.name(), OperationLogModule.API_TEST_MANAGEMENT_DEFINITION, request.getName());
LogDTO dto = new LogDTO(request.getProjectId(), null, null, null,OperationLogType.SHARE.name(), OperationLogModule.API_TEST_MANAGEMENT_DEFINITION_SHARE, request.getName());
dto.setHistory(true);
dto.setMethod(HttpMethodConstants.POST.name());
dto.setOriginalValue(JSON.toJSONBytes(request));
@ -40,7 +40,7 @@ public class ApiDocShareLogService {
* @return 日志
*/
public LogDTO updateLog(ApiDocShareEditRequest request) {
LogDTO dto = new LogDTO(request.getProjectId(), null, null, null,OperationLogType.UPDATE.name(), OperationLogModule.API_TEST_MANAGEMENT_DEFINITION, "【分享接口功能】" + request.getName());
LogDTO dto = new LogDTO(request.getProjectId(), null, null, null,OperationLogType.UPDATE.name(), OperationLogModule.API_TEST_MANAGEMENT_DEFINITION_SHARE, request.getName());
dto.setHistory(true);
dto.setMethod(HttpMethodConstants.POST.name());
dto.setOriginalValue(JSON.toJSONBytes(request));
@ -55,7 +55,7 @@ public class ApiDocShareLogService {
*/
public LogDTO deleteLog(String id) {
ApiDocShare docShare = apiDocShareMapper.selectByPrimaryKey(id);
LogDTO dto = new LogDTO(docShare.getProjectId(), null, null, null,OperationLogType.DELETE.name(), OperationLogModule.API_TEST_MANAGEMENT_DEFINITION, "【分享接口功能】" + docShare.getName());
LogDTO dto = new LogDTO(docShare.getProjectId(), null, null, null,OperationLogType.DELETE.name(), OperationLogModule.API_TEST_MANAGEMENT_DEFINITION_SHARE, docShare.getName());
dto.setHistory(true);
dto.setMethod(HttpMethodConstants.POST.name());
dto.setOriginalValue(JSON.toJSONBytes(docShare));

View File

@ -20,6 +20,7 @@ public class OperationLogModule {
public static final String API_AUTOMATION_REPORT = "API_AUTOMATION_REPORT";
// 接口管理
public static final String API_TEST_MANAGEMENT_DEFINITION = "API_TEST_MANAGEMENT_DEFINITION";
public static final String API_TEST_MANAGEMENT_DEFINITION_SHARE = "API_TEST_MANAGEMENT_DEFINITION_SHARE";
public static final String API_TEST_MANAGEMENT_MODULE = "API_TEST_MANAGEMENT_MODULE";
public static final String API_TEST_MANAGEMENT_MOCK = "API_TEST_MANAGEMENT_MOCK";
public static final String API_TEST_MANAGEMENT_CASE = "API_TEST_MANAGEMENT_CASE";

View File

@ -81,6 +81,15 @@ export const pathMap: PathMapItem[] = [
routeQuery: {
tab: 'api',
},
children: [
{
key: 'API_TEST_MANAGEMENT_DEFINITION_SHARE', // 接口测试-接口定义-模块
locale: 'common.share',
route: RouteEnum.API_TEST_MANAGEMENT,
permission: [],
level: MENU_LEVEL[2],
},
],
},
{
key: 'API_TEST_MANAGEMENT_MOCK', // 接口测试-接口定义-mock

View File

@ -140,7 +140,8 @@
record.module === 'SYSTEM' ||
record.type === 'DELETE' ||
record.module.includes('MODULE') ||
record.module.includes('TASK_CENTER')
record.module.includes('TASK_CENTER') ||
record.module.includes('API_TEST_MANAGEMENT_DEFINITION_SHARE')
"
class="one-line-text"
>