|
|
@ -58,14 +58,13 @@ func main() {
|
|
|
|
reqDetail := &proto.ProductDetailReq{
|
|
|
|
reqDetail := &proto.ProductDetailReq{
|
|
|
|
Id: int32(productId),
|
|
|
|
Id: int32(productId),
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
//
|
|
|
|
respDetail, err := clientA.ShowProductDetail(context.TODO(), reqDetail)
|
|
|
|
respDetail, err := clientA.ShowProductDetail(context.TODO(), reqDetail)
|
|
|
|
req.ProductName = respDetail.ProductDetail[0].Name
|
|
|
|
req.ProductName = respDetail.ProductDetail[0].Name
|
|
|
|
req.ProductMainPicture = respDetail.ProductDetail[0].MainPicture
|
|
|
|
req.ProductMainPicture = respDetail.ProductDetail[0].MainPicture
|
|
|
|
log.Println(" /ProductDetailReq get :", req)
|
|
|
|
log.Println(" /ProductDetailReq get :", req)
|
|
|
|
//SKU
|
|
|
|
//SKU
|
|
|
|
//添加购物车 远程调用服务log.Println(" /ProductDetailReq get :", req)
|
|
|
|
//添加购物车 远程调用服务
|
|
|
|
// //SKU
|
|
|
|
|
|
|
|
// //添加购物车 远程调用服务
|
|
|
|
|
|
|
|
resp, err := client.AddCart(context.TODO(), req)
|
|
|
|
resp, err := client.AddCart(context.TODO(), req)
|
|
|
|
log.Println(" /increase :", resp)
|
|
|
|
log.Println(" /increase :", resp)
|
|
|
|
//根据响应做输出
|
|
|
|
//根据响应做输出
|
|
|
|