Cui Zhi Feng
2024-10-10 afde819290d0bf18f205b62c3e59b584c6647d82
src/main/java/com/mzl/flower/service/payment/UserPaymentSybService.java
@@ -345,8 +345,10 @@
        Map<String,String> params = service.query(orderId, up.getTransactionId());
        String trxstatus = params.get("trxstatus");//支付状态
        if("1001".equals(trxstatus)){
            //空单 直接取消
        if("1001".equals(trxstatus) || "3088".equals(trxstatus)){
            //3088-交易未支付(在查询时间区间内未成功支付,如已影响资金24小时内会做差错退款处理)
            //1001:交易不存在
            //直接取消
        } else if (StringUtils.isEmpty(trxstatus)
                || "2008".equals(trxstatus)
                || "2000".equals(trxstatus)) {
@@ -440,7 +442,7 @@
            throw new ValidationException("订单不可退款");
        }
        long trxamt = up.getPaymentAmount().longValue();
        long trxamt = prepareAmount(up.getPaymentAmount());
        String reqsn = orderId;
        String oldtrxid = up.getTransactionId();
        String oldreqsn = orderId;
@@ -467,7 +469,7 @@
            throw new ValidationException("订单不可退款");
        }
        long trxamt = up.getPaymentAmount().longValue();
        long trxamt = prepareAmount(up.getPaymentAmount());
        String reqsn = orderId;
        String oldtrxid = up.getTransactionId();
        String oldreqsn = orderId;
@@ -558,6 +560,10 @@
        re.setRequest(toJSONString(map));
        re.create(SecurityUtils.getUserId());
        re.setStatus(retcode);
        re.setNotification(retcode);
        re.setNotifyTime(LocalDateTime.now());
        orderRefundMapper.insert(re);
        return re.getId();