修复用户二维码登录redis设置后消失问题,修改logger错误输出,实现视频按日期及小时精度查找。
This commit is contained in:
parent
2e00544a39
commit
a8a1826d9c
|
|
@ -1,6 +1,9 @@
|
|||
package dao
|
||||
|
||||
import "gorm.io/gorm"
|
||||
import (
|
||||
"fmt"
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
type Logger struct {
|
||||
gorm.Model
|
||||
|
|
@ -13,6 +16,9 @@ type Logger struct {
|
|||
func InsertLogToDB(url, ip, method, params string) uint {
|
||||
logger := Logger{Url: url, IP: ip, Method: method, Params: params}
|
||||
DB.Create(&logger)
|
||||
if logger.ID == 0 {
|
||||
fmt.Println("InsertLogToDB error")
|
||||
}
|
||||
return logger.ID
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue