.orderDetail.js 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. module.exports = {
  2. create: {
  3. requestBody: ['order_id'],
  4. },
  5. destroy: {
  6. params: ['!id'],
  7. service: 'delete',
  8. },
  9. update: {
  10. params: ['!id'],
  11. requestBody: [
  12. 'out_bill',
  13. 'type',
  14. 'group',
  15. 'remarks',
  16. 'order',
  17. 'shop',
  18. 'customer',
  19. 'address',
  20. 'no',
  21. 'transport',
  22. 'transport_type',
  23. 'goods',
  24. 'buy_time',
  25. 'pay_time',
  26. 'discount',
  27. 'status',
  28. ],
  29. },
  30. show: {
  31. parameters: {
  32. params: ['!id'],
  33. },
  34. service: 'fetch',
  35. },
  36. index: {
  37. parameters: {
  38. query: {
  39. 'meta.createdAt@start': 'meta.createdAt@start',
  40. 'meta.createdAt@end': 'meta.createdAt@end',
  41. order: 'order',
  42. shop: 'shop',
  43. customer: 'customer',
  44. address: 'address._id',
  45. no: 'no',
  46. 'pay_time@start': 'pay_time@start',
  47. 'pay_time@end': 'pay_time@end',
  48. 'buy_time@start': 'buy_time@start',
  49. 'buy_time@end': 'buy_time@end',
  50. status: 'status',
  51. type: 'type',
  52. group: 'group',
  53. out_bill: 'out_bill',
  54. goods: '%goods.goods.name%',
  55. transport_type: 'transport_type',
  56. },
  57. // options: {
  58. // "meta.state": 0 // 默认条件
  59. // },
  60. },
  61. service: 'query',
  62. options: {
  63. query: ['skip', 'limit'],
  64. sort: ['meta.createdAt'],
  65. desc: true,
  66. count: false,
  67. },
  68. },
  69. sot: {
  70. requestBody: ['!id','goods_id'],
  71. service: 'searchOrderTransport',
  72. },
  73. };