package com.tenlionsoft.baselib.utils;

public class UserLgUtils {
    //
//    private String id;
//    private String name;
//    private String avatar;
//    private String username;
//    private String phone;
//    private String email;
    public static String SP_USER_INFO = "UserLogin";

    //==============用户ID==============
    public static void setId(String id) {
        SPUtils.getInstance(SP_USER_INFO).put("userId", id);
    }

    public static String getUserId() {
        return SPUtils.getInstance(SP_USER_INFO).getString("userId");
    }

    //===============用户名==============
    public static void setUserName(String name) {
        SPUtils.getInstance(SP_USER_INFO).put("userName", name);
    }

    public static String getUserName() {
        return SPUtils.getInstance(SP_USER_INFO).getString("userName");
    }

    //===============名称================
    public static void setName(String name) {
        SPUtils.getInstance(SP_USER_INFO).put("name", name);
    }

    public static String getName() {
        return SPUtils.getInstance(SP_USER_INFO).getString("name");
    }

    //=================头像==================
    public static void setAvatar(String name) {
        SPUtils.getInstance(SP_USER_INFO).put("avatar", name);
    }

    public static String getAvatar() {
        return SPUtils.getInstance(SP_USER_INFO).getString("avatar");
    }

    //===============电话===============
    public static void setPhone(String phone) {
        SPUtils.getInstance(SP_USER_INFO).put("phone", phone);
    }

    public static String getPhone() {
        return SPUtils.getInstance(SP_USER_INFO).getString("phone");
    }

    //===============邮箱===========
    public static void setEmail(String phone) {
        SPUtils.getInstance(SP_USER_INFO).put("email", phone);
    }

    public static String getEmail() {
        return SPUtils.getInstance(SP_USER_INFO).getString("email");
    }

    //==============================
    public static void setLoginInfo(String userInfo) {
        SPUtils.getInstance(SP_USER_INFO).put("userInfos", userInfo);
    }

    public static String getLoginInfo() {
        return SPUtils.getInstance(SP_USER_INFO).getString("userInfos");
    }

    public static void setToken(String token) {
        SPUtils.getInstance(SP_USER_INFO).put("token", token, true);
    }

    public static String getToken() {
        return SPUtils.getInstance(SP_USER_INFO).getString("token");
    }

    public static void setPassword(String pwd) {
        SPUtils.getInstance(SP_USER_INFO).put("pwd", pwd);
    }

    public static String getPassword() {
        return SPUtils.getInstance(SP_USER_INFO).getString("pwd");
    }

    public static String getNumber() {
        return SPUtils.getInstance(SP_USER_INFO).getString("number");
    }

    public static void setNumber(String number) {
        SPUtils.getInstance(SP_USER_INFO).put("number", number);
    }

    public static void setUploadLocation(boolean b) {
        SPUtils.getInstance(SP_USER_INFO).put("isUpload", b);
    }

    public static boolean getUploadLocation() {
        return SPUtils.getInstance(SP_USER_INFO).getBoolean("isUpload");
    }

    public static boolean getIsSetting() {
        return SPUtils.getInstance(SP_USER_INFO).getBoolean("isSetting");
    }

    public static void setIsSeting(boolean setting) {
        SPUtils.getInstance(SP_USER_INFO).put("isSetting", setting);
    }


    public static void setAlias(boolean alias) {
        SPUtils.getInstance(SP_USER_INFO).put("alias", alias);
    }

    public static boolean getAliasIsSeting() {
        return SPUtils.getInstance(SP_USER_INFO).getBoolean("alias");
    }

    public static void setLocationLat(String lat) {
        SPUtils.getInstance(SP_USER_INFO).put("lat", lat);
    }

    public static void setLocationLng(String lng) {
        SPUtils.getInstance(SP_USER_INFO).put("lng", lng);
    }

    public static String getLocationLat() {
        return SPUtils.getInstance(SP_USER_INFO).getString("lat");
    }

    public static String getLocationLng() {
        return SPUtils.getInstance(SP_USER_INFO).getString("lng");
    }

    public static void setLocationCity(String city) {
        SPUtils.getInstance(SP_USER_INFO).put("city", city);
    }

    public static String getLocationCity() {
        return SPUtils.getInstance(SP_USER_INFO).getString("city");
    }

    public static void setCurrentCity(String city) {
        SPUtils.getInstance(SP_USER_INFO).put("currentCity", city);
    }

    public static String getCurrentCity() {
        return SPUtils.getInstance(SP_USER_INFO).getString("currentCity");
    }

    public static String getCurrentCityCode() {
        return SPUtils.getInstance(SP_USER_INFO).getString("currentCityCode");
    }

    public static void setCurrentCityCode(String code) {
        SPUtils.getInstance(SP_USER_INFO).put("currentCityCode", code);
    }

    public static void setLocationAddress(String address) {
        SPUtils.getInstance(SP_USER_INFO).put("address", address);
    }

    public static String getLocationAddress() {
        return SPUtils.getInstance(SP_USER_INFO).getString("address");
    }

    public static String getLocationDistrict() {
        return SPUtils.getInstance(SP_USER_INFO).getString("district");
    }

    public static void setLocationDistrict(String dis) {
        SPUtils.getInstance(SP_USER_INFO).put("district", dis);
    }

    public static String getLocationCityCode() {
        return SPUtils.getInstance(SP_USER_INFO).getString("cityCode");
    }

    public static void setLocationCityCode(String code) {
        SPUtils.getInstance(SP_USER_INFO).put("cityCode", code);
    }

    public static int getCityLevel() {
        return SPUtils.getInstance(SP_USER_INFO).getInt("cityLevel");
    }

    public static void setCityLevel(int level) {
        SPUtils.getInstance(SP_USER_INFO).put("cityLevel", level);
    }

    public static boolean getCheckRemember() {
        return SPUtils.getInstance(SP_USER_INFO).getBoolean("remember", false);
    }

    public static void setCheckRemember(boolean remember) {
        SPUtils.getInstance(SP_USER_INFO).put("remember", remember);
    }

    public static String getIndustryId() {
        return SPUtils.getInstance(SP_USER_INFO).getString("nId");
    }

    public static void setIndustryId(String id) {
        SPUtils.getInstance(SP_USER_INFO).put("nId", id);
    }

    public static boolean getIsSync() {
        return SPUtils.getInstance(SP_USER_INFO).getBoolean("isSync", false);
    }

    public static void setIsSync(boolean is) {
        SPUtils.getInstance(SP_USER_INFO).put("isSync", is);
    }

    public static void setUserAreaCode(String areaCode) {
        SPUtils.getInstance(SP_USER_INFO).put("userAreaCode", areaCode);
    }

    public static String getUserAreaCode() {
        return SPUtils.getInstance(SP_USER_INFO).getString("userAreaCode");
    }

    public static String getUserDeptId() {
        return SPUtils.getInstance(SP_USER_INFO).getString("deptId");
    }

    public static void setUserDeptId(String id) {
        SPUtils.getInstance(SP_USER_INFO).put("deptId", id);
    }

    /*======融合通信账号密码=====*/

    public static String getHwAccount() {
        return SPUtils.getInstance(SP_USER_INFO).getString("hwAccount");
    }

    public static void setHwAccount(String id) {
        SPUtils.getInstance(SP_USER_INFO).put("hwAccount", id);
    }

    public static String getHwPwd() {
        return SPUtils.getInstance(SP_USER_INFO).getString("hwPassword");
    }

    public static void setHwPwd(String id) {
        SPUtils.getInstance(SP_USER_INFO).put("hwPassword", id);
    }

    public static int getRhPort() {
        return SPUtils.getInstance(SP_USER_INFO).getInt("rhPort");
    }

    public static void setRhPort(int port) {
        SPUtils.getInstance(SP_USER_INFO).put("rhPort", port);
    }

    public static String getRhUrl() {
        return SPUtils.getInstance(SP_USER_INFO).getString("rhUrl");
    }

    public static void setRhUrl(String url) {
        SPUtils.getInstance(SP_USER_INFO).put("rhUrl", url);
    }

}
