diff --git a/plugin/gb28181/api.go b/plugin/gb28181/api.go index b06c49f..875ad26 100644 --- a/plugin/gb28181/api.go +++ b/plugin/gb28181/api.go @@ -1617,8 +1617,8 @@ func (gb *GB28181Plugin) GetGroupChannels(ctx context.Context, req *pb.GetGroupC ELSE true END AS in_group `). - Joins("LEFT JOIN "+deviceTable+" AS d ON dc.device_db_id = d.id"). - Joins("LEFT JOIN "+groupsChannelTable+" AS gc ON dc.device_id = gc.channel_id AND gc.group_id = ?", req.GroupId) + Joins("LEFT JOIN "+deviceTable+" AS d ON dc.device_id = d.device_id"). + Joins("LEFT JOIN "+groupsChannelTable+" AS gc ON dc.channel_id = gc.channel_id AND gc.group_id = ?", req.GroupId) // 如果有设备ID过滤条件 if req.DeviceId != "" { @@ -1682,7 +1682,7 @@ func (gb *GB28181Plugin) GetGroupChannels(ctx context.Context, req *pb.GetGroupC resp.Code = 0 resp.Message = "获取通道列表成功" resp.Total = int32(total) - resp.List = pbGroupChannels + resp.Data = pbGroupChannels return resp, nil } diff --git a/plugin/gb28181/pb/gb28181.pb.go b/plugin/gb28181/pb/gb28181.pb.go index 16ecdec..2c666b0 100644 --- a/plugin/gb28181/pb/gb28181.pb.go +++ b/plugin/gb28181/pb/gb28181.pb.go @@ -5640,7 +5640,7 @@ type GroupChannelsResponse struct { Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` Total int32 `protobuf:"varint,3,opt,name=total,proto3" json:"total,omitempty"` - List []*GroupChannel `protobuf:"bytes,4,rep,name=list,proto3" json:"list,omitempty"` + Data []*GroupChannel `protobuf:"bytes,4,rep,name=data,proto3" json:"data,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -5696,9 +5696,9 @@ func (x *GroupChannelsResponse) GetTotal() int32 { return 0 } -func (x *GroupChannelsResponse) GetList() []*GroupChannel { +func (x *GroupChannelsResponse) GetData() []*GroupChannel { if x != nil { - return x.List + return x.Data } return nil } @@ -6479,7 +6479,7 @@ const file_gb28181_proto_rawDesc = "" + "\x04code\x18\x01 \x01(\x05R\x04code\x12\x18\n" + "\amessage\x18\x02 \x01(\tR\amessage\x12\x14\n" + "\x05total\x18\x03 \x01(\x05R\x05total\x12,\n" + - "\x04list\x18\x04 \x03(\v2\x18.gb28181pro.GroupChannelR\x04list\"6\n" + + "\x04data\x18\x04 \x03(\v2\x18.gb28181pro.GroupChannelR\x04data\"6\n" + "\x14PlaybackPauseRequest\x12\x1e\n" + "\n" + "streamPath\x18\x01 \x01(\tR\n" + @@ -6705,7 +6705,7 @@ var file_gb28181_proto_depIdxs = []int32{ 68, // 23: gb28181pro.GroupsListResponse.data:type_name -> gb28181pro.Group 68, // 24: gb28181pro.GroupsPageInfo.data:type_name -> gb28181pro.Group 86, // 25: gb28181pro.AddGroupChannelRequest.channels:type_name -> gb28181pro.AddGroupChannelRequest.Channel - 78, // 26: gb28181pro.GroupChannelsResponse.list:type_name -> gb28181pro.GroupChannel + 78, // 26: gb28181pro.GroupChannelsResponse.data:type_name -> gb28181pro.GroupChannel 2, // 27: gb28181pro.api.List:input_type -> gb28181pro.GetDevicesRequest 1, // 28: gb28181pro.api.GetDevice:input_type -> gb28181pro.GetDeviceRequest 2, // 29: gb28181pro.api.GetDevices:input_type -> gb28181pro.GetDevicesRequest diff --git a/plugin/gb28181/pb/gb28181.proto b/plugin/gb28181/pb/gb28181.proto index 18e1942..b3fa860 100644 --- a/plugin/gb28181/pb/gb28181.proto +++ b/plugin/gb28181/pb/gb28181.proto @@ -1093,7 +1093,7 @@ message GroupChannelsResponse { int32 code = 1; string message = 2; int32 total = 3; - repeated GroupChannel list = 4; + repeated GroupChannel data = 4; } // 回放暂停请求