mac
2023-10-25 28880ba7540c523d3e50d35416422396ef802c50
app/src/main/java/com/hdl/photovoltaic/config/UserConfigManage.java
@@ -50,7 +50,7 @@
    //本地通讯秘钥
    private String localSecret;
    //是否是B端账号登录
    //是否是B端账号登录(true=B端)
    private boolean isB_account;
@@ -62,7 +62,7 @@
    //判断当前时间点是否能够自动登录
    public boolean isAutoLogin() {
        //7天内自动登录
        return ((System.currentTimeMillis() - loginDateTime) < 7 * 24 * 60 * 60);
        return ((System.currentTimeMillis() - loginDateTime) < (7 * 24 * 60 * 60 * 1000));
    }
    //是否同意隐私政策
@@ -73,6 +73,22 @@
    public String connEmqClientId;
    //当前登录的账号是不是之前的账号
    public boolean theSameLoginAccount;
    /**
     * 用户名称
     *
     * @return -
     */
    public String getUserName() {
        return TextUtils.isEmpty(userName) ? account : userName;
    }
    public void setUserName(String userName) {
        this.userName = userName;
    }
    private String userName;//用户名称
    public String getRefreshToken() {
        return refreshToken == null ? "" : refreshToken;
@@ -154,6 +170,11 @@
        this.theSameLoginAccount = theSameLoginAccount;
    }
    /**
     * 是否是B端账号登录(true=B端)
     *
     * @return -
     */
    public boolean isBAccount() {
        return isB_account;
    }
@@ -207,6 +228,9 @@
            //读取保存的数据
            Gson gson = new Gson();
            sUserConfigManage = gson.fromJson(str, UserConfigManage.class);
            if (sUserConfigManage == null) {
                sUserConfigManage = new UserConfigManage();
            }
        }
    }
@@ -226,10 +250,7 @@
    /// <summary>
    /// Config文件名
    /// </summary>
    private static final String FILENAME = "UserConfigManage.json";
    private static final String FILENAME = HdlFileLogic.getInstance().getAPPInternalStoreFilesPath() + "/UserConfigManage.json";
}