Administrator
2025-02-13 d248fcaf389ae5c763926955d7ba0cfa80fc002f
src/main/java/com/taoke/autopay/controller/WebApiController.java
@@ -49,7 +49,7 @@
    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));
@@ -65,7 +65,7 @@
        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));
@@ -140,6 +140,7 @@
                throw new RuntimeException(e);
            }
        }
        keyInfo.setIpInfo(ipInfoMap.get(ip));
        String citys =  systemConfigService.getValueCache(SystemConfigKeyEnum.FORBIDDEN_SUBMIT_CITYS);
        if(citys!=null&&ipInfoMap.get(ip)!=null){
@@ -185,7 +186,7 @@
        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();
@@ -253,7 +254,7 @@
                            throw new RuntimeException(e);
                        }
                    }
                    addKey(alipayKeyInfo, user.getId(),alipayKeyInfo.getIp(),ipInfoMap.get(alipayKeyInfo.getIp()));
                    addKey(alipayKeyInfo, user.getId());
                }
                response.sendRedirect(successLink);
                return;