Commit e21cad8a by zhangkb

系统导出接口代码提交

parent bf1fa4c7
package com.keymobile.tagmanager.api;
import java.util.ArrayList;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
......@@ -88,6 +92,19 @@ public class TagFileCtrl {
tagExportService.undoImportExcel(importlogId);
}
@ApiOperation(value = "系统导出(系统id传参样式:4,9,10,23)", notes = "系统导出(系统id传参样式:4,9,10,23)")
@GetMapping(value = "/exportSystem")
public void exportSystem(@RequestParam String systemIdString,HttpServletRequest request,
HttpServletResponse response) throws Exception{
if(StringUtils.isNotBlank(systemIdString)) {
List<Long> systemIds = new ArrayList<>();
String[] systemId = systemIdString.split(",");
for(String sid : systemId) {
systemIds.add(Long.valueOf(sid));
}
tagExportService.exportSystem(systemIds, request, response);
}
}
//----------------------以下为导入系统的时候
......@@ -96,6 +113,4 @@ public class TagFileCtrl {
String userName = UserInfoUtils.getUserName();
return tagExportService.importSystem(userName, file);
}
}
package com.keymobile.tagmanager.remote;
import java.util.List;
import java.util.Map;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
......@@ -14,4 +17,11 @@ public interface AuthServiceClient {
@GetMapping(value = "/orgs/findByFullName")
public Org findByFullName(@RequestParam("orgFullName") String orgFullName);
@GetMapping(value = "/domains/{domainId}/catalogs")
public List<Map<String,Object>> catalogs(@PathVariable("domainId") Long domainId);
@GetMapping(value = "/domains/{domainId}/scopes/{scopeId}")
public Map<String,Object> getScopes(@PathVariable("domainId") Long domainId,
@PathVariable("scopeId") Long scopeId);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment