package io.renren.demo;

import com.alibaba.fastjson.JSON;

import io.renren.common.utils.DateUtils;
import io.renren.common.utils.HttpClientUtil;
import io.renren.vo.AcctserialDetailParams;

/**
 * 资金流水详情查询 Demo
 * 需要和资金流水列表查询配合使用
 */
public class QueryAcctserialDetailDemo {
    public static void main(String[] args) {
        AcctserialDetailParams params = new AcctserialDetailParams();
        params.setTimestamp(DateUtils.getTimestamp());
        params.setOid_partner(Constant.OidPartner);
        params.setUser_id("LLianPayTest-En-User-123");
        params.setUser_type("INNERCOMPANY");
        // 资金流水列表查询返回的jno_acct
        params.setJno_acct("20221023000005390007");

        // 测试环境URL
        String url = "https://accpapi-ste.lianlianpay-inc.com/v1/acctmgr/query-acctserialdetail";
        String resultJsonStr = HttpClientUtil.sendRequest(url, JSON.toJSONString(params),Constant.MerchantPrivateKey,Constant.LLianPayPublicKey);
        System.out.println(resultJsonStr);
    }
}
