package com.zbkj.service.huifu.v2;

import java.util.*;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.huifu.bspay.sdk.opps.core.request.V2TradeTransSplitQueryRequest;
import com.zbkj.service.huifu.core.Identify;

/**
 * 交易分账明细查询接口 - 示例
 *
 * @author sdk-generator
 * @Description
 */
@Identify(requestClass = V2TradeTransSplitQueryRequest.class)
public class V2TradeTransSplitQuery {

    public static V2TradeTransSplitQueryRequest method(Map<String, Object> map) {

        // 2.组装请求参数
        V2TradeTransSplitQueryRequest request = JSONObject.parseObject(JSON.toJSONString(map), V2TradeTransSplitQueryRequest.class);
        // 分账交易汇付全局流水号
//        request.setHfSeqId("202109237745559");
        // 商户号
//        request.setHuifuId("6666000109812123");
        // 交易类型 consume：正向交易，refund：反向交易
//        request.setOrdType("consume");

        // 设置非必填字段
        Map<String, Object> extendInfoMap = getExtendInfos();
        request.setExtendInfo(extendInfoMap);
        return request;
    }

    /**
     * 非必填字段
     * @return
     */
    private static Map<String, Object> getExtendInfos() {
        // 设置非必填字段
        Map<String, Object> extendInfoMap = new HashMap<>();
        return extendInfoMap;
    }

}
