1
Some checks failed
ci/woodpecker/push/my-first-workflow Pipeline failed

This commit is contained in:
xinian
2026-02-13 06:02:32 +08:00
committed by cnb
parent ef05dff851
commit e47ada7e58
7 changed files with 15 additions and 13 deletions

View File

@@ -69,7 +69,8 @@ func (c *BaseSysUserController) GetSession(ctx context.Context, req *SessionReq)
}
res.PetID = dict.NewDictInfoService().GetShiny()
res.Server = config.NewServerService().GetPort(int(t1.Debug))
res.Server = config.NewServerService().GetPort(t1.DepartmentID)
// share.ShareManager.DeleteSession(t1)
cypten := crypto.
FromString(blazing.NewInfoService(uint32(t.UserId)).Gensession()).

View File

@@ -9,7 +9,7 @@ type BaseSysDepartment struct {
*cool.Model
Name string `gorm:"column:name;type:varchar(255);not null" json:"name"` // 部门名称
ParentID uint `gorm:"column:parentId;type:bigint" json:"parentId"` // 上级部门ID
ordernum int32 `gorm:"column:ordernum;type:int;not null" json:"ordernum"` // 排序
Ordernum int32 `gorm:"column:ordernum;type:int;not null" json:"ordernum"` // 排序
}
// TableName BaseSysDepartment's table name

View File

@@ -13,7 +13,7 @@ type BaseSysMenu struct {
Perms *string `gorm:"column:perms;type:text" json:"perms"` // 权限标识
Type int32 `gorm:"column:type;not null" json:"type"` // 类型 0目录 1菜单 2按钮
Icon *string `gorm:"column:icon;type:varchar(255)" json:"icon"` // 图标
ordernum int32 `gorm:"column:ordernum;type:int;not null;default:0" json:"ordernum"` // 排序
Ordernum int32 `gorm:"column:ordernum;type:int;not null;default:0" json:"ordernum"` // 排序
ViewPath *string `gorm:"column:viewPath;type:varchar(255)" json:"viewPath"` // 视图地址
KeepAlive bool `gorm:"column:keepAlive;not null;default:1" json:"keepAlive"` // 路由缓存
IsShow bool `gorm:"column:isShow;not null;default:1" json:"isShow"` // 是否显示

View File

@@ -20,9 +20,9 @@ type BaseSysUser struct {
Email *string `gorm:"column:email;type:varchar(255)" json:"email"` // 邮箱
Status *int32 `gorm:"column:status;not null;default:1" json:"status"` // 状态 0:禁用 1启用
GoldBean int64 `gorm:"column:goldbean;type:bigint;default:0" json:"goldbean"`
Remark *string `gorm:"column:remark;type:varchar(255)" json:"remark"` // 备注
Debug int32 `gorm:"column:debug;type:int;not null;default:0" json:"debug"` // 是否可以进入2服 测试服
Maxts uint32 `gorm:"column:max_ts;type:int;not null;default:0" json:"max_ts"` //最后生成的时间记录表
Remark *string `gorm:"column:remark;type:varchar(255)" json:"remark"` // 备注
//Debug int32 `gorm:"column:debug;type:int;not null;default:0" json:"debug"` // 是否可以进入2服 测试服
Maxts uint32 `gorm:"column:max_ts;type:int;not null;default:0" json:"max_ts"` //最后生成的时间记录表
}
// TableName BaseSysUser's table name

View File

@@ -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 指定子表名

View File

@@ -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 一对多关联,查询时可预加载)

View File

@@ -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()
}