| | |
| | | import com.xzx.gc.common.request.BaseController; |
| | | import com.xzx.gc.model.JsonResult; |
| | | import com.xzx.gc.order.dto.AddJhyOrderDto; |
| | | import com.xzx.gc.order.dto.JhyOrderConfirmDto; |
| | | import com.xzx.gc.order.dto.JhyOrderListDto; |
| | | import com.xzx.gc.order.service.JhyOrderService; |
| | | import com.xzx.gc.order.vo.JhyOrderDetailsVo; |
| | |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.util.Map; |
| | | |
| | | @Slf4j |
| | | @RestController |
| | |
| | | |
| | | @ApiOperation("取消订单") |
| | | @PostMapping(value = "/jhy/order/cancel/{orderId}") |
| | | public Result<String> cancelOrder(Long orderId, HttpServletRequest request) { |
| | | public Result<String> cancelOrder(@PathVariable("orderId") Long orderId, HttpServletRequest request) { |
| | | jhyOrderService.cancelOrder(orderId, getUserId(request)); |
| | | return null; |
| | | return Result.success(); |
| | | } |
| | | |
| | | @ApiOperation("确认订单-支付") |
| | | @PostMapping(value = "/jhy/order/confirm") |
| | | public Result<String> confirmOrder() { |
| | | return null; |
| | | public Result<String> confirmOrder(@RequestBody JhyOrderConfirmDto confirmDto, HttpServletRequest request) { |
| | | confirmDto.setUserId(getUserId(request)); |
| | | jhyOrderService.confirmOrder(confirmDto); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @ApiOperation("订单状态数量") |
| | | @PostMapping(value = "/jhy/order/orderStatusCnt/{type}") |
| | | public JsonResult<Map<Integer, Integer>> orderStatusCnt(@PathVariable("type") Integer type, HttpServletRequest request) { |
| | | return JsonResult.success(jhyOrderService.orderStatusCount(type, getUserId(request))); |
| | | } |
| | | |
| | | } |