添加日志

This commit is contained in:
eson 2023-11-23 17:20:39 +08:00
parent f9380df215
commit c53b5e8f7b
2 changed files with 13 additions and 0 deletions

View File

@ -63,3 +63,13 @@ var checkModuleRe = regexp.MustCompile("[^\\.a-zA-Z_\\-0-9]")
func CheckModuleQuery(moduleQuery string) bool {
return !checkModuleRe.MatchString(moduleQuery)
}
// 检测数据的范围是否符合要求
func CheckValueRange[T comparable](v T, rangevalues ...T) bool {
for _, rv := range rangevalues {
if v == rv {
return true
}
}
return false
}

View File

@ -3,6 +3,7 @@ package fssql
import (
"encoding/json"
"fmt"
"log"
"reflect"
"gorm.io/gorm"
@ -76,6 +77,8 @@ func MetadataModulePATCH(tx *gorm.DB, module string, tableStructPointer any, upd
}
}
log.Println(string(metadata))
var args []any
args = append(args, metadata, metadata)