正在显示
3 个修改的文件
包含
15 行增加
和
0 行删除
| @@ -234,6 +234,18 @@ func (tableService *TableService) Search(searchQuery *query.SearchTableQuery) (i | @@ -234,6 +234,18 @@ func (tableService *TableService) Search(searchQuery *query.SearchTableQuery) (i | ||
| 234 | for _, table := range tables { | 234 | for _, table := range tables { |
| 235 | var item = &dto.TableDto{} | 235 | var item = &dto.TableDto{} |
| 236 | item.Load(table) | 236 | item.Load(table) |
| 237 | + if len(searchQuery.ExcludeTables) > 0 { | ||
| 238 | + exclude := false | ||
| 239 | + for _, t := range searchQuery.ExcludeTables { | ||
| 240 | + if t == item.TableId { | ||
| 241 | + exclude = true | ||
| 242 | + break | ||
| 243 | + } | ||
| 244 | + } | ||
| 245 | + if exclude { | ||
| 246 | + continue | ||
| 247 | + } | ||
| 248 | + } | ||
| 237 | if searchQuery.ReturnDetailStructInfo { | 249 | if searchQuery.ReturnDetailStructInfo { |
| 238 | item.SetDetailStructInfo(table) | 250 | item.SetDetailStructInfo(table) |
| 239 | } | 251 | } |
| @@ -219,6 +219,7 @@ type ( | @@ -219,6 +219,7 @@ type ( | ||
| 219 | type ColumnSchema struct { | 219 | type ColumnSchema struct { |
| 220 | ColumnName string `json:"columnName"` | 220 | ColumnName string `json:"columnName"` |
| 221 | ColumnType string `json:"columnType"` | 221 | ColumnType string `json:"columnType"` |
| 222 | + ColumnSqlFriendlyName string `json:"columnSqlFriendlyName"` | ||
| 222 | } | 223 | } |
| 223 | 224 | ||
| 224 | func ToFields(fields []*Field) []*Field { | 225 | func ToFields(fields []*Field) []*Field { |
| @@ -8,6 +8,7 @@ func DomainFieldsToColumnSchemas(fields []*domain.Field) []domain.ColumnSchema { | @@ -8,6 +8,7 @@ func DomainFieldsToColumnSchemas(fields []*domain.Field) []domain.ColumnSchema { | ||
| 8 | res := domain.ColumnSchema{ | 8 | res := domain.ColumnSchema{ |
| 9 | ColumnName: f.Name, | 9 | ColumnName: f.Name, |
| 10 | ColumnType: f.SQLType, | 10 | ColumnType: f.SQLType, |
| 11 | + ColumnSqlFriendlyName: f.SQLName, | ||
| 11 | } | 12 | } |
| 12 | if convertFiledSQLType(f.SQLType) { | 13 | if convertFiledSQLType(f.SQLType) { |
| 13 | res.ColumnType = domain.DECIMAL279.ToString() | 14 | res.ColumnType = domain.DECIMAL279.ToString() |
| @@ -77,6 +78,7 @@ func FieldsToColumnSchemas(fields []*domain.Field) []domain.ColumnSchema { | @@ -77,6 +78,7 @@ func FieldsToColumnSchemas(fields []*domain.Field) []domain.ColumnSchema { | ||
| 77 | result = append(result, domain.ColumnSchema{ | 78 | result = append(result, domain.ColumnSchema{ |
| 78 | ColumnName: f.Name, | 79 | ColumnName: f.Name, |
| 79 | ColumnType: f.SQLType, | 80 | ColumnType: f.SQLType, |
| 81 | + ColumnSqlFriendlyName: f.SQLName, | ||
| 80 | }) | 82 | }) |
| 81 | } | 83 | } |
| 82 | return result | 84 | return result |
-
请 注册 或 登录 后发表评论