Commit 01603ffe by zhangkb

添加获取所有维度标签和所有标签关系接口

parent b341b53c
...@@ -297,6 +297,11 @@ public class TagCtrl { ...@@ -297,6 +297,11 @@ public class TagCtrl {
startDate, endDate, modelPath,pageNum, pageSize, tagType); startDate, endDate, modelPath,pageNum, pageSize, tagType);
} }
@ApiOperation(value = "(2020-6-9)获取所有维度标签数据", notes = "(2020-6-9)获取所有维度标签数据")
@PostMapping(value = "/getAllDimensionTag")
public List<Tag> getAllDimensionTag(){
return tagService.getAllDimensionTag();
}
//---------------以下为导入系统的时候用到------------------ //---------------以下为导入系统的时候用到------------------
@ApiOperation(value = "查询系统标签", notes = "查询系统标签") @ApiOperation(value = "查询系统标签", notes = "查询系统标签")
......
...@@ -64,4 +64,10 @@ public class TagRelCtrl { ...@@ -64,4 +64,10 @@ public class TagRelCtrl {
public List<TagRelation> getTargetTags(@RequestParam String tagId){ public List<TagRelation> getTargetTags(@RequestParam String tagId){
return tagRelService.getTarget(tagId); return tagRelService.getTarget(tagId);
} }
@ApiOperation(value = "(2020-6-9)获取所有标签关系", notes = "(2020-6-9)获取所有标签关系")
@PostMapping(value = "/getAll")
public List<TagRelation> getAll(){
return tagRelService.getAll();
}
} }
...@@ -40,4 +40,8 @@ public class TagRelService { ...@@ -40,4 +40,8 @@ public class TagRelService {
public List<TagRelation> getTarget(String tagId){ public List<TagRelation> getTarget(String tagId){
return tagRelRepo.findBySourceId(tagId); return tagRelRepo.findBySourceId(tagId);
} }
public List<TagRelation> getAll(){
return tagRelRepo.findAll();
}
} }
...@@ -496,6 +496,14 @@ public class TagService { ...@@ -496,6 +496,14 @@ public class TagService {
return result; return result;
} }
//获取所有维度标签(不包含权限过滤)
public List<Tag> getAllDimensionTag(){
List<Tag> result = new ArrayList<>();
Criteria criteria = Criteria.where("dimensionType").is(Constants.TAG_DIMENSION_TRUE)
.and("tagType").is(Constants.TAG_PERSONAL_TYPE);
result = mongoOperations.find(Query.query(criteria), Tag.class);
return result;
}
//如果标签存在冲突,修改当前标签名字和路径 //如果标签存在冲突,修改当前标签名字和路径
private void changeNameToAvoidConflict(Tag tag, String userName) { private void changeNameToAvoidConflict(Tag tag, String userName) {
......
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