指标库:修复“获取原子指标配置(指标库列表中点击衍生)”
This commit is contained in:
parent
bbcab977bd
commit
db18f06c49
@ -100,8 +100,7 @@ public class TargetController {
|
||||
@Operation(summary = "获取原子指标配置(指标库列表中点击衍生)")
|
||||
@PostMapping("/getDetailExpandTarget")
|
||||
public R<JSONObject> getDetailExpandTarget(@RequestBody JSONObject params) {
|
||||
JSONObject result;
|
||||
result = targetService.getDetailExpandTarget(params);
|
||||
JSONObject result = targetService.getDetailExpandTarget(params);
|
||||
Page<?> list = tableColumnService.getDataByTableName(result.getJSONObject("list"));
|
||||
result.put("list", list);
|
||||
result.put("columnList", tableColumnService.getColumnsByTableName(result.getString("tableName")));
|
||||
|
@ -456,9 +456,11 @@ public class TargetServiceImpl extends ServiceImpl<TargetMapper, Target>
|
||||
CheckUtils.checkEmpty(id, "指标ID");
|
||||
target = targetMapper.selectById(id);
|
||||
List<TargetOption> optionList = new ArrayList<>();
|
||||
while (id != null) {
|
||||
Target parent = targetMapper.selectById(id);
|
||||
while (!StringUtils.isEmpty(id)) {
|
||||
optionList.addAll(0, targetOptionMapper.selectList(new QueryWrapper<TargetOption>().eq("target_id", id)));
|
||||
id = target.getParent();
|
||||
id = parent.getParent();
|
||||
parent = targetMapper.selectById(id);
|
||||
}
|
||||
return getDetailTarget(optionList, target);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user