Refactor: Remove deprecated gRPC service files and implement new API structure

- Deleted old gRPC service definitions in `game_grpc.pb.go` and `public.go`.
- Added new API server implementations for objectstory, player, and shop services.
- Introduced configuration files for new APIs in `etc/*.yaml`.
- Created main entry points for each service in `objectstory.go`, `player.go`, and `shop.go`.
- Removed unused user update handler and user API files.
- Added utility functions for context management and HTTP header parsing.
- Introduced PostgreSQL backup configuration in `backup/postgreSql.yaml`.
This commit is contained in:
wwweww
2026-02-28 18:35:56 +08:00
parent d2f33b4b96
commit 19cc7a778c
349 changed files with 42548 additions and 1453 deletions
@@ -3,11 +3,11 @@ package logic
import (
"context"
"errors"
"time"
"juwan-backend/app/shop/rpc/internal/models/shopinvitations"
"juwan-backend/app/shop/rpc/internal/svc"
"juwan-backend/app/shop/rpc/pb"
"github.com/jinzhu/copier"
"github.com/zeromicro/go-zero/core/logx"
)
@@ -26,5 +26,19 @@ func NewUpdateShopInvitationsLogic(ctx context.Context, svcCtx *svc.ServiceConte
}
func (l *UpdateShopInvitationsLogic) UpdateShopInvitations(in *pb.UpdateShopInvitationsReq) (*pb.UpdateShopInvitationsResp, error) {
update, err := l.svcCtx.ShopModelRW.ShopInvitations.UpdateOneID(in.Id).
Where(shopinvitations.PlayerIDEQ(in.PlayerId)).
SetStatus(in.Status).Save(l.ctx)
if err != nil {
logx.Errorf("failed to update shop invitation: %v", err)
return nil, errors.New("failed to update shop invitation")
}
resp := &pb.ShopInvitations{}
err = copier.Copy(resp, update)
if err != nil {
logx.Errorf("failed to copy update: %v", err)
return nil, errors.New("failed to update shop invitation")
}
return &pb.UpdateShopInvitationsResp{ShopInvitations: resp}, nil
}