refactor: sqlexec组件重构优化、新增数据库相关系统参数配置、相关问题修复

This commit is contained in:
meilin.huang
2023-02-13 21:11:16 +08:00
parent 77aa724003
commit 70b586e45a
35 changed files with 2486 additions and 2120 deletions

View File

@@ -2,6 +2,7 @@ package utils
import (
"encoding/json"
"mayfly-go/pkg/global"
)
func Json2Map(jsonStr string) map[string]interface{} {
@@ -12,3 +13,12 @@ func Json2Map(jsonStr string) map[string]interface{} {
_ = json.Unmarshal([]byte(jsonStr), &res)
return res
}
func ToJsonStr(val any) string {
if strBytes, err := json.Marshal(val); err != nil {
global.Log.Error("toJsonStr error: ", err)
return ""
} else {
return string(strBytes)
}
}