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
01c647f6
Commit
01c647f6
authored
Jan 17, 2024
by
zhengnw@sobot.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
common 1.5.7
parent
b4372306
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
36 additions
and
7 deletions
+36
-7
build.gradle
sobot_common/build.gradle
+2
-2
sobot-common-publish-mavencentral.gradle
sobot_common/sobot-common-publish-mavencentral.gradle
+1
-1
SobotLoginTools.java
...src/main/java/com/sobot/common/login/SobotLoginTools.java
+0
-0
LoginUserManager.java
...main/java/com/sobot/common/login/db/LoginUserManager.java
+4
-0
SobotCommonDBHelper.java
...n/java/com/sobot/common/login/db/SobotCommonDBHelper.java
+11
-3
LoginUserEntity.java
...in/java/com/sobot/common/login/model/LoginUserEntity.java
+18
-1
No files found.
sobot_common/build.gradle
View file @
01c647f6
...
@@ -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
)
}
}
...
...
sobot_common/sobot-common-publish-mavencentral.gradle
View file @
01c647f6
...
@@ -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
'
//版本号
}
}
...
...
sobot_common/src/main/java/com/sobot/common/login/SobotLoginTools.java
View file @
01c647f6
This diff is collapsed.
Click to expand it.
sobot_common/src/main/java/com/sobot/common/login/db/LoginUserManager.java
View file @
01c647f6
...
@@ -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
;
}
}
...
...
sobot_common/src/main/java/com/sobot/common/login/db/SobotCommonDBHelper.java
View file @
01c647f6
...
@@ -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
;
}
}
...
...
sobot_common/src/main/java/com/sobot/common/login/model/LoginUserEntity.java
View file @
01c647f6
...
@@ -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
;
}
}
}
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