fix(接口测试): 修复接口导入的数据有更新的,更新时间美有更新的缺陷

--bug=1037842 --user=王孝刚 【接口测试】swagger导入接口-覆盖,接口参数被更新后,接口的更新时间没变
https://www.tapd.cn/55049933/s/1502052
This commit is contained in:
wxg0103 2024-04-19 14:32:33 +08:00 committed by 刘瑞斌
parent 9dd8567dc6
commit 6f80635f6c
1 changed files with 2 additions and 4 deletions

View File

@ -394,10 +394,8 @@ public class ApiDefinitionImportUtilService {
private static void updateApiRequest(ImportRequest request, List<ApiDefinitionImportDetail> updateRequestData, List<String> updateModuleLists, ApiDefinitionMapper apiMapper, ApiDefinitionBlobMapper apiBlobMapper) { private static void updateApiRequest(ImportRequest request, List<ApiDefinitionImportDetail> updateRequestData, List<String> updateModuleLists, ApiDefinitionMapper apiMapper, ApiDefinitionBlobMapper apiBlobMapper) {
updateRequestData.forEach(t -> { updateRequestData.forEach(t -> {
ApiDefinition apiDefinition = new ApiDefinition(); ApiDefinition apiDefinition = new ApiDefinition();
if (CollectionUtils.isNotEmpty(updateModuleLists) && updateModuleLists.contains(t.getId())) { apiDefinition.setId(t.getId());
apiDefinition.setId(t.getId()); apiDefinition.setUpdateUser(request.getUserId());
apiDefinition.setUpdateUser(request.getUserId());
}
apiDefinition.setUpdateTime(System.currentTimeMillis()); apiDefinition.setUpdateTime(System.currentTimeMillis());
apiMapper.updateByPrimaryKeySelective(apiDefinition); apiMapper.updateByPrimaryKeySelective(apiDefinition);
//更新blob数据 //更新blob数据