123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- module.exports = {
- create: {
- requestBody: ['plus_goods', 'inviter', 'type', 'group', 'customer', 'address', 'goods', 'total_detail', 'buy_time', 'pay', 'no', 'status', 'coupon'],
- },
- destroy: {
- params: ['!id'],
- service: 'delete',
- },
- update: {
- params: ['!id'],
- requestBody: ['plus_goods', 'type', 'group', 'customer', 'address', 'goods', 'buy_time', 'pay', 'no', 'status'],
- },
- show: {
- parameters: {
- params: ['!id'],
- },
- service: 'fetch',
- },
- index: {
- parameters: {
- query: {
- 'meta.createdAt@start': 'meta.createdAt@start',
- 'meta.createdAt@end': 'meta.createdAt@end',
- customer: 'customer',
- 'buy_time@start': 'buy_time@start',
- 'buy_time@end': 'buy_time@end',
- 'pay_time@start': 'pay.pay_time@start',
- 'pay_time@end': 'pay.pay_time@end',
- shop: 'goods.shop',
- no: 'no',
- status: 'status',
- type: 'type',
- group: 'group',
- goods: '%goods.goods.goods.name%',
- },
- // options: {
- // "meta.state": 0 // 默认条件
- // },
- },
- service: 'query',
- options: {
- query: ['skip', 'limit'],
- sort: ['meta.createdAt'],
- desc: true,
- count: true,
- },
- },
- toMakeOrder: {
- requestBody: ['!key'],
- },
- fromGoodsToOrder: {
- requestBody: ['!shop', '!goods', '!goodsSpec', '!num'],
- },
- cancel: {
- requestBody: ['!order_id'],
- },
- };
|