feat(base): 修正IP查询逻辑使用实际客户端IP而非固定测试IP
This commit is contained in:
@@ -47,7 +47,7 @@ func (s *BaseSysLogService) Record(ctx g.Ctx) {
|
||||
baseSysLog.Action = r.Method + ":" + r.URL.Path
|
||||
baseSysLog.IP = r.GetClientIp()
|
||||
// 从内存或缓存查询IP
|
||||
location, err := qqwry.QueryIP("119.29.29.29")
|
||||
location, err := qqwry.QueryIP(baseSysLog.IP)
|
||||
if err != nil {
|
||||
fmt.Printf("错误:%v\n", err)
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user