ApiGoodsStockChangeAck.cs 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using WdtSdk;
  7. namespace ApiGoodsStockChangeAck
  8. {
  9. class ApiGoodsStockChangeAck
  10. {
  11. static void Main(string[] args)
  12. {
  13. WdtClient client = new WdtClient();
  14. client.sid = "";
  15. client.appkey = "";
  16. client.appsecret = "";
  17. client.gatewayUrl = "http://121.41.177.115/openapi2/api_goods_stock_change_ack.php";
  18. var stock_sync_list = new[]
  19. {
  20. new
  21. {
  22. rec_id = "908",
  23. sync_stock = "100",
  24. stock_change_count = "338"
  25. },
  26. new
  27. {
  28. rec_id = "912",
  29. sync_stock = "100",
  30. stock_change_count = "338"
  31. },
  32. new
  33. {
  34. rec_id = "913",
  35. sync_stock = "100",
  36. stock_change_count = "338"
  37. }
  38. };
  39. string json = stock_sync_list.ToJsonString();
  40. client.putParams("stock_sync_list", json);
  41. string result = client.wdtOpenapi();
  42. Console.WriteLine(result);
  43. Console.ReadKey();
  44. }
  45. }
  46. }