feat: analysis user auth and ws
This commit is contained in:
@@ -2,12 +2,11 @@ package logic
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
|
||||
"lone-services/pkg/rpcclient"
|
||||
"lone-services/pkg/utils"
|
||||
chore "lone-services/rpc/chore/pb"
|
||||
product "lone-services/rpc/product/pb"
|
||||
user "lone-services/rpc/user/pb"
|
||||
"lone-services/services/chore/internal/svc"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
@@ -32,9 +31,9 @@ func NewTestLogic(ctx context.Context, svcCtx *svc.ServiceContext) *TestLogic {
|
||||
}
|
||||
|
||||
func (l *TestLogic) Test(in *chore.TestReq) (*chore.Response, error) {
|
||||
cli, err := rpcclient.Get(l.svcCtx.ProductSvcName)
|
||||
// cli, err := rpcclient.Get(l.svcCtx.ProductSvcName)
|
||||
// cli, err := rpcclient.Get(l.svcCtx.SaleSvcName)
|
||||
// cli, err := rpcclient.Get(l.svcCtx.UserSvcName)
|
||||
cli, err := rpcclient.Get(l.svcCtx.UserSvcName)
|
||||
|
||||
if err != nil {
|
||||
l.Errorf("get rpc: %v", err)
|
||||
@@ -121,21 +120,21 @@ func (l *TestLogic) Test(in *chore.TestReq) (*chore.Response, error) {
|
||||
// })
|
||||
// fmt.Println(res.GetResult())
|
||||
|
||||
// res, err := user.NewUserClient(cli.Conn()).InternalCreate(l.ctx, &user.InternalCreateReq{
|
||||
// BizId: 10086,
|
||||
// Mobile: in.GetChar(),
|
||||
// ClientCode: []string{"user_skin", "user_o2"},
|
||||
// CredentialType: []string{"password", "sms"},
|
||||
// Identifier: in.GetChar(),
|
||||
// Secret: "123123",
|
||||
// })
|
||||
|
||||
res, err := product.NewProductClient(cli.Conn()).InternalItems(l.ctx, &product.InternalItemsReq{
|
||||
Status: []uint32{},
|
||||
Type: []uint32{},
|
||||
res, err := user.NewUserClient(cli.Conn()).InternalCreate(l.ctx, &user.InternalCreateReq{
|
||||
BizId: 128,
|
||||
Mobile: in.GetChar(),
|
||||
Name: "zzw",
|
||||
ClientCode: []string{"store_skin"},
|
||||
CredentialType: []string{"password", "sms"},
|
||||
Identifier: in.GetChar(),
|
||||
Secret: "123123",
|
||||
})
|
||||
|
||||
fmt.Println(res.GetItems())
|
||||
// res, err := product.NewProductClient(cli.Conn()).InternalItems(l.ctx, &product.InternalItemsReq{
|
||||
// Status: []uint32{},
|
||||
// Type: []uint32{},
|
||||
// })
|
||||
|
||||
if err != nil {
|
||||
l.Errorf("XXXXXX: %v", err)
|
||||
return failResponse(utils.ErrorInternalServer), nil
|
||||
|
||||
Reference in New Issue
Block a user