|
@@ -4,6 +4,7 @@ import (
|
|
|
"fmt"
|
|
"fmt"
|
|
|
"regexp"
|
|
"regexp"
|
|
|
"strings"
|
|
"strings"
|
|
|
|
|
+ "time"
|
|
|
|
|
|
|
|
odb "git.wecise.com/wecise/odb-go/odb"
|
|
odb "git.wecise.com/wecise/odb-go/odb"
|
|
|
"gitee.com/wecisecode/util/cast"
|
|
"gitee.com/wecisecode/util/cast"
|
|
@@ -113,7 +114,7 @@ func matchvalue(matcher any, matchingvalue any) (bool, string) {
|
|
|
}
|
|
}
|
|
|
case string:
|
|
case string:
|
|
|
sv := ""
|
|
sv := ""
|
|
|
- switch matchingvalue.(type) {
|
|
|
|
|
|
|
+ switch v := matchingvalue.(type) {
|
|
|
case int, uint, int8, uint8, int16, uint16, int32, uint32, int64, uint64, bool:
|
|
case int, uint, int8, uint8, int16, uint16, int32, uint32, int64, uint64, bool:
|
|
|
sv = fmt.Sprintf("%v", matchingvalue)
|
|
sv = fmt.Sprintf("%v", matchingvalue)
|
|
|
case float32, float64:
|
|
case float32, float64:
|
|
@@ -122,6 +123,8 @@ func matchvalue(matcher any, matchingvalue any) (bool, string) {
|
|
|
if len(fvrange) > 1 {
|
|
if len(fvrange) > 1 {
|
|
|
return sv >= fvrange[0] && sv <= fvrange[len(fvrange)-1], sv
|
|
return sv >= fvrange[0] && sv <= fvrange[len(fvrange)-1], sv
|
|
|
}
|
|
}
|
|
|
|
|
+ case time.Time:
|
|
|
|
|
+ sv = fmt.Sprintf("%#v", v.Format("2006-01-02T15:04:05.000-07:00"))
|
|
|
default:
|
|
default:
|
|
|
sv = fmt.Sprintf("%#v", matchingvalue)
|
|
sv = fmt.Sprintf("%#v", matchingvalue)
|
|
|
}
|
|
}
|