| | |
| | | @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) { |
| | |
| | | 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); |