This commit is contained in:
2024-10-15 17:19:23 +08:00
parent 8f903b457f
commit c76451788c
42 changed files with 1600 additions and 237 deletions

View File

@@ -22,6 +22,12 @@ func EncryptStructFields(inputStruct interface{}, key string) (map[string]interf
field := v.Type().Field(i)
fieldValue := v.Field(i)
// 检查字段的 encrypt 标签是否为 "false"
encryptTag := field.Tag.Get("encrypt")
if encryptTag == "false" {
continue
}
// 如果字段为空值,跳过
if fieldValue.IsZero() {
continue