1
This commit is contained in:
parent
6901ba76c3
commit
a5c7eb46b1
@ -1,11 +1,30 @@
|
|||||||
package jccommon
|
package jccommon
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"q5"
|
||||||
|
"f5"
|
||||||
)
|
)
|
||||||
|
|
||||||
func AddDbLog(dataSource string, logType string, subType string,
|
func AddDbLog(dataSource string, logType string, subType string,
|
||||||
params map[string]string) error {
|
params map[string]string) error {
|
||||||
return nil
|
params["type"] = logType
|
||||||
|
params["subtype"] = subType
|
||||||
|
nowTime := f5.GetApp().GetRealSeconds()
|
||||||
|
if _, ok := params["createtime"]; !ok {
|
||||||
|
params["createtime"] = q5.ToString(nowTime)
|
||||||
|
}
|
||||||
|
if _, ok := params["modifytime"]; !ok {
|
||||||
|
params["modifytime"] = q5.ToString(nowTime)
|
||||||
|
}
|
||||||
|
var resultErr error
|
||||||
|
f5.GetGoStyleDb().Insert(
|
||||||
|
dataSource,
|
||||||
|
"t_log",
|
||||||
|
[][]string{},
|
||||||
|
func (err error, lastInsertId int64, rowsAffected int64) {
|
||||||
|
resultErr = err
|
||||||
|
})
|
||||||
|
return resultErr
|
||||||
}
|
}
|
||||||
|
|
||||||
func GetDbParam(dataSource string, name string) (string, error) {
|
func GetDbParam(dataSource string, name string) (string, error) {
|
||||||
|
@ -1 +1,3 @@
|
|||||||
module jccommon
|
module jccommon
|
||||||
|
|
||||||
|
go 1.20
|
Loading…
x
Reference in New Issue
Block a user