| | |
| | | private SystemConfigService systemConfigService; |
| | | |
| | | |
| | | private void addKey(SubmitKeyInfo keyInfo, Long wxUid, String ip, IPUtil.IPInfo ipInfo) throws KeyVerifyException, KeyOrderException, WxOrderCountException { |
| | | private void addKey(SubmitKeyInfo keyInfo, Long wxUid) throws KeyVerifyException, KeyOrderException, WxOrderCountException { |
| | | |
| | | // 查询没有处理的数量 |
| | | long notProcessCount = keyOrderService.countUserNotDoOrder(wxUid, new Date(System.currentTimeMillis() - 1000*60*30)); |
| | |
| | | if (verifyAlipayKey != null && verifyAlipayKey.trim().equalsIgnoreCase("1")) { |
| | | try { |
| | | // 需要验证支付宝口令 |
| | | if (urllist.size() < 1) { |
| | | if (urllist.isEmpty()) { |
| | | throw new Exception("口令中不包含链接"); |
| | | } |
| | | AlipayOrderUtil.AlipayOrderTradeInfo tradeInfo = AlipayOrderUtil.getTradeInfo(urllist.get(0)); |
| | |
| | | throw new RuntimeException(e); |
| | | } |
| | | } |
| | | keyInfo.setIpInfo(ipInfoMap.get(ip)); |
| | | |
| | | String citys = systemConfigService.getValueCache(SystemConfigKeyEnum.FORBIDDEN_SUBMIT_CITYS); |
| | | if(citys!=null&&ipInfoMap.get(ip)!=null){ |
| | |
| | | wxLogger.info("微信有授权:" + session.getId()); |
| | | LogUtil.loggerDebug.warn("GEO信息:{}-{}-{}", user.getId(),ip, new Gson().toJson(ipInfoMap.get(ip))); |
| | | try { |
| | | addKey(keyInfo, user.getId(),ip, ipInfoMap.get(ip)); |
| | | addKey(keyInfo, user.getId()); |
| | | return JsonUtil.loadTrueResult(""); |
| | | } catch (KeyOrderException e) { |
| | | e.printStackTrace(); |
| | |
| | | throw new RuntimeException(e); |
| | | } |
| | | } |
| | | addKey(alipayKeyInfo, user.getId(),alipayKeyInfo.getIp(),ipInfoMap.get(alipayKeyInfo.getIp())); |
| | | addKey(alipayKeyInfo, user.getId()); |
| | | } |
| | | response.sendRedirect(successLink); |
| | | return; |