fix(fight): 修复战斗效果类型初始化错误 - 将EffectType.NewSel更改为EffectType.Skill以修正技能效果类型 - 移除effect_415中的多余变量声明,直接使用参数值进行治疗计算 feat(admin): 添加用户金币增加功能 - 新增UserGoldAddReq结构体用于处理金币添加请求 - 实现GoldAdd方法支持管理员为指定用户增加金币 feat(pet):
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user