// 初始化用户信息. private void initUserInfo() { UserInfoVo userInfoVo = new UserInfoCache(this).getCacheUserInfo(); if (userInfoVo == null) { trancLoginActivity(); return; } CustomerVo customerVo = FinalFactory.createFinalDb(getBaseContext(), userInfoVo) .findById(userInfoVo.getUid(), CustomerVo.class); if (customerVo == null) { trancLoginActivity(); return; } shangwupanlvApplication.setUserInfoVo(userInfoVo); shangwupanlvApplication.setCustomerVo(customerVo); trancIndexActivity(); }
/** * 检查是否更新版本 */ public void checkVersion() { int ver = shangwupanlvApplication.getLocalVersion(); if (ver != -1) { if (!checkNetWorkOrSdcard()) { init(); return; } checkUpdate(ver); } else { init(); } }