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
aed79e4a
Commit
aed79e4a
authored
Jun 14, 2023
by
zhengnw@sobot.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
common 登录接口添加语言
parent
0b7f3e95
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
11 deletions
+16
-11
build.gradle
app/build.gradle
+1
-1
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
+12
-7
No files found.
app/build.gradle
View file @
aed79e4a
...
@@ -8,7 +8,7 @@ android {
...
@@ -8,7 +8,7 @@ android {
defaultConfig
{
defaultConfig
{
applicationId
"com.sobot.moduletest"
applicationId
"com.sobot.moduletest"
minSdkVersion
1
6
minSdkVersion
1
7
targetSdkVersion
29
targetSdkVersion
29
versionCode
1
versionCode
1
versionName
"1.0"
versionName
"1.0"
...
...
sobot_common/build.gradle
View file @
aed79e4a
...
@@ -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.3.
1
.jar'
delete
'build/libs/sobot_common_1.3.
4
.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.3.
1
.jar'
)
rename
(
'classes.jar'
,
'sobot_common_1.3.
4
.jar'
)
}
}
makeJar
.
dependsOn
(
build
)
makeJar
.
dependsOn
(
build
)
}
}
...
...
sobot_common/sobot-common-publish-mavencentral.gradle
View file @
aed79e4a
...
@@ -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.3.
3
'
//版本号
PUBLISH_VERSION
=
'1.3.
4
'
//版本号
}
}
...
...
sobot_common/src/main/java/com/sobot/common/login/SobotLoginTools.java
View file @
aed79e4a
...
@@ -52,8 +52,8 @@ public class SobotLoginTools {
...
@@ -52,8 +52,8 @@ public class SobotLoginTools {
}
}
// 执行APP登录接口
// 执行APP登录接口
public
static
void
doAppLogin
(
final
Object
cancelTag
,
final
Context
mContext
,
final
String
host
,
long
timeout
,
Map
<
String
,
Object
>
params
,
Map
<
String
,
String
>
headers
,
final
SobotResultBlock
resultBlock
)
{
public
static
void
doAppLogin
(
final
Object
cancelTag
,
final
Context
mContext
,
final
String
host
,
long
timeout
,
Map
<
String
,
Object
>
params
,
Map
<
String
,
String
>
headers
,
final
SobotResultBlock
resultBlock
)
{
SobotHttpUtils
.
doPost
(
cancelTag
,
host
+
"/chat-sdk/sdk/admin/v1/login.action"
,
timeout
,
params
,
headers
,
new
HttpBaseUtils
.
StringCallBack
()
{
SobotHttpUtils
.
doPost
(
cancelTag
,
host
+
"/chat-sdk/sdk/admin/v1/login.action"
,
timeout
,
params
,
headers
,
new
HttpBaseUtils
.
StringCallBack
()
{
@Override
@Override
public
void
onResponse
(
String
result
)
{
public
void
onResponse
(
String
result
)
{
if
(!
TextUtils
.
isEmpty
(
result
))
{
if
(!
TextUtils
.
isEmpty
(
result
))
{
...
@@ -63,7 +63,7 @@ public class SobotLoginTools {
...
@@ -63,7 +63,7 @@ public class SobotLoginTools {
//登录接口和获取坐席信息权限接口都成功才算真正登录成功
//登录接口和获取坐席信息权限接口都成功才算真正登录成功
if
(
"1"
.
equals
(
baseModel
.
getCode
())
&&
baseModel
.
getData
()
!=
null
)
{
if
(
"1"
.
equals
(
baseModel
.
getCode
())
&&
baseModel
.
getData
()
!=
null
)
{
LoginUserInfoUtils
.
setUser
(
baseModel
.
getData
());
LoginUserInfoUtils
.
setUser
(
baseModel
.
getData
());
getLoginUserInfo
(
cancelTag
,
mContext
,
baseModel
.
getData
(),
host
,
baseModel
.
getData
().
getToken
(),
resultBlock
);
getLoginUserInfo
(
cancelTag
,
mContext
,
baseModel
.
getData
(),
host
,
baseModel
.
getData
().
getToken
(),
baseModel
.
getData
().
getLanguage
(),
resultBlock
);
}
else
{
}
else
{
resultBlock
.
resultBolok
(
SobotResultCode
.
CODE_FAILED
,
baseModel
.
getMsg
(),
baseModel
.
getCode
());
resultBlock
.
resultBolok
(
SobotResultCode
.
CODE_FAILED
,
baseModel
.
getMsg
(),
baseModel
.
getCode
());
}
}
...
@@ -94,8 +94,8 @@ public class SobotLoginTools {
...
@@ -94,8 +94,8 @@ public class SobotLoginTools {
* @param token
* @param token
* @param resultBlock 返回坐席信息
* @param resultBlock 返回坐席信息
*/
*/
public
static
void
getLoginUserInfo
(
final
Object
cancelTag
,
final
Context
mContext
,
String
host
,
final
String
token
,
final
SobotResultBlock
resultBlock
)
{
public
static
void
getLoginUserInfo
(
Object
cancelTag
,
Context
mContext
,
String
host
,
String
token
,
String
language
,
SobotResultBlock
resultBlock
)
{
getLoginUserInfo
(
cancelTag
,
mContext
,
null
,
host
,
token
,
resultBlock
);
getLoginUserInfo
(
cancelTag
,
mContext
,
null
,
host
,
token
,
language
,
resultBlock
);
}
}
/**
/**
...
@@ -108,10 +108,15 @@ public class SobotLoginTools {
...
@@ -108,10 +108,15 @@ public class SobotLoginTools {
* @param token
* @param token
* @param resultBlock
* @param resultBlock
*/
*/
public
static
void
getLoginUserInfo
(
final
Object
cancelTag
,
final
Context
mContext
,
final
LoginUserEntity
loginUser
,
String
host
,
final
String
token
,
final
SobotResultBlock
resultBlock
)
{
public
static
void
getLoginUserInfo
(
Object
cancelTag
,
final
Context
mContext
,
final
LoginUserEntity
loginUser
,
String
host
,
String
token
,
String
language
,
final
SobotResultBlock
resultBlock
)
{
final
String
url
=
host
+
"/basic-config-service/consoleAuth/queryAppAgentMenus"
;
final
String
url
=
host
+
"/basic-config-service/consoleAuth/queryAppAgentMenus"
;
Map
<
String
,
String
>
headerMap
=
new
HashMap
<>();
Map
<
String
,
String
>
headerMap
=
new
HashMap
<>();
headerMap
.
put
(
"temp-id"
,
token
);
if
(!
TextUtils
.
isEmpty
(
token
))
{
headerMap
.
put
(
"temp-id"
,
token
);
}
if
(!
TextUtils
.
isEmpty
(
language
))
{
headerMap
.
put
(
"language"
,
language
);
}
SobotHttpUtils
.
doGet
(
cancelTag
,
url
,
null
,
headerMap
,
new
HttpBaseUtils
.
StringCallBack
()
{
SobotHttpUtils
.
doGet
(
cancelTag
,
url
,
null
,
headerMap
,
new
HttpBaseUtils
.
StringCallBack
()
{
@Override
@Override
public
void
onResponse
(
String
result
)
{
public
void
onResponse
(
String
result
)
{
...
...
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