无关风月
2024-11-14 3af9c82375df6bd77ae78a5d900c409a895ecd18
UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/api/OrderController.java
@@ -1045,6 +1045,13 @@
            if(null == uid){
                return ResultUtil.tokenErr();
            }
            String format = String.format("uid=%s&id=%s&orderType=%s&payType=%s&type=%s", uid, id, orderType, payType, type);
            String key = MD5Util.encrypt(format);
            String value = redisUtil.getValue(key);
            if(ToolUtil.isNotEmpty(value) && (System.currentTimeMillis() - Long.valueOf(value)) <= 1000){
                return ResultUtil.error(language == 1 ? "请勿重复操作" : language == 2 ? "Don't repeat the operation" : "Ne répétez pas l’opération");
            }
            redisUtil.setStrValue(key, System.currentTimeMillis() + "", 5);
            switch (orderType){
                case 1:
                    return orderPrivateCarService.cancleOrderPrivateCar(id, payType, bankCardId, cancleId, type, language);
@@ -1426,6 +1433,7 @@
    @ResponseBody
    @PostMapping("/base/wxCancelOrderTaxi")
    public CallbackResponse wxCancelOrderTaxi(@RequestBody CallbackRequest callbackRequest){
        log.info("取消订单支付回调结果:{}", JSON.toJSONString(callbackRequest));
        CallbackResponse callbackResponse = new CallbackResponse();
        try {
            /**
@@ -1477,6 +1485,7 @@
        }catch (Exception e){
            e.printStackTrace();
        }
        log.info("取消订单支付回调处理结束:{}", JSON.toJSONString(callbackResponse));
        return callbackResponse;
    }
@@ -1528,6 +1537,7 @@
    @ResponseBody
    @PostMapping("/base/wxPayOrderTaxi")
    public CallbackResponse wxPayOrderTaxi(@RequestBody CallbackRequest callbackRequest){
        log.info("订单完成支付回调结果:{}", JSON.toJSONString(callbackRequest));
        CallbackResponse callbackResponse = new CallbackResponse();
        try {
            /**
@@ -1582,6 +1592,7 @@
        }catch (Exception e){
            e.printStackTrace();
        }
        log.info("订单完成支付回调处理结束:{}", JSON.toJSONString(callbackResponse));
        return callbackResponse;
    }