| | |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.core.utils.page.PageDTO; |
| | | import com.ruoyi.order.controller.management.dto.MgtMallOrderQuery; |
| | | import com.ruoyi.order.controller.management.dto.MgtOrderConfirmShipmentDTO; |
| | | import com.ruoyi.order.controller.management.vo.MgtMallOrderVO; |
| | | import com.ruoyi.order.service.IOrderService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiParam; |
| | | import lombok.RequiredArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.PutMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | |
| | | @RestController |
| | | @RequestMapping("/mgt/order") |
| | | @RequiredArgsConstructor |
| | | @Api(tags = "管理后台-订单管理相关接口", value = "管理后台-订单管理相关接口") |
| | | public class MgtOrderController { |
| | | |
| | | private final IOrderService orderService; |
| | |
| | | @Validated @RequestBody MgtMallOrderQuery query) { |
| | | return R.ok(orderService.getMallOrderPage(query)); |
| | | } |
| | | |
| | | /** |
| | | * 获取商城订单详情 |
| | | * |
| | | * @param id 订单id |
| | | * @return MgtMallOrderVO |
| | | */ |
| | | @ApiOperation("查看详情") |
| | | @GetMapping("/detail/{id}") |
| | | public R<MgtMallOrderVO> getMallOrderDetail( |
| | | @ApiParam(name = "id", value = "订单id", required = true) |
| | | @Validated @RequestBody Long id) { |
| | | return R.ok(orderService.getMallOrderDetail(id)); |
| | | } |
| | | |
| | | /** |
| | | * 确认发货 |
| | | * |
| | | * @param dto 确认收货请求对象 |
| | | */ |
| | | @ApiOperation("确认收货") |
| | | @PutMapping("/confirm-shipment") |
| | | public R<?> confirmShipmentOrder(@Validated @RequestBody MgtOrderConfirmShipmentDTO dto) { |
| | | orderService.confirmShipmentOrder(dto); |
| | | return R.ok(); |
| | | } |
| | | |
| | | /** |
| | | * 已收货 |
| | | * |
| | | * @param id 订单id |
| | | */ |
| | | @ApiOperation("已收货") |
| | | @PutMapping("/received-goods/{id}") |
| | | public R<?> receivedGoods( |
| | | @ApiParam(name = "id", value = "订单id", required = true) @PathVariable("id") Long id) { |
| | | orderService.receivedGoods(id); |
| | | return R.ok(); |
| | | } |
| | | } |