liujiandao
2023-12-19 981681b3cc96d3f8e90ce5e358e1540d02f9f5d9
api/v1/salesDetails.go
@@ -19,6 +19,7 @@
   "google.golang.org/grpc"
   "google.golang.org/grpc/credentials/insecure"
   "strconv"
   "strings"
)
type SalesDetailsApi struct{}
@@ -276,6 +277,10 @@
   client := product_inventory.NewProductInventoryServiceClient(ProductInventoryServiceConn)
   info, err := client.GetInventoryProductInfo(ctx.GetCtx(), &product_inventory.GetInventoryProductInfoRequest{Number: number})
   if err != nil {
      if strings.Contains(err.Error(), "record not found") {
         ctx.Ok()
         return
      }
      logx.Errorf("GetProductInfo err: %v", err.Error())
      ctx.FailWithMsg(ecode.UnknownErr, "grpc调用错误")
      return