feat: add oliver elastic support; update db(sqlite)

This commit is contained in:
zhaoyupeng
2024-09-20 15:14:49 +08:00
parent f9d59b99a0
commit c117d363a0
14 changed files with 399 additions and 85 deletions

View File

@@ -50,11 +50,11 @@ func LogList(c *nf.Ctx) error {
return resp.Resp400(c, req, "参数过大")
}
txCount := op.Role.Where(db.New(tool.Timeout(3)).
txCount := op.Role.Where(db.Default.Session(tool.Timeout(3)).
Model(&model.OpLog{}).
Select("COUNT(`op_logs`.`id`)").
Joins("LEFT JOIN users ON `users`.`id` = `op_logs`.`user_id`"))
txGet := op.Role.Where(db.New(tool.Timeout(10)).
txGet := op.Role.Where(db.Default.Session(tool.Timeout(10)).
Model(&model.OpLog{}).
Joins("LEFT JOIN users ON `users`.`id` = `op_logs`.`user_id`"))