Merge branch 'main' of https://cnb.cool/blzing/blazing
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful

This commit is contained in:
昔念
2026-02-24 12:53:16 +08:00
11 changed files with 74 additions and 102 deletions

View File

@@ -61,16 +61,16 @@ func (c *BaseSysUserController) GetSession(ctx context.Context, req *SessionReq)
}
res = &SessionRes{}
t1 := service.NewBaseSysUserService().GetPerson(uint32(t.UserId))
res.UserID = int(t1.ID)
playerinfo := blazing.NewUserService(uint32(t1.ID))
if playerinfo.Info.IsReg() {
playerinfo := blazing.NewUserService(uint32(t1.ID)).Info.Person(uint32(t1.ID))
if playerinfo != nil {
res.IsReg = 1
if t1.DepartmentID == 35 { ///抢先服玩家3天没登录衰退
r := playerinfo.Info.Person(uint32(t1.ID))
if r.UpdateTime.AddDate(0, 0, 3).Before(gtime.Now()) {
if playerinfo.UpdateTime.AddDate(0, 0, 3).Before(gtime.Now()) {
t1.DepartmentID = 1
service.NewBaseSysUserService().SetdepartmentId(uint32(t1.ID), 1)
}

View File

@@ -14,11 +14,9 @@ const (
// -------------------------- 核心基类:所有塔配置的通用结构 --------------------------
type BaseTowerConfig struct {
*BaseConfig
Name string `gorm:"size:32;default:'';comment:'塔层名称'" json:"name" description:"塔层名称"`
// ItemGift []ItemGift `orm:"with:item_id=id"`
// 核心必填字段(所有塔类型通用)
TowerLevel uint32 `gorm:"not null;default:0;uniqueIndex;comment:'塔层数(唯一标识每层配置)'" json:"tower_level" description:"塔层数"`
BossIds []uint32 `gorm:"not null;type:json;default:'[]';comment:'绑定BOSS ID数组关联config_pet_boss表主键'" json:"boss_ids" description:"绑定BOSS数组"`
BossIds []uint32 `gorm:"not null;type:jsonb;default:'[]';comment:'绑定BOSS ID数组关联config_pet_boss表主键'" json:"boss_ids" description:"绑定BOSS数组"`
}
// NewBaseTowerConfig 创建基础塔配置实例(所有塔类型共用)

View File

@@ -20,15 +20,6 @@ import (
csmap "github.com/mhmtszr/concurrent-swiss-map"
)
func (s *InfoService) IsReg() bool {
m := s.dbm_fix(s.Model)
record, _ := m.Exist()
return record
}
// 是否注册,如果注册过,那么就会产生用户player信息
// 实现注册,id+昵称+颜色

View File

@@ -106,9 +106,9 @@ func (s *PetService) Pet_LEVEL_all() []model.Pet {
}
// 精灵真正添加后的捕捉时间才是真正的时间
func (s *PetService) PetAdd(y *model.PetInfo) {
func (s *PetService) PetAdd(y *model.PetInfo) uint32 {
if y == nil {
return
return 0
}
sql := fmt.Sprintf(`
UPDATE %s
@@ -136,7 +136,7 @@ RETURNING max_ts;
if err != nil {
panic(err)
}
return y.CatchTime
}
// func (s *PetService) ModifyBefore(ctx context.Context, method string, param map[string]interface{}) (err error) {