Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
Sobot_module_Dev
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sobot_android
Sobot_module_Dev
Commits
9666a013
Commit
9666a013
authored
Sep 22, 2023
by
zhengnw@sobot.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
common 1.4.1 登录添加时区timezone 和 timezoneId
parent
d8c575b4
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
51 additions
and
2 deletions
+51
-2
MainActivity.java
app/src/main/java/com/sobot/moduletest/MainActivity.java
+1
-0
sobot-common-publish-mavencentral.gradle
sobot_common/sobot-common-publish-mavencentral.gradle
+1
-1
ServiceInfoManager.java
...in/java/com/sobot/common/login/db/ServiceInfoManager.java
+4
-0
SobotCommonDBHelper.java
...n/java/com/sobot/common/login/db/SobotCommonDBHelper.java
+10
-1
SobotServiceInfoModel.java
...a/com/sobot/common/login/model/SobotServiceInfoModel.java
+35
-0
No files found.
app/src/main/java/com/sobot/moduletest/MainActivity.java
View file @
9666a013
...
@@ -231,6 +231,7 @@ public class MainActivity extends SobotBaseActivity {
...
@@ -231,6 +231,7 @@ public class MainActivity extends SobotBaseActivity {
// SobotLogUtils.i(SobotLoginTools.getInstance().getAccessToken()+"");
// SobotLogUtils.i(SobotLoginTools.getInstance().getAccessToken()+"");
// SobotLogUtils.i(SobotLoginTools.getInstance().getTempId());
// SobotLogUtils.i(SobotLoginTools.getInstance().getTempId());
// SobotLogUtils.i(SobotLoginTools.getInstance().getToken()+"");
// SobotLogUtils.i(SobotLoginTools.getInstance().getToken()+"");
// SobotLogUtils.i(SobotLoginTools.getInstance().getServiceInfo().getTimezone()+"----------------------------------"+SobotLoginTools.getInstance().getServiceInfo().getTimezoneId());
// }
// }
// });
// });
}
}
...
...
sobot_common/sobot-common-publish-mavencentral.gradle
View file @
9666a013
...
@@ -13,7 +13,7 @@ ext {
...
@@ -13,7 +13,7 @@ ext {
PUBLISH_GROUP_ID
=
"com.sobot.library"
//项目包名
PUBLISH_GROUP_ID
=
"com.sobot.library"
//项目包名
PUBLISH_ARTIFACT_ID
=
'sobotcommon'
//项目名
PUBLISH_ARTIFACT_ID
=
'sobotcommon'
//项目名
// PUBLISH_ARTIFACT_ID = 'sobotcommon_x' //项目名
// PUBLISH_ARTIFACT_ID = 'sobotcommon_x' //项目名
PUBLISH_VERSION
=
'1.4.
0
'
//版本号
PUBLISH_VERSION
=
'1.4.
1
'
//版本号
}
}
...
...
sobot_common/src/main/java/com/sobot/common/login/db/ServiceInfoManager.java
View file @
9666a013
...
@@ -67,6 +67,8 @@ public class ServiceInfoManager extends SobotCommonDao<SobotServiceInfoModel> {
...
@@ -67,6 +67,8 @@ public class ServiceInfoManager extends SobotCommonDao<SobotServiceInfoModel> {
model
.
setCompanyId
(
cursor
.
getString
(
cursor
.
getColumnIndex
(
"companyId"
)));
model
.
setCompanyId
(
cursor
.
getString
(
cursor
.
getColumnIndex
(
"companyId"
)));
model
.
setCallV6Flag
(
cursor
.
getInt
(
cursor
.
getColumnIndex
(
"callV6Flag"
)));
model
.
setCallV6Flag
(
cursor
.
getInt
(
cursor
.
getColumnIndex
(
"callV6Flag"
)));
model
.
setLanguage
(
cursor
.
getString
(
cursor
.
getColumnIndex
(
"language"
)));
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"
)));
model
.
setPhoneNo
(
cursor
.
getString
(
cursor
.
getColumnIndex
(
"phoneNo"
)));
String
globalPermissions
=
cursor
.
getString
(
cursor
.
getColumnIndex
(
"globalPermissions"
));
String
globalPermissions
=
cursor
.
getString
(
cursor
.
getColumnIndex
(
"globalPermissions"
));
if
(!
SobotStringUtils
.
isEmpty
(
globalPermissions
))
{
if
(!
SobotStringUtils
.
isEmpty
(
globalPermissions
))
{
...
@@ -93,6 +95,8 @@ public class ServiceInfoManager extends SobotCommonDao<SobotServiceInfoModel> {
...
@@ -93,6 +95,8 @@ public class ServiceInfoManager extends SobotCommonDao<SobotServiceInfoModel> {
contentValues
.
put
(
"companyId"
,
infoModel
.
getCompanyId
());
contentValues
.
put
(
"companyId"
,
infoModel
.
getCompanyId
());
contentValues
.
put
(
"callV6Flag"
,
infoModel
.
getCallV6Flag
());
contentValues
.
put
(
"callV6Flag"
,
infoModel
.
getCallV6Flag
());
contentValues
.
put
(
"language"
,
infoModel
.
getLanguage
());
contentValues
.
put
(
"language"
,
infoModel
.
getLanguage
());
contentValues
.
put
(
"timezone"
,
infoModel
.
getTimezone
());
contentValues
.
put
(
"timezoneId"
,
infoModel
.
getTimezoneId
());
contentValues
.
put
(
"phoneNo"
,
infoModel
.
getPhoneNo
());
contentValues
.
put
(
"phoneNo"
,
infoModel
.
getPhoneNo
());
if
(!
SobotStringUtils
.
isEmpty
(
infoModel
.
getGlobalPermissions
()))
{
if
(!
SobotStringUtils
.
isEmpty
(
infoModel
.
getGlobalPermissions
()))
{
contentValues
.
put
(
"globalPermissions"
,
SobotGsonUtil
.
beanToJson
(
infoModel
.
getGlobalPermissions
()));
contentValues
.
put
(
"globalPermissions"
,
SobotGsonUtil
.
beanToJson
(
infoModel
.
getGlobalPermissions
()));
...
...
sobot_common/src/main/java/com/sobot/common/login/db/SobotCommonDBHelper.java
View file @
9666a013
...
@@ -5,6 +5,7 @@ import android.database.sqlite.SQLiteDatabase;
...
@@ -5,6 +5,7 @@ import android.database.sqlite.SQLiteDatabase;
import
android.database.sqlite.SQLiteOpenHelper
;
import
android.database.sqlite.SQLiteOpenHelper
;
import
com.sobot.common.login.model.LoginUserEntity
;
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.Lock
;
import
java.util.concurrent.locks.ReentrantLock
;
import
java.util.concurrent.locks.ReentrantLock
;
...
@@ -16,7 +17,7 @@ class SobotCommonDBHelper extends SQLiteOpenHelper {
...
@@ -16,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
=
2
;
private
static
final
int
DB_CACHE_VERSION
=
3
;
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"
;
...
@@ -135,6 +136,14 @@ class SobotCommonDBHelper extends SQLiteOpenHelper {
...
@@ -135,6 +136,14 @@ class SobotCommonDBHelper extends SQLiteOpenHelper {
+
" ADD COLUMN "
+
LoginUserEntity
.
LOGIN_TIME
+
" INTEGER"
;
+
" ADD COLUMN "
+
LoginUserEntity
.
LOGIN_TIME
+
" INTEGER"
;
db
.
execSQL
(
sql1
);
// 执行修改表,添加字段的逻辑。
db
.
execSQL
(
sql1
);
// 执行修改表,添加字段的逻辑。
break
;
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
:
default
:
break
;
break
;
}
}
...
...
sobot_common/src/main/java/com/sobot/common/login/model/SobotServiceInfoModel.java
View file @
9666a013
...
@@ -48,9 +48,28 @@ public class SobotServiceInfoModel implements Serializable {
...
@@ -48,9 +48,28 @@ public class SobotServiceInfoModel implements Serializable {
*/
*/
private
int
callV6Flag
;
private
int
callV6Flag
;
/**
* 语言
*/
private
String
language
;
private
String
language
;
/**
/**
* 时区
*/
private
String
timezone
;
public
static
final
String
TIMEZONE
=
"timezone"
;
/**
* 时区城市
*/
private
String
timezoneId
;
public
static
final
String
TIMEZONEID
=
"timezoneId"
;
/**
* 手机号
* 手机号
*/
*/
private
String
phoneNo
;
private
String
phoneNo
;
...
@@ -175,4 +194,20 @@ public class SobotServiceInfoModel implements Serializable {
...
@@ -175,4 +194,20 @@ public class SobotServiceInfoModel implements Serializable {
public
void
setLanguage
(
String
language
)
{
public
void
setLanguage
(
String
language
)
{
this
.
language
=
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
;
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment