fix(接口测试): 修复批量复制接口没有复制自定义字段的缺陷
--bug=1026631 --user=王孝刚 【接口测试】api列表-批量复制多个api到其它模块下-查看复制的api-自定义字段未显示数据 https://www.tapd.cn/55049933/s/1377820
This commit is contained in:
parent
3f30861966
commit
07b9584d71
|
@ -1908,6 +1908,10 @@ public class ApiDefinitionService {
|
|||
// 检查附件复制出附件
|
||||
ApiFileUtil.copyBodyFiles(sourceId, api.getId());
|
||||
|
||||
List<CustomFieldResourceDTO> byResourceId = customFieldApiService.getByResourceId(sourceId);
|
||||
if (CollectionUtils.isNotEmpty(byResourceId)){
|
||||
customFieldApiService.addFields(api.getId(), byResourceId);
|
||||
}
|
||||
mapper.insert(api);
|
||||
if (i % 50 == 0) sqlSession.flushStatements();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue