feat(base): 修正IP查询逻辑使用实际客户端IP而非固定测试IP

This commit is contained in:
1
2025-11-03 17:23:12 +00:00
parent ed4d961e32
commit 3735309f1b
4 changed files with 264 additions and 1 deletions

View File

@@ -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