refactor: 移除PetService中已注释的ModifyBefore方法
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful

This commit is contained in:
xinian
2026-02-12 00:57:45 +08:00
committed by cnb
parent a6af5c8ca6
commit b5feb85792

View File

@@ -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