|
|
@@ -3,6 +3,7 @@ package sql_tpl
|
|
|
import (
|
|
|
"errors"
|
|
|
"git.sxidc.com/go-tools/utils/encoding"
|
|
|
+ "git.sxidc.com/go-tools/utils/strutils"
|
|
|
"reflect"
|
|
|
"strconv"
|
|
|
"time"
|
|
|
@@ -16,6 +17,10 @@ type AfterParsedStrValueOption func(strValue string) (string, error)
|
|
|
|
|
|
func WithAESKey(aesKey string) AfterParsedStrValueOption {
|
|
|
return func(strValue string) (string, error) {
|
|
|
+ if strutils.IsStringEmpty(strValue) {
|
|
|
+ return strValue, nil
|
|
|
+ }
|
|
|
+
|
|
|
encrypted, err := encoding.AESEncrypt(strValue, aesKey)
|
|
|
if err != nil {
|
|
|
return "", err
|