| | |
| | | package com.oying.modules.sh.rest; |
| | | |
| | | import com.oying.annotation.Log; |
| | | import com.oying.exception.BadRequestException; |
| | | import com.oying.modules.sh.domain.request.GeneratorOrder; |
| | | import com.oying.modules.sh.domain.request.SubmitOrder; |
| | | import com.oying.modules.sh.service.OrderService; |
| | |
| | | return new ResponseEntity<>(R.success(orderService.queryAll(criteria, page)), HttpStatus.OK); |
| | | } |
| | | |
| | | @GetMapping("app") |
| | | @ApiOperation("APP:查询订单信息") |
| | | @PreAuthorize("@el.check('order:list')") |
| | | public ResponseEntity<Object> appQueryOrder(OrderQueryCriteria criteria) { |
| | | if (criteria.getStoreId() == null) { |
| | | throw new BadRequestException("请选择门店"); |
| | | } |
| | | Page<Object> page = new Page<>(criteria.getPage(), criteria.getSize()); |
| | | return new ResponseEntity<>(R.success(orderService.queryAll(criteria, page)), HttpStatus.OK); |
| | | } |
| | | |
| | | @GetMapping("mini") |
| | | @ApiOperation("小程序:查询订单信息") |
| | | @ApiOperation("小程序:查询订单信息列") |
| | | public ResponseEntity<Object> miniQueryOrder(OrderQueryCriteria criteria) { |
| | | Page<Object> page = new Page<>(criteria.getPage(), criteria.getSize()); |
| | | criteria.setUserId(SecurityUtils.getCurrentUserId()); |
| | |
| | | orderService.deleteAll(ids); |
| | | return new ResponseEntity<>(R.success(), HttpStatus.OK); |
| | | } |
| | | |
| | | @Log("关闭订单") |
| | | @ApiOperation("关闭订单") |
| | | @PostMapping(value = "/closeOrder") |
| | | public ResponseEntity<Object> closeOrder(@RequestParam String orderNum) { |
| | | orderService.closeOrder(orderNum); |
| | | return new ResponseEntity<>(R.success(), HttpStatus.OK); |
| | | } |
| | | |
| | | @ApiOperation("订单号查询订单") |
| | | @GetMapping(value = "/getByOrderNum") |
| | | public ResponseEntity<Object> getByOrderNum(@RequestParam String orderNum) { |
| | | return new ResponseEntity<>(R.success(orderService.getByOrderNum(orderNum)), HttpStatus.OK); |
| | | } |
| | | } |