Commit 01c647f6 by zhengnw@sobot.com

common 1.5.7

parent b4372306
...@@ -11,7 +11,7 @@ android { ...@@ -11,7 +11,7 @@ android {
//这里就是打jar包 //这里就是打jar包
task makeJar(type: Copy) { task makeJar(type: Copy) {
//删除旧的jar包 //删除旧的jar包
delete 'build/libs/sobot_common_1.5.3.jar' delete 'build/libs/sobot_common_1.5.7.jar'
//原地址 //原地址
from('build/intermediates/packaged-classes/release/') from('build/intermediates/packaged-classes/release/')
//导出jar包的地址 //导出jar包的地址
...@@ -19,7 +19,7 @@ android { ...@@ -19,7 +19,7 @@ android {
//包含的jar包 //包含的jar包
include('classes.jar') include('classes.jar')
//重命名jar包为mysdk //重命名jar包为mysdk
rename ('classes.jar', 'sobot_common_1.5.3.jar') rename ('classes.jar', 'sobot_common_1.5.7.jar')
} }
makeJar.dependsOn(build) makeJar.dependsOn(build)
} }
......
...@@ -12,7 +12,7 @@ task androidSourcesJar(type: Jar) { ...@@ -12,7 +12,7 @@ task androidSourcesJar(type: Jar) {
ext { ext {
PUBLISH_GROUP_ID = "com.sobot.library" //项目包名 PUBLISH_GROUP_ID = "com.sobot.library" //项目包名
PUBLISH_ARTIFACT_ID = 'sobotcommon_x' //项目名 PUBLISH_ARTIFACT_ID = 'sobotcommon_x' //项目名
PUBLISH_VERSION = '1.5.3' //版本号 PUBLISH_VERSION = '1.5.7' //版本号
} }
......
...@@ -88,6 +88,8 @@ public class LoginUserManager extends SobotCommonDao<LoginUserEntity> { ...@@ -88,6 +88,8 @@ public class LoginUserManager extends SobotCommonDao<LoginUserEntity> {
model.setLanguage(cursor.getString(cursor.getColumnIndex("local_language"))); model.setLanguage(cursor.getString(cursor.getColumnIndex("local_language")));
model.setAccess_token(cursor.getString(cursor.getColumnIndex(LoginUserEntity.ACCESS_TOKEN))); model.setAccess_token(cursor.getString(cursor.getColumnIndex(LoginUserEntity.ACCESS_TOKEN)));
model.setLogin_time(cursor.getLong(cursor.getColumnIndex(LoginUserEntity.LOGIN_TIME))); model.setLogin_time(cursor.getLong(cursor.getColumnIndex(LoginUserEntity.LOGIN_TIME)));
model.setLoginAccount(cursor.getString(cursor.getColumnIndex("login_account")));
model.setLoginPwd(cursor.getString(cursor.getColumnIndex("login_pwd")));
return model; return model;
} }
...@@ -133,6 +135,8 @@ public class LoginUserManager extends SobotCommonDao<LoginUserEntity> { ...@@ -133,6 +135,8 @@ public class LoginUserManager extends SobotCommonDao<LoginUserEntity> {
contentValues.put("local_language", userAccount.getLanguage()); contentValues.put("local_language", userAccount.getLanguage());
contentValues.put(LoginUserEntity.ACCESS_TOKEN, userAccount.getAccess_token()); contentValues.put(LoginUserEntity.ACCESS_TOKEN, userAccount.getAccess_token());
contentValues.put(LoginUserEntity.LOGIN_TIME, userAccount.getLogin_time()); contentValues.put(LoginUserEntity.LOGIN_TIME, userAccount.getLogin_time());
contentValues.put("login_account",userAccount.getLoginAccount());
contentValues.put("login_pwd",userAccount.getLoginPwd());
return contentValues; return contentValues;
} }
......
...@@ -17,7 +17,7 @@ class SobotCommonDBHelper extends SQLiteOpenHelper { ...@@ -17,7 +17,7 @@ class SobotCommonDBHelper extends SQLiteOpenHelper {
private static final String DB_CACHE_NAME = "sobot_common.db"; 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 = 1;
private static final int DB_CACHE_VERSION = 3; private static final int DB_CACHE_VERSION = 4;
static final String TABLE_LOGIN_USER = "login_user"; static final String TABLE_LOGIN_USER = "login_user";
static final String TABLE_SOBOT_HOST = "sobot_host"; static final String TABLE_SOBOT_HOST = "sobot_host";
static final String TABLE_SERVICE_INFO = "sobot_service"; static final String TABLE_SERVICE_INFO = "sobot_service";
...@@ -131,10 +131,10 @@ class SobotCommonDBHelper extends SQLiteOpenHelper { ...@@ -131,10 +131,10 @@ class SobotCommonDBHelper extends SQLiteOpenHelper {
case 1: case 1:
String sql = "ALTER TABLE " + TABLE_LOGIN_USER String sql = "ALTER TABLE " + TABLE_LOGIN_USER
+ " ADD COLUMN " + LoginUserEntity.ACCESS_TOKEN + " VARCHAR(700)"; + " ADD COLUMN " + LoginUserEntity.ACCESS_TOKEN + " VARCHAR(700)";
db.execSQL(sql); // 执行修改表,添加字段的逻辑。 db.execSQL(sql); // 登录表添加ACCESS_TOKEN
String sql1 = "ALTER TABLE " + TABLE_LOGIN_USER String sql1 = "ALTER TABLE " + TABLE_LOGIN_USER
+ " ADD COLUMN " + LoginUserEntity.LOGIN_TIME + " INTEGER"; + " ADD COLUMN " + LoginUserEntity.LOGIN_TIME + " INTEGER";
db.execSQL(sql1); // 执行修改表,添加字段的逻辑。 db.execSQL(sql1); // 登录表添加登录时间
break; break;
case 2: case 2:
String sql2 = "ALTER TABLE " + TABLE_SERVICE_INFO String sql2 = "ALTER TABLE " + TABLE_SERVICE_INFO
...@@ -144,6 +144,14 @@ class SobotCommonDBHelper extends SQLiteOpenHelper { ...@@ -144,6 +144,14 @@ class SobotCommonDBHelper extends SQLiteOpenHelper {
+ " ADD COLUMN " + SobotServiceInfoModel.TIMEZONEID + " VARCHAR(30)"; + " ADD COLUMN " + SobotServiceInfoModel.TIMEZONEID + " VARCHAR(30)";
db.execSQL(sql3); // 执行修改表,添加字段的逻辑。 db.execSQL(sql3); // 执行修改表,添加字段的逻辑。
break; break;
case 3:
String sql4 = "ALTER TABLE " + TABLE_LOGIN_USER
+ " ADD COLUMN login_account VARCHAR(40)";
db.execSQL(sql4); // 登录表添加登录账号
String sql5 = "ALTER TABLE " + TABLE_LOGIN_USER
+ " ADD COLUMN login_pwd VARCHAR(40)";
db.execSQL(sql5); // 登录表添加登录密码
break;
default: default:
break; break;
} }
......
...@@ -10,7 +10,8 @@ import java.util.Map; ...@@ -10,7 +10,8 @@ import java.util.Map;
public class LoginUserEntity implements Serializable { public class LoginUserEntity implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
private String loginAccount; //登录账号
private String loginPwd; //登录密码
private String tempId; //客服temp-id private String tempId; //客服temp-id
private String nickName; //客服昵称 private String nickName; //客服昵称
private String staffName; //客服名称 private String staffName; //客服名称
...@@ -335,4 +336,20 @@ public class LoginUserEntity implements Serializable { ...@@ -335,4 +336,20 @@ public class LoginUserEntity implements Serializable {
public void setLogin_time(long login_time) { public void setLogin_time(long login_time) {
this.login_time = login_time; this.login_time = login_time;
} }
public String getLoginAccount() {
return loginAccount;
}
public void setLoginAccount(String loginAccount) {
this.loginAccount = loginAccount;
}
public String getLoginPwd() {
return loginPwd;
}
public void setLoginPwd(String loginPwd) {
this.loginPwd = loginPwd;
}
} }
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