refactor(项目管理): 误报规则返回启用数量
This commit is contained in:
parent
a6a09d72e0
commit
22c5bb9125
|
@ -82,6 +82,8 @@ public class ProjectApplicationController {
|
||||||
Map<String, Object> configMap = projectApplicationService.get(request, types);
|
Map<String, Object> configMap = projectApplicationService.get(request, types);
|
||||||
int errorNum = projectApplicationService.getFakeErrorList(request.getProjectId());
|
int errorNum = projectApplicationService.getFakeErrorList(request.getProjectId());
|
||||||
configMap.put("FAKE_ERROR_NUM", errorNum);
|
configMap.put("FAKE_ERROR_NUM", errorNum);
|
||||||
|
int enableErrorNum = projectApplicationService.getEnableFakeErrorList(request.getProjectId());
|
||||||
|
configMap.put("ENABLE_FAKE_ERROR_NUM", enableErrorNum);
|
||||||
return configMap;
|
return configMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -715,4 +715,11 @@ public class ProjectApplicationService {
|
||||||
}
|
}
|
||||||
return plugin.getName();
|
return plugin.getName();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int getEnableFakeErrorList(String projectId) {
|
||||||
|
FakeErrorExample example = new FakeErrorExample();
|
||||||
|
example.createCriteria().andProjectIdEqualTo(projectId).andEnableEqualTo(true);
|
||||||
|
long l = fakeErrorMapper.countByExample(example);
|
||||||
|
return (int) l;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue