作者 陈志颖

合并分支 'dev' 到 'test'

test:测试删除用户



查看合并请求 !39
@@ -105,7 +105,7 @@ type ColumnSettingRepository interface { @@ -105,7 +105,7 @@ type ColumnSettingRepository interface {
105 Remove(columnSetting *ColumnSetting, columnSettings []*ColumnSetting) (*ColumnSetting, []*ColumnSetting, error) 105 Remove(columnSetting *ColumnSetting, columnSettings []*ColumnSetting) (*ColumnSetting, []*ColumnSetting, error)
106 FindOne(queryOptions map[string]interface{}) (*ColumnSetting, error) 106 FindOne(queryOptions map[string]interface{}) (*ColumnSetting, error)
107 //Find(queryOptions map[string]interface{}) (int64, []*ColumnSetting, error) 107 //Find(queryOptions map[string]interface{}) (int64, []*ColumnSetting, error)
108 - Find(ColumnSettingFindQuery) (int64, []*ColumnSetting, error) 108 + Find(queryOptions ColumnSettingFindQuery) (int64, []*ColumnSetting, error)
109 } 109 }
110 110
111 func (columnSetting *ColumnSetting) Identify() interface{} { 111 func (columnSetting *ColumnSetting) Identify() interface{} {
@@ -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)