Commit 9666a013 by zhengnw@sobot.com

common 1.4.1 登录添加时区timezone 和 timezoneId

parent d8c575b4
......@@ -231,6 +231,7 @@ public class MainActivity extends SobotBaseActivity {
// SobotLogUtils.i(SobotLoginTools.getInstance().getAccessToken()+"");
// SobotLogUtils.i(SobotLoginTools.getInstance().getTempId());
// SobotLogUtils.i(SobotLoginTools.getInstance().getToken()+"");
// SobotLogUtils.i(SobotLoginTools.getInstance().getServiceInfo().getTimezone()+"----------------------------------"+SobotLoginTools.getInstance().getServiceInfo().getTimezoneId());
// }
// });
}
......
......@@ -13,7 +13,7 @@ ext {
PUBLISH_GROUP_ID = "com.sobot.library" //项目包名
PUBLISH_ARTIFACT_ID = 'sobotcommon' //项目名
// PUBLISH_ARTIFACT_ID = 'sobotcommon_x' //项目名
PUBLISH_VERSION = '1.4.0' //版本号
PUBLISH_VERSION = '1.4.1' //版本号
}
......
......@@ -67,6 +67,8 @@ public class ServiceInfoManager extends SobotCommonDao<SobotServiceInfoModel> {
model.setCompanyId(cursor.getString(cursor.getColumnIndex("companyId")));
model.setCallV6Flag(cursor.getInt(cursor.getColumnIndex("callV6Flag")));
model.setLanguage(cursor.getString(cursor.getColumnIndex("language")));
model.setTimezone(cursor.getString(cursor.getColumnIndex("timezone")));
model.setTimezoneId(cursor.getString(cursor.getColumnIndex("timezoneId")));
model.setPhoneNo(cursor.getString(cursor.getColumnIndex("phoneNo")));
String globalPermissions = cursor.getString(cursor.getColumnIndex("globalPermissions"));
if (!SobotStringUtils.isEmpty(globalPermissions)) {
......@@ -93,6 +95,8 @@ public class ServiceInfoManager extends SobotCommonDao<SobotServiceInfoModel> {
contentValues.put("companyId", infoModel.getCompanyId());
contentValues.put("callV6Flag", infoModel.getCallV6Flag());
contentValues.put("language", infoModel.getLanguage());
contentValues.put("timezone", infoModel.getTimezone());
contentValues.put("timezoneId", infoModel.getTimezoneId());
contentValues.put("phoneNo", infoModel.getPhoneNo());
if (!SobotStringUtils.isEmpty(infoModel.getGlobalPermissions())) {
contentValues.put("globalPermissions", SobotGsonUtil.beanToJson(infoModel.getGlobalPermissions()));
......
......@@ -5,6 +5,7 @@ import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import com.sobot.common.login.model.LoginUserEntity;
import com.sobot.common.login.model.SobotServiceInfoModel;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;
......@@ -16,7 +17,7 @@ class SobotCommonDBHelper extends SQLiteOpenHelper {
private static final String DB_CACHE_NAME = "sobot_common.db";
// private static final int DB_CACHE_VERSION = 1;
private static final int DB_CACHE_VERSION = 2;
private static final int DB_CACHE_VERSION = 3;
static final String TABLE_LOGIN_USER = "login_user";
static final String TABLE_SOBOT_HOST = "sobot_host";
static final String TABLE_SERVICE_INFO = "sobot_service";
......@@ -135,6 +136,14 @@ class SobotCommonDBHelper extends SQLiteOpenHelper {
+ " ADD COLUMN " + LoginUserEntity.LOGIN_TIME + " INTEGER";
db.execSQL(sql1); // 执行修改表,添加字段的逻辑。
break;
case 2:
String sql2 = "ALTER TABLE " + TABLE_SERVICE_INFO
+ " ADD COLUMN " + SobotServiceInfoModel.TIMEZONE + " VARCHAR(15)";
db.execSQL(sql2); // 执行修改表,添加字段的逻辑。
String sql3 = "ALTER TABLE " + TABLE_SERVICE_INFO
+ " ADD COLUMN " + SobotServiceInfoModel.TIMEZONEID + " VARCHAR(30)";
db.execSQL(sql3); // 执行修改表,添加字段的逻辑。
break;
default:
break;
}
......
......@@ -48,9 +48,28 @@ public class SobotServiceInfoModel implements Serializable {
*/
private int callV6Flag;
/**
* 语言
*/
private String language;
/**
* 时区
*/
private String timezone;
public static final String TIMEZONE = "timezone";
/**
* 时区城市
*/
private String timezoneId;
public static final String TIMEZONEID = "timezoneId";
/**
* 手机号
*/
private String phoneNo;
......@@ -175,4 +194,20 @@ public class SobotServiceInfoModel implements Serializable {
public void setLanguage(String language) {
this.language = language;
}
public String getTimezone() {
return timezone;
}
public void setTimezone(String timezone) {
this.timezone = timezone;
}
public String getTimezoneId() {
return timezoneId;
}
public void setTimezoneId(String timezoneId) {
this.timezoneId = timezoneId;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment