File tree Expand file tree Collapse file tree 4 files changed +8
-1
lines changed
Expand file tree Collapse file tree 4 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ import (
2323 "github.com/spf13/cobra"
2424)
2525
26- const DatabaseVersion = 264
26+ const DatabaseVersion = 265
2727
2828// @title 管理系统API
2929// @version 1.0
Original file line number Diff line number Diff line change @@ -114,6 +114,9 @@ func (ct *Peer) List(c *gin.Context) {
114114 if query .Ip != "" {
115115 tx .Where ("last_online_ip like ?" , "%" + query .Ip + "%" )
116116 }
117+ if query .Alias != "" {
118+ tx .Where ("alias like ?" , "%" + query .Alias + "%" )
119+ }
117120 })
118121 response .Success (c , res )
119122}
Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ type PeerForm struct {
1313 Uuid string `json:"uuid"`
1414 Version string `json:"version"`
1515 GroupId uint `json:"group_id"`
16+ Alias string `json:"alias"`
1617}
1718
1819type PeerBatchDeleteForm struct {
@@ -32,6 +33,7 @@ func (f *PeerForm) ToPeer() *model.Peer {
3233 Uuid : f .Uuid ,
3334 Version : f .Version ,
3435 GroupId : f .GroupId ,
36+ Alias : f .Alias ,
3537 }
3638}
3739
@@ -43,6 +45,7 @@ type PeerQuery struct {
4345 Uuids string `json:"uuids" form:"uuids"`
4446 Ip string `json:"ip" form:"ip"`
4547 Username string `json:"username" form:"username"`
48+ Alias string `json:"alias" form:"alias"`
4649}
4750
4851type SimpleDataQuery struct {
Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ type Peer struct {
1515 LastOnlineTime int64 `json:"last_online_time" gorm:"default:0;not null;"`
1616 LastOnlineIp string `json:"last_online_ip" gorm:"default:'';not null;"`
1717 GroupId uint `json:"group_id" gorm:"default:0;not null;index"`
18+ Alias string `json:"alias" gorm:"default:'';not null;index"`
1819 TimeModel
1920}
2021
You can’t perform that action at this time.
0 commit comments