.afterSale.js 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. module.exports = {
  2. create: {
  3. requestBody: [
  4. 'money',
  5. 'order_detail',
  6. 'customer',
  7. 'shop',
  8. 'set_id',
  9. 'goods',
  10. 'type',
  11. 'reason',
  12. 'desc',
  13. 'file',
  14. 'transport',
  15. 'apply_time',
  16. 'end_time',
  17. 'status',
  18. 'deal_person',
  19. 'out_bill',
  20. ],
  21. },
  22. destroy: {
  23. params: ['!id'],
  24. service: 'delete',
  25. },
  26. update: {
  27. params: ['!id'],
  28. requestBody: [
  29. 'money',
  30. 'order_detail',
  31. 'customer',
  32. 'shop',
  33. 'set_id',
  34. 'goods',
  35. 'type',
  36. 'reason',
  37. 'desc',
  38. 'file',
  39. 'transport',
  40. 'apply_time',
  41. 'end_time',
  42. 'status',
  43. 'deal_person',
  44. 'out_bill',
  45. ],
  46. },
  47. show: {
  48. parameters: {
  49. params: ['!id'],
  50. },
  51. service: 'fetch',
  52. },
  53. index: {
  54. parameters: {
  55. query: {
  56. 'meta.createdAt@start': 'meta.createdAt@start',
  57. 'meta.createdAt@end': 'meta.createdAt@end',
  58. type: 'type',
  59. apply_time: 'apply_time',
  60. end_time: 'end_time',
  61. deal_person: 'deal_person',
  62. out_bill: 'out_bill',
  63. customer: 'customer',
  64. goods: '%goods.goods.name%',
  65. shop: 'shop',
  66. },
  67. // options: {
  68. // "meta.state": 0 // 默认条件
  69. // },
  70. },
  71. service: 'query',
  72. options: {
  73. query: ['skip', 'limit'],
  74. sort: ['meta.createdAt'],
  75. desc: true,
  76. count: true,
  77. },
  78. },
  79. cgfr: {
  80. requestBody: ['order_detail', 'goods_id'],
  81. service: 'computedGoodsForRefund',
  82. },
  83. orderCancel: {
  84. requestBody: ['order_detail', 'desc'],
  85. },
  86. getTransportInfo: {
  87. params: ['!id'],
  88. },
  89. canRefund: {
  90. params: ['!id'],
  91. },
  92. };