IP列表增加名单类型筛选

This commit is contained in:
刘祥超
2022-04-21 15:09:18 +08:00
parent e4ef2e8253
commit d06c8cebf5
2 changed files with 17 additions and 6 deletions

View File

@@ -484,7 +484,7 @@ func (this *IPItemService) CountAllEnabledIPItems(ctx context.Context, req *pb.C
if req.GlobalOnly {
listId = firewallconfigs.GlobalListId
}
count, err := models.SharedIPItemDAO.CountAllEnabledIPItems(tx, req.Ip, listId, req.Unread, req.EventLevel)
count, err := models.SharedIPItemDAO.CountAllEnabledIPItems(tx, req.Ip, listId, req.Unread, req.EventLevel, req.ListType)
if err != nil {
return nil, err
}
@@ -504,7 +504,7 @@ func (this *IPItemService) ListAllEnabledIPItems(ctx context.Context, req *pb.Li
if req.GlobalOnly {
listId = firewallconfigs.GlobalListId
}
items, err := models.SharedIPItemDAO.ListAllEnabledIPItems(tx, req.Ip, listId, req.Unread, req.EventLevel, req.Offset, req.Size)
items, err := models.SharedIPItemDAO.ListAllEnabledIPItems(tx, req.Ip, listId, req.Unread, req.EventLevel, req.ListType, req.Offset, req.Size)
if err != nil {
return nil, err
}