| | |
| | | @ApiImplicitParam(name = "orderId", value = "订单id", dataType = "String", required = true), |
| | | }) |
| | | public R<String> queryPayment(@RequestParam(value = "orderId") String orderId) throws Exception { |
| | | JSONObject jsonObject = JuHeFuUtil.queryPayment(orderId); |
| | | return R.ok(jsonObject.getString("status")); |
| | | Order byId = orderService.getById(orderId); |
| | | if (byId==null){ |
| | | return R.fail("订单失效"); |
| | | } |
| | | if (byId.getPaymentStatus()==2){ |
| | | return R.ok("succeeded"); |
| | | }else if (byId.getPaymentStatus()==1){ |
| | | return R.fail("pending"); |
| | | }else{ |
| | | return R.fail("failed"); |
| | | } |
| | | |
| | | |
| | | } |
| | | @GetMapping("/getMeditationIsBuyAll/{id}") |
| | | public R<List<Order>> getMeditationIsBuyAll(@PathVariable("id")Long id) { |
| | | List<Order> list = orderService.lambdaQuery() |
| | | .eq(Order::getAppUserId, id) |
| | | .eq(Order::getOrderFrom, 1) |
| | | .eq(Order::getPaymentStatus, 2) |
| | | .ne(Order::getRefundStatus, 3).list(); |
| | | return R.ok(list); |
| | | } |
| | | @GetMapping("/getMeditationIsBuy/{id}/{meditationId}") |
| | | public R<Integer> getMeditationIsBuy(@PathVariable("id")Long id,@PathVariable("meditationId")Long meditationId) { |
| | |
| | | return R.ok(1); |
| | | } |
| | | } |
| | | |
| | | @PostMapping("/payOrder") |
| | | @ApiOperation(value = "已购详情-待支付状态-页面数据",tags = "我的已购") |
| | | @ApiImplicitParams({ |
| | |
| | | return R.tokenError("登录失效"); |
| | | } |
| | | Long userId = loginUser.getUserid(); |
| | | AppUser data2 = remoteAppUserService.getAppUserById(userId + "").getData(); |
| | | if (data2==null){ |
| | | return R.tokenError("登录失效"); |
| | | }else if (!StringUtils.hasLength(data2.getCellPhone())){ |
| | | return R.tokenError("登录失效"); |
| | | } |
| | | |
| | | try { |
| | | if (orderId!=null){ |
| | | Order order = orderService.getById(orderId); |