fix(model): update query logic to use OR for group_id filtering

This commit is contained in:
Chang lue Tsen 2025-05-06 18:36:09 +09:00
parent ae784cbbe4
commit f4050ff42e

View File

@ -119,7 +119,7 @@ func (m *customServerModel) FindServerDetailByGroupIdsAndIds(ctx context.Context
Model(&Server{}).
Where("enable = ?", true)
if len(groupId) > 0 {
conn = conn.Where("group_id IN ?", groupId)
conn = conn.Or("group_id IN ?", groupId)
}
if len(ids) > 0 {
conn = conn.Where("id IN ?", ids)