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

This commit is contained in:
xinian
2026-02-12 00:50:11 +08:00
committed by cnb
parent 22a07ca213
commit a6af5c8ca6

View File

@@ -6,8 +6,6 @@ import (
"blazing/modules/player/model"
"context"
"fmt"
"github.com/gogf/gf/v2/util/gconv"
)
// 获取精灵信息 0是仓库,1是放生
@@ -138,16 +136,16 @@ func (s *PetService) ModifyBefore(ctx context.Context, method string, param map[
admin := cool.GetAdmin(ctx)
userId := admin.UserId
s.userid = uint32(userId)
if method == "Update" {
// if method == "Update" {
if gconv.Uint(param["free"]) != 0 {
err = fmt.Errorf("修改失败")
}
if userId != gconv.Uint(param["player_id"]) {
err = fmt.Errorf("修改失败")
}
// if gconv.Uint(param["free"]) != 0 {
// err = fmt.Errorf("修改失败")
// }
// if userId != gconv.Uint(param["player_id"]) {
// err = fmt.Errorf("修改失败")
// }
}
// }
return
}