...
|
...
|
@@ -10,6 +10,7 @@ type RequestCheckoutTablesQuery struct { |
|
|
OriginalTableId string `json:"originalTableId"`
|
|
|
IsFromOriginalTable bool `json:"isFromOriginalTable"`
|
|
|
TableFileUrl string `json:"tableFileUrl"`
|
|
|
TableFileUrlInternal string `json:"tableFileUrlInternal"`
|
|
|
ColumnSchemas []domain.ColumnSchema `json:"columnSchemas"`
|
|
|
PageNumber int `json:"pageNumber"`
|
|
|
PageSize int `json:"pageSize"`
|
...
|
...
|
@@ -44,7 +45,8 @@ func NewRequestCheckoutTablesQuery(param domain.ReqLoadDataTable) RequestCheckou |
|
|
return RequestCheckoutTablesQuery{
|
|
|
OriginalTableId: param.OriginalTableId,
|
|
|
IsFromOriginalTable: isSourceFile,
|
|
|
TableFileUrl: tableFileUrl,
|
|
|
TableFileUrl: domain.ConvertFileUrlToInternal(tableFileUrl),
|
|
|
TableFileUrlInternal: tableFileUrl,
|
|
|
ColumnSchemas: param.ColumnSchemas,
|
|
|
PageNumber: param.PageNumber,
|
|
|
PageSize: param.PageSize,
|
...
|
...
|
@@ -135,6 +137,7 @@ type ( |
|
|
RequestCheckoutTablesGenerateMasterTable struct {
|
|
|
OriginalTableId string `json:"originalTableId"`
|
|
|
CheckoutTableFileUrl string `json:"checkoutTableFileUrl"`
|
|
|
CheckoutTableFileUrlInternal string `json:"checkoutTableFileUrlInternal"`
|
|
|
ColumnSchemas []domain.ColumnSchema `json:"columnSchemas"`
|
|
|
MasterTableName string `json:"masterTableName"`
|
|
|
FieldSchemas []FieldSchema `json:"fieldSchemas"`
|
...
|
...
|
@@ -155,7 +158,8 @@ type ( |
|
|
func NewRequestCheckoutTablesGenerateMasterTable(param domain.ReqGenerateTable) RequestCheckoutTablesGenerateMasterTable {
|
|
|
request := RequestCheckoutTablesGenerateMasterTable{
|
|
|
OriginalTableId: fmt.Sprintf("%v", param.FileId),
|
|
|
CheckoutTableFileUrl: param.FileUrl,
|
|
|
CheckoutTableFileUrl: domain.ConvertFileUrlToInternal(param.FileUrl),
|
|
|
CheckoutTableFileUrlInternal: param.FileUrl,
|
|
|
ColumnSchemas: DomainFieldsToColumnSchemas(param.Table.DataFields),
|
|
|
MasterTableName: param.Table.SQLName,
|
|
|
FieldSchemas: ToFieldSchemas(param.Table.DataFields),
|
...
|
...
|
@@ -169,6 +173,7 @@ type ( |
|
|
//MasterTableId string `json:"masterTableId"`
|
|
|
OriginalTableId string `json:"originalTableId"`
|
|
|
CheckoutTableFileUrl string `json:"checkoutTableFileUrl"`
|
|
|
CheckoutTableFileUrlInternal string `json:"checkoutTableFileUrlInternal"`
|
|
|
DatabaseTableName string `json:"databaseTableName"`
|
|
|
ColumnSchemas []domain.ColumnSchema `json:"columnSchemas"`
|
|
|
FieldSchemas []FieldSchema `json:"fieldSchemas"`
|
...
|
...
|
@@ -193,7 +198,8 @@ func NewTableAppendRequest(param domain.ReqAppendData) TableAppendRequest { |
|
|
columnSchemas := DomainFieldsToColumnSchemas(param.From)
|
|
|
req := TableAppendRequest{
|
|
|
OriginalTableId: intToString(param.FileId),
|
|
|
CheckoutTableFileUrl: param.FileUrl,
|
|
|
CheckoutTableFileUrl: domain.ConvertFileUrlToInternal(param.FileUrl),
|
|
|
CheckoutTableFileUrlInternal: param.FileUrl,
|
|
|
DatabaseTableName: param.Table.SQLName,
|
|
|
ColumnSchemas: DomainFieldsToColumnSchemas(param.ExcelTable.DataFields), //这里主要需要传递原文件所有字段 param.From
|
|
|
FieldSchemas: ToFieldSchemas(param.Table.DataFields),
|
...
|
...
|
|