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.AcctserialQueryPageParams;

/**
 * 资金流水列表查询 Demo
 */
public class QueryAcctserialDemo {
    public static void main(String[] args) {
    	String timestamp = DateUtils.getTimestamp();
    	
        AcctserialQueryPageParams params = new AcctserialQueryPageParams();
        params.setTimestamp(timestamp);
        params.setOid_partner(Constant.OidPartner);
        params.setUser_id("LLianPayTest-En-User-123");
        params.setUser_type("INNERCOMPANY");//INNERMERCHANT:商户 INNERUSER：个人用户 INNERCOMPANY：企业用户
        params.setAcct_type("USEROWN_AVAILABLE");//USEROWN_PSETTLE:用户自有待结算账户;USEROWN_AVAILABLE用户自有可用账户
        params.setDate_start("20221020000000");
        params.setDate_end(timestamp);
        params.setPage_no("1");
        params.setPage_size("10");

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