package com.shunwang.api.request.recharge;

import com.shunwang.api.mapping.SWApiDocs;
import com.shunwang.api.mapping.SWApiField;
import com.shunwang.api.response.recharge.SWRechargeRecordQueryResponse;

import java.util.LinkedHashMap;
import java.util.Map;

/**
 * @author min.da
 * @since 2015-12-09
 */
@SWApiDocs(code = "16", name = "顺圆充值订单备份库查询接口", service = "/interface/rechargeRecordQuery.htm", methods = 3, desc = "调用此接口完成顺圆充值查询操作。")
public class SWRechargeRecordQueryRequest extends AbstractSWRequest<SWRechargeRecordQueryResponse> {

    private static final long serialVersionUID = -642784296792887926L;

    @SWApiField(max = 32, desc = "通行证账号", orderby = 99)
    private String memberName;
    @SWApiField(max = 14, desc = "最近多少天", orderby = 97)
    private String days;

    public SWRechargeRecordQueryRequest(String secretKey) {
        super(secretKey);
    }

    @Override
    public Map<String, String> buildRequestParams() {
        Map<String, String> params = super.buildRequestParams();
        params.put("memberName", memberName);
        params.put("days", days);
        return params;
    }

    @Override
    public Map<String, String> buildSignatureParams() {
        Map<String, String> signParams = new LinkedHashMap<String, String>();
        signParams.put("memberName", memberName);
        signParams.put("days", days);
        signParams.put("companyMemberName", getCompanyMemberName());
        signParams.put("time", getTime());
        return signParams;
    }

    @Override
    public Class<SWRechargeRecordQueryResponse> getResponseClass() {
        return SWRechargeRecordQueryResponse.class;
    }

    public String getMemberName() {
        return memberName;
    }

    public void setMemberName(String memberName) {
        this.memberName = memberName;
    }

    public String getDays() {
        return days;
    }

    public void setDays(String days) {
        this.days = days;
    }
}
