This commit is contained in:
@@ -22,7 +22,7 @@ type PetFusionMaterial struct {
|
||||
Trait3Idx uint32 `gorm:"not null;comment:'特性3索引(如1023)'" json:"trait3_idx"`
|
||||
Trait4Idx uint32 `gorm:"not null;comment:'特性4索引(如1031)'" json:"trait4_idx"`
|
||||
|
||||
IsEnable int32 `gorm:"not null;default:1;comment:'是否启用该组合(1:启用,0:禁用)'" json:"is_enable"`
|
||||
IsEnable int32 `gorm:"not null;default:0;comment:'是否启用该组合(1:启用,0:禁用)'" json:"is_enable"`
|
||||
}
|
||||
|
||||
// TableName 指定子表名
|
||||
|
||||
@@ -18,7 +18,7 @@ type PetFusion struct {
|
||||
Probability int32 `gorm:"not null;comment:'融合成功率(百分比,如80代表80%)'" json:"probability"`
|
||||
ResultPetID int32 `gorm:"not null;comment:'融合结果宠物ID(如:卡鲁、闪尼)'" json:"result_pet_id"`
|
||||
Remark string `gorm:"type:varchar(255);default:'';comment:'融合配方备注(如:尼尔+闪皮=闪尼)'" json:"remark"`
|
||||
IsEnable int32 `gorm:"not null;default:1;comment:'是否启用(1:启用,0:禁用)'" json:"is_enable"`
|
||||
IsEnable int32 `gorm:"not null;default:0;comment:'是否启用(1:启用,0:禁用)'" json:"is_enable"`
|
||||
IsDefault int32 `gorm:"not null;default:0;comment:'是否默认配方(1:默认配方,0:非默认;所有配方不匹配时随机选默认配方)'" json:"is_default"`
|
||||
|
||||
// 关联:一个配方对应多个材料(gorm 一对多关联,查询时可预加载)
|
||||
|
||||
@@ -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