xin
2025-09-25 47378fb7743a8e139d0ee2de8f35eb41ba7bda06
oying-system/src/main/java/com/oying/modules/hwc/service/impl/SwiftPassServiceImpl.java
@@ -1,7 +1,6 @@
package com.oying.modules.hwc.service.impl;
import com.alibaba.fastjson2.JSONObject;
import com.google.gson.Gson;
import com.oying.exception.BadRequestException;
import com.oying.modules.hwc.domain.HwcResponse;
import com.oying.modules.hwc.service.SwiftPassService;
@@ -73,6 +72,9 @@
            case HWC2:
                map.put("mch_id", properties.getMchId2());
                break;
            case HWC3:
                map.put("mch_id", properties.getMchId3());
                break;
            default:
                throw new BadRequestException("汇旺财类型错误");
        }
@@ -103,8 +105,7 @@
                    throw new BadRequestException("验证签名错误");
                } else {
                    if ("0".equals(resultMap.get("status")) && "0".equals(resultMap.get("result_code"))) {
                        Gson gson = new Gson();
                        return gson.fromJson(resultMap.get("pay_info"), HwcResponse.class);
                        return JSONObject.parseObject(resultMap.get("pay_info"), HwcResponse.class);
                    } else {
                        throw new BadRequestException(resultMap.get("err_code") + " : " + resultMap.get("err_msg") + "\n" +
                                resultMap.get("status") + " : " + resultMap.get("message"));
@@ -142,6 +143,9 @@
                break;
            case HWC2:
                map.put("mch_id", properties.getMchId2());
                break;
            case HWC3:
                map.put("mch_id", properties.getMchId3());
                break;
            default:
                throw new BadRequestException("汇旺财类型错误");
@@ -212,6 +216,9 @@
                break;
            case HWC2:
                map.put("mch_id", properties.getMchId2());
                break;
            case HWC3:
                map.put("mch_id", properties.getMchId3());
                break;
            default:
                throw new BadRequestException("汇旺财类型错误");
@@ -288,6 +295,10 @@
                map.put("mch_id", properties.getMchId2());
                map.put("op_user_id", properties.getMchId2());
                break;
            case HWC3:
                map.put("mch_id", properties.getMchId3());
                map.put("op_user_id", properties.getMchId3());
                break;
            default:
                throw new BadRequestException("汇旺财类型错误");
        }