| | |
| | | import com.ruoyi.framework.web.service.TokenService; |
| | | import com.ruoyi.system.dto.CreateOrderDto; |
| | | import com.ruoyi.system.dto.CreateOrderRequest; |
| | | import com.ruoyi.system.model.TTicketOrder; |
| | | import com.ruoyi.system.query.AppletOrderListQuery; |
| | | import com.ruoyi.system.service.TAppUserService; |
| | | import com.ruoyi.system.service.TTicketOrderService; |
| | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.context.annotation.Lazy; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | |
| | | /** |
| | | * 下单接口 |
| | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 退单 |
| | | */ |
| | | @ApiOperation(value = "退单") |
| | | @PostMapping("/refundOrder") |
| | | public R<Void> refundOrder(@RequestParam Integer orderId) throws Exception { |
| | | Integer userId = tokenService.getLoginUserApplet().getUserId(); |
| | | TTicketOrder order = tTicketOrderService.getById(orderId); |
| | | if(order.getAppUserId().equals(userId)){ |
| | | boolean refund = tTicketOrderService.refundOrder(order); |
| | | if(refund){ |
| | | return R.ok(); |
| | | } |
| | | } |
| | | return R.fail("退单失败"); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 验票通知 |
| | | */ |
| | | @ApiOperation(value = "验票通知") |
| | | @PostMapping("/verifyTicket") |
| | | public R<Void> verifyTicket(HttpServletRequest request) throws Exception { |
| | | |
| | | return R.ok(); |
| | | } |
| | | |
| | | } |