| | |
| | | String transaction_id = map.get("transaction_id"); |
| | | String result = map.get("result"); |
| | | |
| | | PaymentCompetition paymentCompetition = paymentCompetitionService.getOne(new QueryWrapper<PaymentCompetition>().eq("code", code).eq("payType", 1)); |
| | | PaymentCompetition paymentCompetition = paymentCompetitionService.getOne(new QueryWrapper<PaymentCompetition>().eq("code", code) |
| | | .eq("payType", 1)); |
| | | if (paymentCompetition.getPayStatus() == 1) { |
| | | paymentCompetition.setAppUserId(null); |
| | | paymentCompetition.setPayStatus(2); |
| | | paymentCompetition.setPayTime(new Date()); |
| | | paymentCompetition.setPayOrderNo(transaction_id); |
| | | paymentCompetitionService.updateById(paymentCompetition); |
| | | |
| | | Competition competition = cttService.getById(paymentCompetition.getCompetitionId()); |
| | | competition.setApplicantsNumber(competition.getApplicantsNumber() + 1); |
| | | cttService.updateById(competition); |
| | | } |
| | | |
| | | PrintWriter out = response.getWriter(); |
| | | out.write(result); |
| | | out.flush(); |
| | |
| | | JSONArray jsonArray = JSON.parseArray(paymentCompetitionVo.getIds()); |
| | | Competition competition = this.getById(paymentCompetitionVo.getId()); |
| | | |
| | | List<PaymentCompetition> list = paymentCompetitionService.list(new QueryWrapper<PaymentCompetition>().eq("competitionId", paymentCompetitionVo.getId()).ne("payStatus", 3)); |
| | | List<PaymentCompetition> list = paymentCompetitionService.list(new QueryWrapper<PaymentCompetition>() |
| | | .eq("competitionId", paymentCompetitionVo.getId()).ne("payStatus", 3)); |
| | | List<Long> pays = new ArrayList<>(); |
| | | for (PaymentCompetition paymentCompetition : list) { |
| | | pays.add(paymentCompetition.getId()); |
| | |
| | | int min = 5000; |
| | | wait += (min * num); |
| | | Thread.sleep(wait); |
| | | PaymentCompetition paymentCompetition = paymentCompetitionService.getOne(new QueryWrapper<PaymentCompetition>().eq("code", code).eq("payType", 1)); |
| | | PaymentCompetition paymentCompetition = paymentCompetitionService.getOne(new QueryWrapper<PaymentCompetition>() |
| | | .eq("code", code).eq("payType", 1)); |
| | | if (paymentCompetition.getPayStatus() == 2) { |
| | | break; |
| | | } |
| | |
| | | TStore st = storeService.getById(store); |
| | | map3.put("sign", "0DB011836143EEE2C2E072967C9F4E4B"); |
| | | map4.put("sign", "0DB011836143EEE2C2E072967C9F4E4B"); |
| | | map3.put("space_id", st.getId() + ""); |
| | | map4.put("space_id", st.getId() + ""); |
| | | map3.put("space_id", si.getId() + ""); |
| | | map4.put("space_id", si.getId() + ""); |
| | | map3.put("name", blue); |
| | | map4.put("name", red); |
| | | map3.put("city_code", city); |
| | |
| | | HashMap<String, String> blueCode = new HashMap<>(); |
| | | blueCode.put("scan_type", "1000"); |
| | | blueCode.put("sutu_id", ""+sutuId); |
| | | blueCode.put("space_id", st.getId() + ""); |
| | | blueCode.put("space_id", si.getId() + ""); |
| | | HashMap<String, String> redCode = new HashMap<>(); |
| | | redCode.put("scan_type", "1000"); |
| | | redCode.put("sutu_id", sutuId1+""); |
| | | redCode.put("space_id", st.getId() + ""); |
| | | String blueS= "{\"scan_type\": 1000, \"space_id\": "+st.getId()+", \"sutu_id\": "+sutuId+"}"; |
| | | String redS= "{\"scan_type\": 1000, \"space_id\": "+st.getId()+", \"sutu_id\": "+sutuId1+"}"; |
| | | redCode.put("space_id", si.getId() + ""); |
| | | String blueS= "{\"scan_type\": 1000, \"space_id\": "+si.getId()+", \"sutu_id\": "+sutuId+"}"; |
| | | String redS= "{\"scan_type\": 1000, \"space_id\": "+si.getId()+", \"sutu_id\": "+sutuId1+"}"; |
| | | MyQrCodeUtil.createCodeToFile(blueS); |
| | | MyQrCodeUtil.createCodeToFile(redS); |
| | | BufferedImage blueImage = QRCodeUtil.createImage(blueS); |
| | |
| | | try { |
| | | int num = 1; |
| | | int wait = 0; |
| | | while (num <= 10) { |
| | | while (num <= 15) { |
| | | int min = 5000; |
| | | wait += (min * num); |
| | | Thread.sleep(wait); |
| | | List<TGameRecord> list = gameRecordService.list(new QueryWrapper<TGameRecord>().eq("code", code).eq("payType", 2)); |
| | | List<TGameRecord> list = gameRecordService |
| | | .list(new QueryWrapper<TGameRecord>().eq("number", code).eq("payType", 1)); |
| | | TGameRecord one = list.get(0); |
| | | |
| | | if (one.getStatus() == 1) { |
| | |
| | | coursePackagePayment.setStatus(1); |
| | | coursePackagePayment.setMoney(config.getCash()); |
| | | coursePackagePayment.setOrderNo(transaction_id); |
| | | |
| | | } |
| | | gameRecordService.updateBatchById(list); |
| | | Integer integer = startGame(uid, gameId, spaceId, sutuId); |
| | |
| | | String s1 = this.weixinSignature(map3); |
| | | map3.put("sign", s1); |
| | | System.err.println(map3); |
| | | map3.put("siteBookingId", attach); |
| | | map3.put("siteBooking", attach); |
| | | return ResultUtil.success(map3); |
| | | } |
| | | return null; |