fix: some api bug

This commit is contained in:
wwweww
2026-03-31 22:12:06 +08:00
parent c5ff4f0216
commit e7970ac25f
219 changed files with 16195 additions and 2126 deletions
+7 -2
View File
@@ -8,6 +8,11 @@ Prometheus:
Path: /metrics
# k8s://juwan/<service name>:8080
PlayerRpcConf:
Target: k8s://juwan/player-rpc-svc:8080
# ===== PROC CONF =====
#PlayerRpcConf:
# Target: k8s://juwan/player-rpc-svc:8080
# ===== DEV CONF ====
PlayerRpcConf:
Endpoints:
- player-rpc:8080
@@ -32,9 +32,9 @@ func NewListPlayersLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ListP
func (l *ListPlayersLogic) ListPlayers(req *types.PlayerListReq) (resp *types.PlayerListResp, err error) {
// todo: add your logic here and delete this line
p, err := l.svcCtx.PlayerRpc.SearchPlayers(l.ctx, &pb.SearchPlayersReq{
Page: req.Offset,
Limit: req.Limit,
Gender: int64(req.Gender),
Page: &req.Offset,
Limit: &req.Limit,
Gender: &req.Gender,
})
if err != nil {
return nil, err
+2 -1
View File
@@ -48,7 +48,7 @@ type PageReq struct {
type PlayerListReq struct {
PageReq
GameId int64 `form:"gameId,optional"`
Gender int `form:"gender,optional"`
Gender int64 `form:"gender,optional"`
}
type PlayerListResp struct {
@@ -67,6 +67,7 @@ type PlayerProfile struct {
Services []PlayerService `json:"services"`
ShopId string `json:"shopId,optional"`
ShopName string `json:"shopName,optional"`
Gender bool `json:"gender"`
Tags []string `json:"tags"`
}