refactor: 移除PetService中已注释的ModifyBefore方法
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user