| | |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.dao.dto.CancelOrderDTO; |
| | | import com.doumee.dao.dto.CommentOrderDTO; |
| | | import com.doumee.dao.dto.ConfirmArriveDTO; |
| | | import com.doumee.dao.dto.CreateOrderDTO; |
| | | import com.doumee.dao.dto.DriverVerifyDTO; |
| | | import com.doumee.dao.dto.ShopVerifyDTO; |
| | | import com.doumee.dao.dto.StoreOutDTO; |
| | | import com.doumee.dao.dto.MyOrderDTO; |
| | | import com.doumee.dao.vo.MyOrderDetailVO; |
| | | import com.doumee.dao.vo.MyOrderVO; |
| | |
| | | return ApiResponse.success("查询成功", ordersService.findMyOrderPage(pageWrap, getMemberId())); |
| | | } |
| | | |
| | | @LoginShopRequired |
| | | @ApiOperation(value = "门店订单分页", notes = "门店端,查询存件/取件门店为当前门店的订单") |
| | | @PostMapping("/shopPage") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "门店token值", required = true) |
| | | }) |
| | | public ApiResponse<PageData<MyOrderVO>> shopPage(@RequestBody @Validated PageWrap<MyOrderDTO> pageWrap) { |
| | | return ApiResponse.success("查询成功", ordersService.findShopOrderPage(pageWrap, getShopId())); |
| | | } |
| | | |
| | | @LoginRequired |
| | | @ApiOperation(value = "会员订单详情", notes = "小程序端,查询当前会员的订单详情") |
| | | @GetMapping("/detail/{orderId}") |
| | |
| | | }) |
| | | public ApiResponse<OverdueFeeVO> overdueFee(@PathVariable Integer orderId) { |
| | | return ApiResponse.success("查询成功", ordersService.calculateOverdueFee(orderId)); |
| | | } |
| | | |
| | | @LoginRequired |
| | | @ApiOperation(value = "逾期费用支付", notes = "逾期订单唤起微信支付") |
| | | @PostMapping("/payOverdueFee/{orderId}") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "path", dataType = "Integer", name = "orderId", value = "订单主键", required = true), |
| | | @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "用户token值", required = true) |
| | | }) |
| | | public ApiResponse<PayResponse> payOverdueFee(@PathVariable Integer orderId) { |
| | | return ApiResponse.success("操作成功", ordersService.payOverdueFee(orderId, getMemberId())); |
| | | } |
| | | |
| | | @LoginRequired |
| | | @ApiOperation(value = "会员删除订单", notes = "仅已完成/已取消/已退款订单可删除,逻辑删除") |
| | | @PostMapping("/delete/{orderId}") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "path", dataType = "Integer", name = "orderId", value = "订单主键", required = true), |
| | | @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "用户token值", required = true) |
| | | }) |
| | | public ApiResponse deleteOrder(@PathVariable Integer orderId) { |
| | | ordersService.deleteMyOrder(orderId, getMemberId()); |
| | | return ApiResponse.success("删除成功"); |
| | | } |
| | | |
| | | @LoginShopRequired |
| | |
| | | return ApiResponse.success("查询成功", ordersService.findShopOrderDetail(orderId, verifyCode)); |
| | | } |
| | | |
| | | @LoginShopRequired |
| | | @ApiOperation(value = "门店确认出库", notes = "取件门店确认出库,订单完成") |
| | | @PostMapping("/storeOut") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "门店token值", required = true) |
| | | }) |
| | | public ApiResponse storeOut(@RequestBody @Validated StoreOutDTO dto) { |
| | | ordersService.confirmStoreOut(dto.getOrderId(), getShopId(), dto.getImages(), dto.getRemark()); |
| | | return ApiResponse.success("出库成功"); |
| | | } |
| | | |
| | | @LoginShopRequired |
| | | @ApiOperation(value = "确认顾客到店", notes = "门店确认顾客已到店取件,检查逾期/退款") |
| | | @PostMapping("/confirmArrived") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "门店token值", required = true) |
| | | }) |
| | | public ApiResponse confirmArrived(@RequestBody @Validated ConfirmArriveDTO dto) { |
| | | ordersService.confirmCustomerArrived(dto.getOrderId(), getShopId()); |
| | | return ApiResponse.success("操作成功"); |
| | | } |
| | | |
| | | @LoginRequired |
| | | @ApiOperation(value = "订单评价", notes = "已完成且未评价的订单可进行评价") |
| | | @PostMapping("/comment") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "用户token值", required = true) |
| | | }) |
| | | public ApiResponse comment(@RequestBody @Validated CommentOrderDTO dto) { |
| | | ordersService.commentOrder(dto, getMemberId()); |
| | | return ApiResponse.success("评价成功"); |
| | | } |
| | | |
| | | |
| | | } |