feat(common): 添加IP私有地址和环回地址判断函数

在 qqwry.go 中新增 isPrivateIP 和 isLoopbackIP 函数,用于判断 IPv4/IPv6
是否为私有地址或环回地址,并在查询 IP 时优先返回局域网和私有地址标识。

fix(base): 修正系统日志查询字段

将 base_sys_log.go 中的查询字段从 "user".name 更正为 "user".username,
确保关联查询正确显示用户名。
```
This commit is contained in:
2025-11-06 12:26:23 +08:00
parent 699db8406b
commit 3bbdbf0af3
2 changed files with 53 additions and 4 deletions

View File

@@ -22,7 +22,7 @@ func NewBaseSysLogService() *BaseSysLogService {
Model: model.NewBaseSysLog(),
PageQueryOp: &cool.QueryOp{
KeyWordField: []string{"name", "params", "ipAddr"},
Select: `base_sys_log.*,"user".name `,
Select: `base_sys_log.*,"user".username `,
Join: []*cool.JoinOp{
{
Model: model.NewBaseSysUser(),