| | |
| | | tCommunityActivity.setUserNum(tCommunityActivityRegistrations.size()); |
| | | String finalUserId = userId; |
| | | if (finalUserId != null) { |
| | | long count = tCommunityActivityRegistrations.stream().filter(e -> e.getAppUserId().equals(finalUserId)).count(); |
| | | if(count>0){ |
| | | tCommunityActivity.setState(2); |
| | | } |
| | | |
| | | } |
| | | |
| | |
| | | if (count > 0) { |
| | | tCommunityActivity.setUserNum((int) count); |
| | | } |
| | | if(userId!=null){ |
| | | if (userId != null) { |
| | | tCommunityActivity.setState(tCommunityActivityRegistrationService.count(new LambdaQueryWrapper<TCommunityActivityRegistration>().eq(TCommunityActivityRegistration::getActivityId, id).eq(TCommunityActivityRegistration::getAppUserId, userId)) > 0 ? 2 : 1); |
| | | } |
| | | return R.ok(tCommunityActivity); |
| | |
| | | // refundModel.setAmount(new WxPaymentRefundModel.RefundAmount(courseOrder1.getPayMoney().multiply(BigDecimal.valueOf(100)).intValue(), "CNY", courseOrder1.getPayMoney().multiply(BigDecimal.valueOf(100)).intValue())); |
| | | // Map<String, Object> refund = wxV3Pay.refund(refundModel); |
| | | // System.out.println(refund); |
| | | String result = wxRefundUtil.refund(order1.getPayMoney().multiply(BigDecimal.valueOf(100)).intValue(), order1.getPayNo(),outRefundNo); |
| | | String result = wxRefundUtil.refundInsurance(order1.getPayMoney().multiply(BigDecimal.valueOf(100)).intValue(), order1.getPayNo(),outRefundNo); |
| | | if(result!=null){ |
| | | return R.fail(result); |
| | | } |
| | |
| | | order.setRefundTransactionId(transaction_id); |
| | | tInsuranceOrderService.updateById(order); |
| | | |
| | | wxV3Pay.ack(); |
| | | wxV3Pay.ack(true, "退款成功"); |
| | | } |
| | | }catch (Exception e){ |
| | | wxV3Pay.ack(false, "不是成功的退款状态"); |
| | |
| | | @Override |
| | | public void execute(JobExecutionContext context) |
| | | throws JobExecutionException { |
| | | System.err.println("订单定时任务开始执行"); |
| | | JobDataMap maps = context.getMergedJobDataMap(); |
| | | String id = maps.getString("id"); |
| | | try { |
| | |
| | | request.outTradeNo = outTradeNo; |
| | | request.reason = "退款"; |
| | | request.fundsAccount = ReqFundsAccount.AVAILABLE; |
| | | request.notifyUrl =this.wxV3Pay.getConfig().getV3().getNotifyRefundUrl(); |
| | | request.notifyUrl =this.wxV3Pay.getConfig().getV3().getNotifyInsuranceRefundUrl(); |
| | | request.amount = new AmountReq(); |
| | | request.amount.refund = money; |
| | | request.outRefundNo =outRefundNo; |