|
|
@@ -1,6 +1,7 @@
|
|
|
package sql_mapping
|
|
|
|
|
|
import (
|
|
|
+ "git.sxidc.com/go-framework/baize/framwork/infrastructure/logger"
|
|
|
"git.sxidc.com/go-tools/utils/reflectutils"
|
|
|
"git.sxidc.com/go-tools/utils/strutils"
|
|
|
"git.sxidc.com/service-supports/fserr"
|
|
|
@@ -123,6 +124,10 @@ func parseFieldTag(field reflect.StructField, tagStr string) (*Tag, error) {
|
|
|
tagPartKeyValue[1] = strings.Trim(tagPartKeyValue[1], "'")
|
|
|
}
|
|
|
|
|
|
+ if strutils.IsStringEmpty(tagPartKeyValue[0]) {
|
|
|
+ continue
|
|
|
+ }
|
|
|
+
|
|
|
switch tagPartKeyValue[0] {
|
|
|
case tagPartColumn:
|
|
|
if strutils.IsStringEmpty(tagPartKeyValue[1]) {
|
|
|
@@ -161,6 +166,8 @@ func parseFieldTag(field reflect.StructField, tagStr string) (*Tag, error) {
|
|
|
case tagPartTrimSuffix:
|
|
|
tag.TrimSuffix = tagPartKeyValue[1]
|
|
|
default:
|
|
|
+ err := fserr.New(tagKey + "不支持的tag: " + tagPartKeyValue[0])
|
|
|
+ logger.GetInstance().Error(err)
|
|
|
continue
|
|
|
}
|
|
|
}
|