```
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful

fix(fight): 修复战斗效果类型初始化错误

- 将EffectType.NewSel更改为EffectType.Skill以修正技能效果类型
- 移除effect_415中的多余变量声明,直接使用参数值进行治疗计算

feat(admin): 添加用户金币增加功能

- 新增UserGoldAddReq结构体用于处理金币添加请求
- 实现GoldAdd方法支持管理员为指定用户增加金币

feat(pet):
This commit is contained in:
昔念
2026-03-10 20:51:48 +08:00
parent ab2ebcd56d
commit 69350bb79e
27 changed files with 50 additions and 41 deletions

View File

@@ -69,7 +69,7 @@ func (c *BaseSysUserController) GetSession(ctx context.Context, req *SessionReq)
if playerinfo != nil {
res.IsReg = 1
if t1.DepartmentID == 35 { ///抢先服玩家3天没登录衰退
if playerinfo.UpdateTime.AddDate(0, 0, 3).Before(gtime.Now()) {
t1.DepartmentID = 1
service.NewBaseSysUserService().SetdepartmentId(uint32(t1.ID), 1)
@@ -137,3 +137,17 @@ func (c *BaseSysUserController) Regrobot(ctx context.Context, req *RegReq) (res
type RegRes struct {
Session string `json:"session"`
}
type UserGoldAddReq struct {
g.Meta `path:"/goldadd" method:"GET"`
Authorization string `json:"Authorization" in:"header"`
UserID int `json:"userid"`
Gold float32 `json:"gold"`
}
func (c *BaseSysUserController) GoldAdd(ctx context.Context, req *UserGoldAddReq) (res *cool.BaseRes, err error) {
service.NewBaseSysUserService().UpdateGold(uint32(req.UserID), int64(req.Gold*100))
res = cool.Ok(nil)
return
}