Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: alarm group query by workspace #816

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ public interface AlertGroupService extends IService<AlarmGroup> {

AlarmGroupDTO queryById(Long id, String tenant);

AlarmGroupDTO queryById(Long id, String tenant, String workspace);

List<AlarmGroupDTO> getListByUserLike(String userId, String tenant);

MonitorPageResult<AlarmGroupDTO> getListByPage(MonitorPageRequest<AlarmGroupDTO> pageRequest);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,13 @@ public Boolean updateById(AlarmGroupDTO alarmGroupDTO) {

@Override
public AlarmGroupDTO queryById(Long id, String tenant) {
return queryById(id, tenant, requestContextAdapter.getWorkspace(true));
}

@Override
public AlarmGroupDTO queryById(Long id, String tenant, String workspace) {
QueryWrapper<AlarmGroup> wrapper = new QueryWrapper<>();
requestContextAdapter.queryWrapperTenantAdapt(wrapper, tenant,
requestContextAdapter.getWorkspace(true));
requestContextAdapter.queryWrapperTenantAdapt(wrapper, tenant, workspace);
wrapper.eq("id", id);
wrapper.last("LIMIT 1");
AlarmGroup alarmGroup = this.getOne(wrapper);
Expand Down
Loading