fix(接口测试): 用例批量同步,变更记录缺少操作人
--bug=1045134 --user=陈建星 【接口测试】定义-CASE-勾选CASE-批量同步-查看CASE的变更历史-操作人显示为- https://www.tapd.cn/55049933/s/1562814
This commit is contained in:
parent
c51fd939cb
commit
a40fcf5528
|
@ -236,7 +236,7 @@ public class ApiTestCaseLogService {
|
|||
saveBatchLog(projectId, apiTestCases, operator, OperationLogType.RECOVER.name(), false, OperationLogModule.API_TEST_MANAGEMENT_RECYCLE);
|
||||
}
|
||||
|
||||
public void batchSyncLog(Map<String, ApiTestCaseLogDTO> originMap, Map<String, ApiTestCaseLogDTO> modifiedMap, Project project) {
|
||||
public void batchSyncLog(Map<String, ApiTestCaseLogDTO> originMap, Map<String, ApiTestCaseLogDTO> modifiedMap, Project project, String userId) {
|
||||
List<LogDTO> logs = new ArrayList<>();
|
||||
originMap.forEach((id, origin) -> {
|
||||
ApiTestCaseLogDTO modified = modifiedMap.get(id);
|
||||
|
@ -251,7 +251,7 @@ public class ApiTestCaseLogService {
|
|||
.method(HttpMethodConstants.POST.name())
|
||||
.sourceId(id)
|
||||
.content(origin.getName())
|
||||
.createUser(null)
|
||||
.createUser(userId)
|
||||
.path(OperationLogAspect.getPath())
|
||||
.originalValue(ApiDataUtils.toJSONBytes(origin))
|
||||
.modifiedValue(ApiDataUtils.toJSONBytes(modified))
|
||||
|
|
|
@ -1062,7 +1062,7 @@ public class ApiTestCaseService extends MoveNodeService {
|
|||
modifiedMap.put(apiTestCase.getId(), originCase);
|
||||
}
|
||||
}
|
||||
apiTestCaseLogService.batchSyncLog(originMap, modifiedMap, project);
|
||||
apiTestCaseLogService.batchSyncLog(originMap, modifiedMap, project, userId);
|
||||
|
||||
User user = userMapper.selectByPrimaryKey(userId);
|
||||
apiTestCaseNoticeService.batchSyncSendNotice(new ArrayList<>(modifiedMap.values()), user, project.getId(), request.getNotificationConfig(), NoticeConstants.Event.CASE_UPDATE);
|
||||
|
|
Loading…
Reference in New Issue