| | |
| | | Logger verifyLogger = LoggerFactory.getLogger("keyVerifyLogger"); |
| | | |
| | | |
| | | |
| | | |
| | | @Resource |
| | | private KeyOrderService keyOrderService; |
| | | |
| | |
| | | }catch(Exception e){ |
| | | } |
| | | throw ee; |
| | | } |
| | | catch(Exception e){ |
| | | } catch (Exception e) { |
| | | throw new KeyVerifyException(KeyVerifyException.CODE_COMMON, e.getMessage()); |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | /** |
| | | * @return java.lang.String |
| | | * @author hxh |
| | | * @description 带口令与金额的口令提交接口 |
| | | * @date 0:12 2024/7/9 |
| | | * @param: keyInfo |
| | | * @param: session |
| | | * @return java.lang.String |
| | | **/ |
| | | @ResponseBody |
| | | @RequestMapping(value = "submitKeyV3") |
| | |
| | | if (StringUtil.isNullOrEmpty(keyInfo.getKey())) { |
| | | return JsonUtil.loadFalseResult( "请上传key"); |
| | | } |
| | | if(1<0) { |
| | | |
| | | try { |
| | | verifySubmitKey(keyInfo.getKey()); |
| | | } catch (Exception e) { |
| | |
| | | if (Integer.parseInt(now) < Integer.parseInt(startTime) || Integer.parseInt(now) > Integer.parseInt(endTime)) { |
| | | return JsonUtil.loadFalseResult(String.format("口令提交时间段为:%s-%s", timeStr.split(",")[0], timeStr.split(",")[1])); |
| | | } |
| | | } |
| | | |
| | | if (user == null) { |
| | | // 先保存KEY |
| | | // SESSION_KEY_TEMP_ALIPAY_KEY |
| | | session.setAttribute(Constant.SESSION_KEY_TEMP_ALIPAY_KEY, keyInfo); |
| | | wxLogger.info("微信没有授权:" + session.getId()); |
| | | String redictLink = systemConfigService.getValueCache(SystemConfigKeyEnum.WX_REDIRECT_LINK); |
| | |
| | | } catch (WxOrderCountException e) { |
| | | return JsonUtil.loadFalseResult(e.getMessage()); |
| | | } catch (KeyVerifyException e) { |
| | | logger.debug("口令校验失败:{}-{}-{}", keyInfo.getKey(), e.getCode(), e.getMessage()); |
| | | LogUtil.loggerDebug.debug("口令校验失败:{}-{}-{}", keyInfo.getKey(), e.getCode(), e.getMessage()); |
| | | switch (e.getCode()){ |
| | | case KeyVerifyException.CODE_KEY_MONEY_NOT_MATCH: |
| | | return JsonUtil.loadFalseResult("该笔订单有误,不予提交"); |