fix: 查询通道级联列表失败问题

This commit is contained in:
ydajiang
2025-11-03 20:46:13 +08:00
parent 3c21fa88a6
commit 9daba2d7ae

View File

@@ -294,7 +294,7 @@ func (d *daoPlatform) SetShareAllChannel(id int, shareAll bool) error {
// QueryPlatformByChannelID 查询某个通道级联到的所有上级
func (d *daoPlatform) QueryPlatformByChannelID(deviceID, channelID string) ([]*PlatformChannelModel, error) {
var platformChannels []*PlatformChannelModel
tx := db.Where("device_id =? and channel_id =? group by server_addr", deviceID, channelID).Find(&platformChannels)
tx := db.Where("device_id =? and channel_id =? group by p_id", deviceID, channelID).Find(&platformChannels)
if tx.Error != nil {
return nil, tx.Error
}