package com.live.utils;

import com.live.enums.Terminal;

public class CommonRequestParameters {

    private String p ;
    private String xmversion;
    private String b;
    private String userType;
    private String saasV;
    private String vn;
    private String deviceVersion;
    private String v;
    private String uid;
    private String tid;
    private String aid;
    private  String token;
    private  String accountNo;


    private String instId;

    // M  端接口参数
    private String u;
    private String authCode;
    private  String deptpath;

    // C 端接口参数
    private String wechatAppId;
    private String openId;

    public String getAccountNo() {
        return accountNo;
    }

    public com.live.utils.CommonRequestParameters setAccountNo(String accountNo) {
        this.accountNo = accountNo;
        return  this;
    }

    public String getDeptpath() {
        return deptpath;
    }

    public com.live.utils.CommonRequestParameters setDeptpath(String deptpath) {
        this.deptpath = deptpath;
        return  this;
    }


    public String getInstId() {
        return instId;
    }

    public com.live.utils.CommonRequestParameters setInstId(String instId) {
        this.instId = instId;
        return this;
    }


    public String getCommonRequestString (){
        return  null;
    }


    public  String getCommonParam (String userType){
        if("B".equals(userType)){
            return  "?p=w&v=v5.4.8&userType=B&token="+token+"&uid="+uid+"&tid="+tid+"&aid="+aid;
        }else if("M".equals(userType)){
            // M 端公共请求参数
            return "?u="+u+"&token="+token+"&authCode="+authCode+"&uid="+uid;
        }else  if("C".equals(userType)){
            // C端接口公共请求参数
            return "?p=" + p +"&v="+v +"&uid="+uid+"&wechatAppId="+wechatAppId+"&token="+token+"&openId="+openId;
        } else if("APP-B".equals(userType)){
            // app-B 公共请求参数
            return "?p=" + p + "&xmversion=" + xmversion + "&=" + "&b=" +  b+ "&=userType" + userType
                    + "&saasV=" + saasV + "&vn"+vn+"&deviceVersion="+deviceVersion+"&v="+v
                    +"&uid="+uid+"&tid="+tid+"&aid="+aid+"&token="+token;
        } else  if(Terminal.minApp.equals(userType)){
            return "?p=" +p+"&uid="+uid+"&wechatAppId="+wechatAppId+"&token="+token+"&openId="+openId;
        }else{

            return  "?";
        }


    }


    public String getP() {
        return p;
    }

    public com.live.utils.CommonRequestParameters setP(String p) {
        this.p = p;
        return  this;
    }

    public String getXmversion() {
        return xmversion;
    }

    public com.live.utils.CommonRequestParameters setXmversion(String xmversion) {
        this.xmversion = xmversion;
        return this;
    }

    public String getB() {
        return b;
    }

    public com.live.utils.CommonRequestParameters setB(String b) {
        this.b = b;
        return this;
    }

    public String getUserType() {
        return userType;
    }

    public com.live.utils.CommonRequestParameters setUserType(String userType) {
        this.userType = userType;
        return this;
    }

    public String getSaasV() {
        return saasV;
    }

    public com.live.utils.CommonRequestParameters setSaasV(String saasV) {
        this.saasV = saasV;
        return this;
    }

    public String getVn() {
        return vn;
    }

    public com.live.utils.CommonRequestParameters setVn(String vn) {
        this.vn = vn;
        return  this;
    }

    public String getDeviceVersion() {
        return deviceVersion;
    }

    public com.live.utils.CommonRequestParameters setDeviceVersion(String deviceVersion) {
        this.deviceVersion = deviceVersion;
        return  this;
    }

    public String getV() {
        return v;
    }

    public com.live.utils.CommonRequestParameters setV(String v) {
        this.v = v;
        return this;
    }

    public String getUid() {
        return uid;
    }

    public com.live.utils.CommonRequestParameters setUid(String uid) {
        this.uid = uid;
        return this;
    }

    public String getTid() {
        return tid;
    }

    public com.live.utils.CommonRequestParameters setTid(String tid) {
        this.tid = tid;
        return this;
    }

    public String getAid() {
        return aid;
    }

    public com.live.utils.CommonRequestParameters setAid(String aid) {
        this.aid = aid;
        return this;
    }

    public String getToken() {
        return token;
    }

    public com.live.utils.CommonRequestParameters setToken(String token) {
        this.token = token;
        return this;
    }

    public String getU() {
        return u;
    }

    public com.live.utils.CommonRequestParameters setU(String u) {
        this.u = u;
        return this;
    }

    public String getAuthCode() {
        return authCode;
    }

    public com.live.utils.CommonRequestParameters setAuthCode(String authCode) {
        this.authCode = authCode;
        return this;
    }

    public String getWechatAppId() {
        return wechatAppId;
    }

    public com.live.utils.CommonRequestParameters setWechatAppId(String wechatAppId) {
        this.wechatAppId = wechatAppId;
        return this;
    }

    public String getOpenId() {
        return openId;
    }

    public com.live.utils.CommonRequestParameters setOpenId(String openId) {
        this.openId = openId;
        return this;
    }

}
