| | |
| | | productId := c.Query("productNumber") |
| | | cli := product.NewProductServiceClient(productServiceConn) |
| | | |
| | | getProductInfoResponse, err := cli.GetProductInfo(ctx.GetCtx(), &product.GetProductInfoRequest{ProductId: productId}, nil) |
| | | getProductInfoResponse, err := cli.GetProductInfo(ctx.GetCtx(), &product.GetProductInfoRequest{ProductId: productId}) |
| | | if err != nil { |
| | | logx.Errorf("GetProductInfo err: %v", err.Error()) |
| | | ctx.FailWithMsg(ecode.UnknownErr, "内部错误") |
| | |
| | | ctx.FailWithMsg(ecode.UnknownErr, "内部错误") |
| | | return |
| | | } |
| | | ctx.OkWithDetailed(contextx.Response{ |
| | | Data: getProductInfoResponse.Data, |
| | | }) |
| | | ctx.OkWithDetailed(getProductInfoResponse.Data) |
| | | } |