|
@@ -2,6 +2,7 @@ package repository |
|
@@ -2,6 +2,7 @@ package repository |
2
|
|
2
|
|
3
|
import (
|
3
|
import (
|
4
|
"fmt"
|
4
|
"fmt"
|
|
|
5
|
+ "github.com/go-pg/pg/v10"
|
5
|
"gitlab.fjmaimaimai.com/mmm-go/partnermg/pkg/domain"
|
6
|
"gitlab.fjmaimaimai.com/mmm-go/partnermg/pkg/domain"
|
6
|
|
7
|
|
7
|
"gitlab.fjmaimaimai.com/mmm-go/partnermg/pkg/infrastructure/pg/models"
|
8
|
"gitlab.fjmaimaimai.com/mmm-go/partnermg/pkg/infrastructure/pg/models"
|
|
@@ -124,7 +125,7 @@ func (repository *ColumnSettingRepository) Find(queryOptions domain.ColumnSettin |
|
@@ -124,7 +125,7 @@ func (repository *ColumnSettingRepository) Find(queryOptions domain.ColumnSettin |
124
|
columnSettings := make([]*domain.ColumnSetting, 0)
|
125
|
columnSettings := make([]*domain.ColumnSetting, 0)
|
125
|
query := tx.Model(&columnSettingModels)
|
126
|
query := tx.Model(&columnSettingModels)
|
126
|
if len(queryOptions.Ids) > 0 {
|
127
|
if len(queryOptions.Ids) > 0 {
|
127
|
- query = query.Where("column_setting.uid in(?)", queryOptions.Ids)
|
128
|
+ query = query.Where("column_setting.uid IN (?)", pg.In(queryOptions.Ids))
|
128
|
}
|
129
|
}
|
129
|
if queryOptions.Uid > 0 {
|
130
|
if queryOptions.Uid > 0 {
|
130
|
query = query.Where("column_setting.uid = ?", queryOptions.Uid)
|
131
|
query = query.Where("column_setting.uid = ?", queryOptions.Uid)
|