| | |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/agent/t-big-gift-package-order") |
| | | @Api(tags = "(嘉视达)供应商大礼包订单") |
| | | @Api(tags = "(嘉视达经销商后台)大礼包订单") |
| | | @RequiredArgsConstructor(onConstructor_ = @Lazy) |
| | | public class AgentBigGiftPackageOrderController { |
| | | |
| | |
| | | @ApiOperation(value = "大礼包订单列表") |
| | | @PostMapping(value = "/pageList") |
| | | public R<Page<TBigGiftPackageOrder>> pageList(@RequestBody BigGiftPackageOrderQuery query) { |
| | | if (!SecurityUtils.isAgentUser()) { |
| | | if (SecurityUtils.isAgentUser()) { |
| | | throw new ServiceException("请使用经销商/股东帐号访问"); |
| | | } |
| | | Page<TBigGiftPackageOrder> tBigGiftPackageOrderPage = new Page<>(query.getPageNum(), query.getPageSize()); |
| | |
| | | @ApiOperation(value = "大礼包订单详情") |
| | | @PostMapping(value = "/detail/{id}") |
| | | public R<TBigGiftPackageOrder> detail(@PathVariable Integer id) { |
| | | if (!SecurityUtils.isAgentUser()) { |
| | | if (SecurityUtils.isAgentUser()) { |
| | | throw new ServiceException("请使用经销商/股东帐号访问"); |
| | | } |
| | | TBigGiftPackageOrder tBigGiftPackageOrder = tBigGiftPackageOrderService.getById(id); |
| | |
| | | @ApiOperation(value = "大礼包订单退款申请") |
| | | @PostMapping(value = "/applyRefund") |
| | | public R<Void> applyRefund(@Validated @RequestBody RefundApplyDTO dto) { |
| | | if (!SecurityUtils.isAgentUser()) { |
| | | if (SecurityUtils.isAgentUser()) { |
| | | throw new ServiceException("请使用经销商/股东帐号访问"); |
| | | } |
| | | Integer userId = SecurityUtils.getLoginUser().getUser().getUserId().intValue(); |
| | |
| | | @ApiOperation(value = "退款申请记录列表") |
| | | @PostMapping(value = "/refundList") |
| | | public R<Page<TBigGiftPackageOrder>> refundList(@RequestBody RefundApplicationQuery query) { |
| | | if (!SecurityUtils.isAgentUser()) { |
| | | if (SecurityUtils.isAgentUser()) { |
| | | throw new ServiceException("请使用经销商/股东帐号访问"); |
| | | } |
| | | query.setCompanyId(SecurityUtils.getLoginUser().getUser().getCompanyId()); |