| | |
| | | import com.dsh.account.entity.TAppUser; |
| | | import com.dsh.account.entity.VipPayment; |
| | | import com.dsh.account.enums.RechargeRecordEnum; |
| | | import com.dsh.account.feignclient.communityWorldCup.WorldCupPaymentClinet; |
| | | import com.dsh.account.feignclient.communityWorldCup.model.GetWorldCupPayment; |
| | | import com.dsh.account.feignclient.competition.DeductionCompetitionsClient; |
| | | import com.dsh.account.feignclient.competition.model.PaymentCompetition; |
| | | import com.dsh.account.feignclient.course.CoursePaymentClient; |
| | |
| | | import com.dsh.account.mapper.RechargeRecordsMapper; |
| | | import com.dsh.account.mapper.TAppUserMapper; |
| | | import com.dsh.account.model.IncomeQuery; |
| | | import com.dsh.account.model.WorldCupPayment; |
| | | import com.dsh.account.model.query.RechargeRecordsQuery; |
| | | import com.dsh.account.model.vo.RechargeRecordsVO; |
| | | import com.dsh.account.model.vo.userBenefitDetail.RechargeDetailsVo; |
| | |
| | | |
| | | @Resource |
| | | private RechargeConfigClient reconMapper; |
| | | @Autowired |
| | | @Resource |
| | | private RechargeRecordsMapper rechargeRecordsMapper; |
| | | |
| | | @Resource |
| | | private WorldCupPaymentClinet worldCupPaymentClinet; |
| | | |
| | | |
| | | @Override |
| | |
| | | details.add(consumeDetail); |
| | | } |
| | | } |
| | | |
| | | //世界杯 |
| | | GetWorldCupPayment getWorldCupPayment = new GetWorldCupPayment(); |
| | | getWorldCupPayment.setAppUserId(appUserId); |
| | | getWorldCupPayment.setPayType(3); |
| | | getWorldCupPayment.setStartTime(monthStart); |
| | | getWorldCupPayment.setEndTime(monthEnd); |
| | | List<WorldCupPayment> worldCupPayment = worldCupPaymentClinet.getWorldCupPayment(getWorldCupPayment); |
| | | for (WorldCupPayment cupPayment : worldCupPayment) { |
| | | RechargesDetail consumeDetail = new RechargesDetail(); |
| | | if(cupPayment.getPayStatus() != 3){ |
| | | consumeDetail.setConsumeName(RechargeRecordEnum.WORLD_CIP_PAYMENT.getMsg() + ":¥" + cupPayment.getAmount()); |
| | | consumeDetail.setConsumeTime(simpleDateFormat.format(cupPayment.getCreateTime())); |
| | | consumeDetail.setConsumeAmount("-" + cupPayment.getAmount()); |
| | | consumeDetail.setRecordId(2); |
| | | }else{ |
| | | consumeDetail.setConsumeName(RechargeRecordEnum.CANCEL_WORLD_CIP_PAYMENT.getMsg() + ":¥" + cupPayment.getAmount()); |
| | | consumeDetail.setConsumeTime(simpleDateFormat.format(cupPayment.getCreateTime())); |
| | | consumeDetail.setConsumeAmount("+" + cupPayment.getAmount()); |
| | | consumeDetail.setRecordId(1); |
| | | } |
| | | details.add(consumeDetail); |
| | | } |
| | | |
| | | |
| | | if (ToolUtil.isNotEmpty(recordId)) { |
| | | details = details.stream() |
| | | .filter(record -> record.getRecordId().equals(recordId)) |
| | |
| | | return ResultUtil.success(); |
| | | } |
| | | |
| | | |
| | | private String smid = "2088330203191220";//平台支付宝商户号 |
| | | private ResultUtil AlipayPayment(String code, BigDecimal amount) { |
| | | ResultUtil alipay = payMoneyUtil.alipay("玩湃币充值", "玩湃币充值", "", code, amount.toString(), |
| | | ResultUtil alipay = payMoneyUtil.alipay(smid,"玩湃币充值", "玩湃币充值", "", code, amount.toString(), |
| | | "/base/recharge/alipayRechargeCallback"); |
| | | if (alipay.getCode() == 200) { |
| | | new Thread(new Runnable() { |
| | |
| | | if ("TRADE_CLOSED".equals(tradeStatus) || "TRADE_FINISHED".equals(tradeStatus) || num == 10) { |
| | | records.setState(3); |
| | | rereMapper.deleteById(records.getId()); |
| | | if ("TRADE_FINISHED".equals(tradeStatus)) { |
| | | // todo 资金结算 |
| | | payMoneyUtil.confirm(smid,code,tradeNo,amount.toString()); |
| | | break; |
| | | } |
| | | break; |
| | | } |
| | | |
| | | if ("TRADE_SUCCESS".equals(tradeStatus)) { |
| | | records.setAppUserId(null); |
| | | records.setPayStatus(2); |