fix: player-rpc SetGender 类型不匹配
This commit is contained in:
@@ -33,10 +33,6 @@ func (l *AddPlayersLogic) AddPlayers(in *pb.AddPlayersReq) (*pb.AddPlayersResp,
|
||||
logx.Errorf("addPlayerServices err:%v", err)
|
||||
return nil, errors.New("create player service id failed")
|
||||
}
|
||||
gender := 0
|
||||
if in.Gender != 0 {
|
||||
gender = 1
|
||||
}
|
||||
_, err = l.svcCtx.PlayerModelRW.Players.Create().
|
||||
SetID(idResp.Id).
|
||||
SetUserID(in.UserId).
|
||||
@@ -46,7 +42,7 @@ func (l *AddPlayersLogic) AddPlayers(in *pb.AddPlayersReq) (*pb.AddPlayersResp,
|
||||
SetCompletedOrders(int(in.CompletedOrders)).
|
||||
SetShopID(in.ShopId).
|
||||
SetTags(in.Tags).
|
||||
SetGender(gender).
|
||||
SetGender(in.Gender != 0).
|
||||
SetGames(in.Games).
|
||||
Save(l.ctx)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user