作者 yangfu

fix: sql query

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