Commit d859f934 by zhangkb

修改根目录数据返回格式

parent a0d99a27
......@@ -305,7 +305,7 @@ public class TagCtrl {
@ApiOperation(value = "(2020-7-21)获取所有根目录维度标签", notes = "(2020-7-21)获取所有根目录维度标签")
@PostMapping(value = "/getAllDimensionRootTag")
public List<Tag> getAllDimensionRootTag(){
public List<Map<String,Object>> getAllDimensionRootTag(){
return tagService.getDimensionRootTag();
}
......
......@@ -944,8 +944,17 @@ public class TagService {
}
//author:zhangkb time:2020-7-21 desc:获取维度标签根目录
public List<Tag> getDimensionRootTag(){
return tagRepository.findByLevelAndTagTypeAndDimensionType(1, "1", "1");
public List<Map<String,Object>> getDimensionRootTag(){
List<Map<String,Object>> resultList = new ArrayList<>();
List<Tag> result = tagRepository.findByLevelAndTagTypeAndDimensionType(1, "1", "1");
for(Tag tag : result) {
Map<String,Object> map = new HashMap<>();
map.put("tagId", tag.getId());
map.put("tagName", tag.getName());
map.put("tagOrder", tag.getOrder());
resultList.add(map);
}
return resultList;
}
......
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