作者 yangfu

fix: sql query

... ... @@ -73,6 +73,7 @@ func (tableService *TableService) FieldOptionalValues(ctx *domain.Context, cmd *
if c.Field != nil && c.Field.SQLName == "" {
if v, ok := table.MatchField(c.Field); ok {
cmd.Where.Conditions[i].Field.SQLName = v.SQLName
cmd.Where.Conditions[i].Field.SQLType = v.SQLType
}
}
}
... ...
... ... @@ -36,6 +36,7 @@ func (tableService *TableService) TablePreview(ctx *domain.Context, cmd *command
if c.Field != nil && c.Field.SQLName == "" {
if v, ok := table.MatchField(c.Field); ok {
cmd.Where.Conditions[i].Field.SQLName = v.SQLName
cmd.Where.Conditions[i].Field.SQLType = v.SQLType
}
}
}
... ...
... ... @@ -31,6 +31,9 @@ func ConvertFileUrlToInternal(fileUrl string) string {
}
var bucketRegion = "https://byte-bank.oss-cn-hangzhou"
var bucketInternalRegion = "https://byte-bank.oss-cn-hangzhou-internal"
if strings.HasPrefix(fileUrl, bucketInternalRegion) {
return fileUrl
}
if strings.HasPrefix(fileUrl, bucketRegion) {
return strings.Replace(fileUrl, bucketRegion, bucketInternalRegion, 1)
}
... ...