| | |
| | | service: UserAddressService, |
| | | insertParam: ctx => { |
| | | return { |
| | | userId: ctx.user.id, |
| | | userId: ctx.user.userId, |
| | | }; |
| | | }, |
| | | pageQueryOp: { |
| | | where: async ctx => { |
| | | return [['userId =:userId', { userId: ctx.user.id }]]; |
| | | return [['userId =:userId', { userId: ctx.user.userId }]]; |
| | | }, |
| | | addOrderBy: { |
| | | isDefault: 'DESC', |
| | |
| | | |
| | | @Get('/default', { summary: '默认地址' }) |
| | | async default() { |
| | | return this.ok(await this.userAddressService.default(this.ctx.user.id)); |
| | | return this.ok( |
| | | await this.userAddressService.default(this.ctx.user.userId) |
| | | ); |
| | | } |
| | | } |