|
@@ -7,6 +7,8 @@ using Microsoft.AspNetCore.Mvc;
|
|
|
using Vo.Admin;
|
|
using Vo.Admin;
|
|
|
using Dto.Admin;
|
|
using Dto.Admin;
|
|
|
using Infrastructure;
|
|
using Infrastructure;
|
|
|
|
|
+using Common;
|
|
|
|
|
+using System.Linq;
|
|
|
|
|
|
|
|
|
|
|
|
|
namespace Services
|
|
namespace Services
|
|
@@ -65,13 +67,13 @@ namespace Services
|
|
|
public void copyApiInfo([FromBody] CopyApiInfoDto param, ApiGroup group)
|
|
public void copyApiInfo([FromBody] CopyApiInfoDto param, ApiGroup group)
|
|
|
{
|
|
{
|
|
|
// var group = _ApiGroupService.GetFirst(m => m.id == param.targetGroupId) ?? new ApiGroup();
|
|
// var group = _ApiGroupService.GetFirst(m => m.id == param.targetGroupId) ?? new ApiGroup();
|
|
|
- List<int> apiIdList = param.sourceApiId.ToList();
|
|
|
|
|
|
|
+ List<int> apiIdList = Tools.SpitIntArrary(param.sourceApiId).ToList();
|
|
|
var sourceApis = GetList(m => apiIdList.Contains(m.id)).ToList();
|
|
var sourceApis = GetList(m => apiIdList.Contains(m.id)).ToList();
|
|
|
foreach(ApiInfo sourceApi in sourceApis)
|
|
foreach(ApiInfo sourceApi in sourceApis)
|
|
|
{
|
|
{
|
|
|
ApiInfo newApi = new ApiInfo();
|
|
ApiInfo newApi = new ApiInfo();
|
|
|
newApi.serviceId = group.serviceId;
|
|
newApi.serviceId = group.serviceId;
|
|
|
- newApi.groupId = param.targetGroupId;
|
|
|
|
|
|
|
+ newApi.groupId = param.targetApiGroupId;
|
|
|
newApi.tabName = sourceApi.tabName;
|
|
newApi.tabName = sourceApi.tabName;
|
|
|
newApi.apiName = sourceApi.apiName;
|
|
newApi.apiName = sourceApi.apiName;
|
|
|
newApi.controllerFilePath = sourceApi.controllerFilePath;
|
|
newApi.controllerFilePath = sourceApi.controllerFilePath;
|