package com.qunzhixinxi.hnqz.common.ding.entity;


import com.qunzhixinxi.hnqz.common.ding.config.DingConfig;
import com.qunzhixinxi.hnqz.common.ding.sign.AccessSign;
import com.qunzhixinxi.hnqz.common.ding.utils.JsonUtils;
import com.qunzhixinxi.hnqz.common.ding.utils.SignUtils;
import lombok.Data;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Data
public class EmployAccountQueryRequest extends CommonRequest{

	private static final String PATH = "/oapi/v1/employ/account/query";

	public EmployAccountQueryRequest(
			DingConfig config) {

		String serviceSign = null;
		try {
			//签名
			serviceSign = SignUtils.serviceSign(PATH, config.getAppSecret(),
					"POST", new HashMap<>(), new byte[0]);
		} catch (Exception e) {
			e.printStackTrace();
		}

		this.body = "";
		this.sign = new AccessSign(config.getAppId(),serviceSign);
		this.queryUrl = String.format("%s%s", config.getQueryUrl(), PATH);
	}


}
