From b5feb85792e2a3e6236a373d873f62a8a499d5d6 Mon Sep 17 00:00:00 2001 From: xinian Date: Thu, 12 Feb 2026 00:57:45 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E7=A7=BB=E9=99=A4PetService?= =?UTF-8?q?=E4=B8=AD=E5=B7=B2=E6=B3=A8=E9=87=8A=E7=9A=84ModifyBefore?= =?UTF-8?q?=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/player/service/pet.go | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/modules/player/service/pet.go b/modules/player/service/pet.go index 60d2210c..f858448d 100644 --- a/modules/player/service/pet.go +++ b/modules/player/service/pet.go @@ -132,23 +132,23 @@ RETURNING max_ts; } } -func (s *PetService) ModifyBefore(ctx context.Context, method string, param map[string]interface{}) (err error) { - admin := cool.GetAdmin(ctx) - userId := admin.UserId - s.userid = uint32(userId) - // if method == "Update" { +// func (s *PetService) ModifyBefore(ctx context.Context, method string, param map[string]interface{}) (err error) { +// admin := cool.GetAdmin(ctx) +// userId := admin.UserId +// s.userid = uint32(userId) +// // 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 -} +// return +// } type PetService struct { BaseService