修复代码BUG + 循环引用
This commit is contained in:
@ -78,7 +78,7 @@ func (e *execute) List(ctx context.Context, inputParam *define.Api2SqlParam) (an
|
||||
var (
|
||||
err error
|
||||
tx *gorm.DB
|
||||
optionList []database.SetOption
|
||||
optionList []define.SetOption
|
||||
)
|
||||
if tx, err = e.getTx(ctx, inputParam); nil != err {
|
||||
return nil, err
|
||||
@ -227,7 +227,7 @@ func (e *execute) validateColumn(inputParam *define.Api2SqlParam) error {
|
||||
// 验证字段是否都正确
|
||||
tableColumnTable := make(map[string]bool)
|
||||
for _, itemColumn := range inputParam.TableColumnConfig {
|
||||
tableColumnTable[itemColumn.ColumnName] = true
|
||||
tableColumnTable[itemColumn.Column] = true
|
||||
}
|
||||
for _, columnConfig := range inputParam.ColumnList {
|
||||
if !tableColumnTable[columnConfig.Column] {
|
||||
@ -261,8 +261,8 @@ func (e *execute) getTx(ctx context.Context, inputParam *define.Api2SqlParam) (*
|
||||
// Author : go_developer@163.com<白茶清欢>
|
||||
//
|
||||
// Date : 12:31 2024/8/23
|
||||
func (e *execute) getOptionList(ctx context.Context, inputParam *define.Api2SqlParam) ([]database.SetOption, error) {
|
||||
optionList := []database.SetOption{
|
||||
func (e *execute) getOptionList(ctx context.Context, inputParam *define.Api2SqlParam) ([]define.SetOption, error) {
|
||||
optionList := []define.SetOption{
|
||||
database.WithTable(inputParam.Table),
|
||||
}
|
||||
// 设置 limit offset
|
||||
|
Reference in New Issue
Block a user