2.0订单rpc数据结构
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
577 B

  1. package orderrpcv2
  2. import (
  3. "testing"
  4. )
  5. func Test_CreateByCart(t *testing.T) {
  6. products := []map[string]string{
  7. map[string]string{
  8. "product_id": "19",
  9. "sku_id": "6",
  10. "quantity": "3",
  11. },
  12. map[string]string{
  13. "product_id": "26",
  14. "quantity": "4",
  15. },
  16. }
  17. data := map[string]interface{}{
  18. "product": products,
  19. "name": "5BC02AB31C",
  20. "mobile": "326598744",
  21. "user_id": "2",
  22. "quantity": "3",
  23. "business_id": "1",
  24. "sku_id": "5",
  25. }
  26. ret, err := CreateByCart("100064", "shop_v2", data)
  27. t.Log(ret)
  28. t.Log(err)
  29. }