Commit cbe06aa6 by zhangkb

修改接口

parent c3b5e0b3
...@@ -2,6 +2,7 @@ package com.keymobile.tagmanager.remote; ...@@ -2,6 +2,7 @@ package com.keymobile.tagmanager.remote;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Set;
import org.springframework.cloud.openfeign.FeignClient; import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
...@@ -19,6 +20,28 @@ public interface RepoServiceClient { ...@@ -19,6 +20,28 @@ public interface RepoServiceClient {
@RequestParam(required = false) int pageSize, @RequestParam(required = false) int pageSize,
@RequestParam String tagType); @RequestParam String tagType);
@PostMapping(value = "rest/tag/getByTagByPrivileges")
public List<Map<String,Object>> getByTagByPrivileges(
@RequestParam Map<Long, Set<String>> systemTagMap,
@RequestParam(required = false) String modelPath,
@RequestParam String idPath,
@RequestParam String tagType,
@RequestParam String dimensionType,
@RequestParam(required = false) String keyword,
@RequestParam(defaultValue = "1") int pageNum,
@RequestParam(defaultValue = "10") int pageSize);
@PostMapping(value = "rest/tag/getPageByTag")
public Map<String,Object> getPageByTag(
@RequestParam Map<Long, Set<String>> systemTagMap,
@RequestParam(required = false) String modelPath,
@RequestParam String idPath,
@RequestParam String tagType,
@RequestParam String dimensionType,
@RequestParam(required = false) String keyword,
@RequestParam(defaultValue = "1") int pageNum,
@RequestParam(defaultValue = "10") int pageSize);
@PostMapping(value = "/rest/metadata/getByNamePathAndClass") @PostMapping(value = "/rest/metadata/getByNamePathAndClass")
public Map<String,Object> getMetaByNamePathAndClass(@RequestParam String claz, public Map<String,Object> getMetaByNamePathAndClass(@RequestParam String claz,
@RequestParam String namePath); @RequestParam String namePath);
......
...@@ -703,11 +703,11 @@ public class TagService { ...@@ -703,11 +703,11 @@ public class TagService {
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
public Map<String,Object> getTagMetadataWithDataPrivilege(String dimensionType,String idPath, public Map<String,Object> getTagMetadataWithDataPrivilege(String dimensionType,String idPath,
String keyword,String modelPath,int pageNum,int pageSize,String tagType){ String keyword,String modelPath,int pageNum,int pageSize,String tagType){
//调用repo接口获取标签关联的元数据
Map<String,Object> tagData = repoService.getTagMetadata(dimensionType,
idPath,keyword,null,pageNum,pageSize,tagType);
//获取用户关联的数据权限 //获取用户关联的数据权限
Map<Long, Set<String>> systemTagMap = GrantedAuthHelper.getDataPrivileges(); Map<Long, Set<String>> systemTagMap = GrantedAuthHelper.getDataPrivileges();
//调用repo接口获取标签关联的元数据
Map<String,Object> tagData = repoService.getPageByTag(systemTagMap, modelPath, idPath, tagType,
dimensionType, keyword, pageNum, pageSize);
tagData.put("systemTagMap", systemTagMap); tagData.put("systemTagMap", systemTagMap);
// List<Map<String,Object>> content = (List<Map<String,Object>>)tagData.get("content"); // List<Map<String,Object>> content = (List<Map<String,Object>>)tagData.get("content");
// //判断不是个人标签 // //判断不是个人标签
......
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