.zrOrder.js 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. module.exports = {
  2. create: {
  3. requestBody: ['customer', 'shop', 'goods', 'buy_num', 'buy_time', 'no', 'address', 'transport', 'remarks', 'status'],
  4. },
  5. destroy: {
  6. params: ['!id'],
  7. service: 'delete',
  8. },
  9. update: {
  10. params: ['!id'],
  11. requestBody: ['customer', 'shop', 'goods', 'buy_num', 'buy_time', 'no', 'address', 'transport', 'remarks', 'status'],
  12. },
  13. show: {
  14. parameters: {
  15. params: ['!id'],
  16. },
  17. service: 'fetch',
  18. },
  19. index: {
  20. parameters: {
  21. query: {
  22. 'meta.createdAt@start': 'meta.createdAt@start',
  23. 'meta.createdAt@end': 'meta.createdAt@end',
  24. customer: 'customer',
  25. shop: 'shop',
  26. goods: 'goods',
  27. no: 'no',
  28. status: 'status',
  29. },
  30. // options: {
  31. // "meta.state": 0 // 默认条件
  32. // },
  33. },
  34. service: 'query',
  35. options: {
  36. query: ['skip', 'limit'],
  37. sort: ['meta.createdAt'],
  38. desc: true,
  39. count: true,
  40. },
  41. },
  42. checkCanBuy: {
  43. requestBody: ['!shop', '!goods', '!num'],
  44. },
  45. toMakeOrder: {
  46. requestBody: ['!key'],
  47. },
  48. };