作者 陈志颖

合并分支 'dev' 到 'test'

test:测试删除用户



查看合并请求 !39
... ... @@ -105,7 +105,7 @@ type ColumnSettingRepository interface {
Remove(columnSetting *ColumnSetting, columnSettings []*ColumnSetting) (*ColumnSetting, []*ColumnSetting, error)
FindOne(queryOptions map[string]interface{}) (*ColumnSetting, error)
//Find(queryOptions map[string]interface{}) (int64, []*ColumnSetting, error)
Find(ColumnSettingFindQuery) (int64, []*ColumnSetting, error)
Find(queryOptions ColumnSettingFindQuery) (int64, []*ColumnSetting, error)
}
func (columnSetting *ColumnSetting) Identify() interface{} {
... ...
... ... @@ -2,6 +2,7 @@ package repository
import (
"fmt"
"github.com/go-pg/pg/v10"
"gitlab.fjmaimaimai.com/mmm-go/partnermg/pkg/domain"
"gitlab.fjmaimaimai.com/mmm-go/partnermg/pkg/infrastructure/pg/models"
... ... @@ -124,7 +125,7 @@ func (repository *ColumnSettingRepository) Find(queryOptions domain.ColumnSettin
columnSettings := make([]*domain.ColumnSetting, 0)
query := tx.Model(&columnSettingModels)
if len(queryOptions.Ids) > 0 {
query = query.Where("column_setting.uid in(?)", queryOptions.Ids)
query = query.Where("column_setting.uid IN (?)", pg.In(queryOptions.Ids))
}
if queryOptions.Uid > 0 {
query = query.Where("column_setting.uid = ?", queryOptions.Uid)
... ...