Merge remote-tracking branch 'origin/master'
This commit is contained in:
@ -3,7 +3,6 @@ package internal
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"github.com/go-resty/resty/v2"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"server/internal/consts"
|
||||
"server/internal/dao"
|
||||
@ -268,20 +267,16 @@ func (s *sUser) UnBoundUrl(ctx context.Context, in *model.UserBoundUrlIn) (out *
|
||||
}, nil
|
||||
}
|
||||
func (s *sUser) BoundInfo(ctx context.Context, in *model.UserBoundInfoIn) (out *model.UserBoundInfoOut, err error) {
|
||||
url, err := gamelife.GetGamelifeClient(ctx).GetBound(ctx, in.PopenId)
|
||||
result, err := gamelife.GetGamelifeClient(ctx).GetBound(ctx, in.PopenId)
|
||||
if err != nil {
|
||||
return nil, ecode.Fail.Sub("获取查询用户绑定信息 url 失败")
|
||||
}
|
||||
var result model.UserBoundResult
|
||||
resp, err := resty.New().R().SetResult(&result).Post(url)
|
||||
if err != nil {
|
||||
return nil, ecode.Fail.Sub("调用游戏人生接口出现异常")
|
||||
}
|
||||
if resp.StatusCode() != 200 {
|
||||
return nil, ecode.Fail.Sub("调用游戏人生接口失败")
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return &model.UserBoundInfoOut{
|
||||
IsBound: result.Result,
|
||||
IsBound: result.Result,
|
||||
AppNames: result.AppNames,
|
||||
Ctime: result.Ctime,
|
||||
Nick: result.Nick,
|
||||
Utype: result.Utype,
|
||||
}, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user