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

/**
 * 用户信息查询 Demo
 */
public class QueryUserInfoDemo {
    public static void main(String[] args) {
        UserInfoQueryParams params = new UserInfoQueryParams();
        params.setTimestamp(DateUtils.getTimestamp());
        params.setOid_partner(Constant.OidPartner);
        //params.setUser_id(Constant.OidPartner);
		params.setUser_id("LLianPayTest-In-User-001");
//		params.setUser_id("LLianPayTest-In-User-12345");
//		params.setUser_id("LLianPayTest-En-User-123");

        // 测试环境URL
        String url = "https://accpapi-ste.lianlianpay-inc.com/v1/acctmgr/query-userinfo";
        String resultJsonStr = HttpClientUtil.sendRequest(url, JSON.toJSONString(params),Constant.MerchantPrivateKey,Constant.LLianPayPublicKey);
        //String resultJsonStr = HttpClientUtil.sendRequest(url, JSON.toJSONString(params));
        System.out.println(resultJsonStr);
        //ret_code=0000, ret_msg=交易成功, oid_partner=2020042200284052, user_id=LLianPayTest-En-User-123, oid_userno=2022101504290123, user_status=NORMAL, bank_open_flag=1, remark=000000;请求处理成功, bank_account=2585850807406787)
    }
}
