...
|
...
|
@@ -33,7 +33,11 @@ func (ptr *AddTableStructService) AddTableStruct(ctx *domain.Context, parentTabl |
|
|
}
|
|
|
|
|
|
// 验证表名是否重复
|
|
|
duplicateTable, err := tableRepository.FindOne(map[string]interface{}{"context": ctx, "tableName": name})
|
|
|
duplicateTable, err := tableRepository.FindOne(map[string]interface{}{"context": ctx, "tableName": name, "tableTypes": []string{
|
|
|
domain.MainTable.ToString(),
|
|
|
domain.SubTable.ToString(),
|
|
|
domain.SideTable.ToString(),
|
|
|
}})
|
|
|
if err == nil && duplicateTable != nil {
|
|
|
return nil, fmt.Errorf("表名称重复")
|
|
|
}
|
...
|
...
|
|