订单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.

39 lines
862 B

3 years ago
2 years ago
3 years ago
3 years ago
3 years ago
  1. syntax = "proto3";
  2. package orderrpc;
  3. // 下单请求结构
  4. message CreateRequest {
  5. string data = 1;
  6. string time = 2;
  7. string sign = 3;
  8. }
  9. // 下单响应结构
  10. message CreateResponse {
  11. string data = 1; //订单号
  12. string time = 2;
  13. string sign = 3;
  14. }
  15. // 请求结构
  16. message Request {
  17. string data = 1;
  18. string time = 2;
  19. string sign = 3;
  20. }
  21. // 响应结构
  22. message Response {
  23. string data = 1;
  24. string time = 2;
  25. string sign = 3;
  26. }
  27. // rpc方法
  28. service OrderService {
  29. rpc create (CreateRequest) returns (CreateResponse); // 创建订单
  30. rpc createByCart (CreateRequest) returns (CreateResponse); // 创建订单
  31. rpc cancel (CreateRequest) returns (CreateResponse); // 取消订单
  32. rpc autoReceive(Request) returns(Response); //自动收货
  33. rpc VerifyByBooking(Request) returns(Response); //核销
  34. }