This commit is contained in:
@@ -34,7 +34,7 @@ func NewServerService() *ServerService {
|
||||
subm := r[i].GMap()
|
||||
|
||||
if ok {
|
||||
|
||||
|
||||
err := t.KickPerson(0) //实现指定服务器踢人
|
||||
|
||||
if err == nil {
|
||||
@@ -70,13 +70,14 @@ func NewServerService() *ServerService {
|
||||
cf.manager = storage.NewBucketManager(mac, &cfg)
|
||||
return cf
|
||||
}
|
||||
func (s *ServerService) GetPort(isdebug int) gdb.List {
|
||||
func (s *ServerService) GetPort(DepartmentID uint) gdb.List {
|
||||
var res gdb.Result
|
||||
if isdebug == 1 {
|
||||
res, _ = cool.DBM(s.Model).Where("is_open", 1).Fields("ip", "port", "online_id", "is_vip", "name").All()
|
||||
m := cool.DBM(s.Model).Where("is_open", 1).Fields("ip", "port", "online_id", "is_vip", "name")
|
||||
if DepartmentID != 1 {
|
||||
res, _ = m.All()
|
||||
|
||||
} else {
|
||||
res, _ = cool.DBM(s.Model).Where("is_open", 1).Where("is_debug", 0).Fields("ip", "port", "online_id", "is_vip", "name").All()
|
||||
res, _ = m.Where("is_debug", 0).All()
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user