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
057b0bfd
Commit
057b0bfd
authored
Sep 06, 2023
by
zhengnw@sobot.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
common 1.4.0 登录信息使用单例
parent
c07bc985
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
137 additions
and
78 deletions
+137
-78
MainActivity.java
app/src/main/java/com/sobot/moduletest/MainActivity.java
+39
-17
MyApp.java
app/src/main/java/com/sobot/moduletest/MyApp.java
+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
+0
-0
LoginUserInfoUtils.java
...in/java/com/sobot/common/login/db/LoginUserInfoUtils.java
+0
-30
LoginUserManager.java
...main/java/com/sobot/common/login/db/LoginUserManager.java
+13
-4
ServiceInfoManager.java
...in/java/com/sobot/common/login/db/ServiceInfoManager.java
+18
-10
SobotCommonDBHelper.java
...n/java/com/sobot/common/login/db/SobotCommonDBHelper.java
+14
-3
LoginUserEntity.java
...in/java/com/sobot/common/login/model/LoginUserEntity.java
+23
-0
SobotPermissionManager.java
...sobot/common/login/permission/SobotPermissionManager.java
+7
-8
build.gradle
sobot_pictureframe/build.gradle
+2
-2
build.gradle
sobot_utils/build.gradle
+17
-0
No files found.
app/src/main/java/com/sobot/moduletest/MainActivity.java
View file @
057b0bfd
...
...
@@ -9,8 +9,6 @@ import android.net.Uri;
import
android.widget.ImageView
;
import
com.sobot.common.utils.SobotImageUtils
;
import
com.sobot.network.apiUtils.SobotHttpUtils
;
import
com.sobot.network.http.HttpBaseUtils
;
import
com.sobot.pictureframe.SobotBitmapUtil
;
import
com.sobot.utils.SobotLogUtils
;
import
com.sobot.utils.SobotSDCardUtils
;
...
...
@@ -133,21 +131,21 @@ public class MainActivity extends SobotBaseActivity {
Map
<
String
,
String
>
headers
=
new
HashMap
<>();
headers
.
put
(
"version"
,
"2.9.7"
);
headers
.
put
(
"from"
,
"2"
);
SobotHttpUtils
.
doPost
(
MainActivity
.
this
,
"https://api.sobot.com/chat-sdk/sdk/user/v2/robotGuide.action"
,
5000
,
map
,
headers
,
new
HttpBaseUtils
.
StringCallBack
()
{
@Override
public
void
onResponse
(
String
result
)
{
}
@Override
public
void
onError
(
Exception
e
,
String
msg
,
int
responseCode
)
{
}
@Override
public
void
inProgress
(
int
progress
)
{
}
});
//
SobotHttpUtils.doPost(MainActivity.this, "https://api.sobot.com/chat-sdk/sdk/user/v2/robotGuide.action", 5000,map, headers, new HttpBaseUtils.StringCallBack() {
//
@Override
//
public void onResponse(String result) {
//
}
//
//
@Override
//
public void onError(Exception e, String msg, int responseCode) {
//
//
}
//
//
@Override
//
public void inProgress(int progress) {
//
//
}
//
});
String
languageFileName
=
"sobot_android_strings_en.json"
;
String
languagePath
=
SobotSDCardUtils
.
getPrivatePath
(
MainActivity
.
this
)
+
File
.
separator
+
"sobot_language"
+
File
.
separator
+
languageFileName
;
File
file
=
new
File
(
languagePath
);
...
...
@@ -198,6 +196,30 @@ public class MainActivity extends SobotBaseActivity {
// });
// }
Map
<
String
,
Object
>
map1
=
new
HashMap
<>();
map1
.
put
(
"email"
,
"zhengnawei@sobot.com"
);
map1
.
put
(
"passwd"
,
"znw123456"
);
map1
.
put
(
"loginStatus"
,
"1"
);
map1
.
put
(
"from"
,
2
+
""
);
map1
.
put
(
"way"
,
"10"
);
map1
.
put
(
"ack"
,
"1"
);
Map
<
String
,
String
>
headers1
=
new
HashMap
<>();
headers1
.
put
(
"language"
,
"zh"
);
// SobotLoginTools.getInstance().doAppLogin(MainActivity.this, MainActivity.this, "https://api-c.soboten.com/text", 8000, map1, headers1, new SobotResultBlock() {
// @Override
// public void resultBolok(SobotResultCode code, String msg, Object obj) {
// SobotLoginTools.getInstance().checkExpiresToken();
// SobotLogUtils.i(SobotLoginTools.getInstance().getAccessToken()+"");
// SobotLogUtils.i(SobotLoginTools.getInstance().getTempId());
// SobotLogUtils.i(SobotLoginTools.getInstance().getToken()+"");
// }
// });
// LoginUserEntity sa=new LoginUserEntity();
// sa.setLogin_time(System.currentTimeMillis());
// SobotLoginTools.getInstance().setLoginUser(sa);
// SobotServiceInfoModel ccc=new SobotServiceInfoModel();
// SobotLoginTools.getInstance().setServiceInfo(ccc);
}
@Override
...
...
app/src/main/java/com/sobot/moduletest/MyApp.java
View file @
057b0bfd
...
...
@@ -19,7 +19,7 @@ public class MyApp extends MultiDexApplication {
// Fresco.initialize(this);
// 主要是添加下面这句代码
// MultiDex.install(this);
SobotCommonApi
.
init
(
this
,
"https://sobot.com"
);
SobotCommonApi
.
init
(
this
,
"https://
api-c.
sobot.com"
);
SobotCommonApi
.
setShowLogDebug
(
true
);
SobotWidgetApi
.
setSwitchMarkStatus
(
SobotMarkConfig
.
LANDSCAPE_SCREEN
,
false
);
SobotWidgetApi
.
setSwitchMarkStatus
(
SobotMarkConfig
.
DISPLAY_INNOTCH
,
false
);
...
...
sobot_common/build.gradle
View file @
057b0bfd
...
...
@@ -11,7 +11,7 @@ android {
//这里就是打jar包
task
makeJar
(
type:
Copy
)
{
//删除旧的jar包
delete
'build/libs/sobot_common_1.
3.4
.jar'
delete
'build/libs/sobot_common_1.
4.0
.jar'
//原地址
from
(
'build/intermediates/packaged-classes/release/'
)
//导出jar包的地址
...
...
@@ -19,7 +19,7 @@ android {
//包含的jar包
include
(
'classes.jar'
)
//重命名jar包为mysdk
rename
(
'classes.jar'
,
'sobot_common_1.
3.4
.jar'
)
rename
(
'classes.jar'
,
'sobot_common_1.
4.0
.jar'
)
}
makeJar
.
dependsOn
(
build
)
}
...
...
sobot_common/sobot-common-publish-mavencentral.gradle
View file @
057b0bfd
...
...
@@ -13,7 +13,7 @@ ext {
PUBLISH_GROUP_ID
=
"com.sobot.library"
//项目包名
PUBLISH_ARTIFACT_ID
=
'sobotcommon'
//项目名
// PUBLISH_ARTIFACT_ID = 'sobotcommon_x' //项目名
PUBLISH_VERSION
=
'1.3.9'
//版本号
PUBLISH_VERSION
=
'1.3.9
.5
'
//版本号
}
...
...
sobot_common/src/main/java/com/sobot/common/login/SobotLoginTools.java
View file @
057b0bfd
This diff is collapsed.
Click to expand it.
sobot_common/src/main/java/com/sobot/common/login/db/LoginUserInfoUtils.java
deleted
100644 → 0
View file @
c07bc985
package
com
.
sobot
.
common
.
login
.
db
;
import
com.sobot.common.login.model.LoginUserEntity
;
/**
* 获取当前登录用户信息
*/
public
class
LoginUserInfoUtils
{
private
static
LoginUserEntity
user
;
public
synchronized
static
LoginUserEntity
getUser
()
{
if
(
user
==
null
||
user
.
getAid
()
==
null
)
{
user
=
LoginUserManager
.
getInstance
().
getCurUser
();
}
return
user
;
}
public
static
void
setUser
(
LoginUserEntity
newUser
)
{
LoginUserManager
.
getInstance
().
deleteAll
();
user
=
newUser
;
if
(
user
!=
null
)
{
LoginUserManager
.
getInstance
().
insert
(
user
);
}
else
{
HostManager
.
getInstance
().
deleteAll
();
ServiceInfoManager
.
getInstance
().
deleteAll
();
}
}
}
sobot_common/src/main/java/com/sobot/common/login/db/LoginUserManager.java
View file @
057b0bfd
...
...
@@ -7,6 +7,7 @@ import android.database.Cursor;
import
com.sobot.common.login.model.LoginUserEntity
;
import
com.sobot.common.utils.SobotGlobalContext
;
import
com.sobot.gson.SobotGsonUtil
;
import
com.sobot.utils.SobotStringUtils
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -55,8 +56,10 @@ public class LoginUserManager extends SobotCommonDao<LoginUserEntity> {
model
.
setMaxServiceCount
(
cursor
.
getInt
(
cursor
.
getColumnIndex
(
"maxServiceCount"
)));
model
.
setBlackFunction
(
cursor
.
getInt
(
cursor
.
getColumnIndex
(
"blackFunction"
)));
String
transferFunction
=
cursor
.
getString
(
cursor
.
getColumnIndex
(
"transferFunction"
));
Map
<
String
,
Boolean
>
map
=
SobotGsonUtil
.
jsonToMaps
(
transferFunction
);
model
.
setTicketFunction
(
map
);
if
(!
SobotStringUtils
.
isEmpty
(
transferFunction
)){
Map
<
String
,
Boolean
>
map
=
SobotGsonUtil
.
jsonToMaps
(
transferFunction
);
model
.
setTicketFunction
(
map
);
}
model
.
setFace
(
cursor
.
getString
(
cursor
.
getColumnIndex
(
"face"
)));
model
.
setCompanyName
(
cursor
.
getString
(
cursor
.
getColumnIndex
(
"companyName"
)));
model
.
setAppKey
(
cursor
.
getString
(
cursor
.
getColumnIndex
(
"appKey"
)));
...
...
@@ -80,6 +83,8 @@ public class LoginUserManager extends SobotCommonDao<LoginUserEntity> {
model
.
setKbVersion
(
cursor
.
getInt
(
cursor
.
getColumnIndex
(
"kbVersion"
))
+
""
);
model
.
setCompanyId
(
cursor
.
getString
(
cursor
.
getColumnIndex
(
"companyId"
)));
model
.
setLanguage
(
cursor
.
getString
(
cursor
.
getColumnIndex
(
"local_language"
)));
model
.
setAccess_token
(
cursor
.
getString
(
cursor
.
getColumnIndex
(
LoginUserEntity
.
ACCESS_TOKEN
)));
model
.
setLogin_time
(
cursor
.
getLong
(
cursor
.
getColumnIndex
(
LoginUserEntity
.
LOGIN_TIME
)));
return
model
;
}
...
...
@@ -93,7 +98,9 @@ public class LoginUserManager extends SobotCommonDao<LoginUserEntity> {
contentValues
.
put
(
"maxServiceCount"
,
userAccount
.
getMaxServiceCount
());
contentValues
.
put
(
"blackFunction"
,
userAccount
.
getBlackFunction
());
contentValues
.
put
(
"transferFunction"
,
userAccount
.
getTransferFunction
());
contentValues
.
put
(
"ticketFunction"
,
SobotGsonUtil
.
beanToJson
(
userAccount
.
getTicketFunction
()));
if
(
userAccount
.
getTicketFunction
()
!=
null
)
{
contentValues
.
put
(
"ticketFunction"
,
SobotGsonUtil
.
beanToJson
(
userAccount
.
getTicketFunction
()));
}
contentValues
.
put
(
"face"
,
userAccount
.
getFace
());
contentValues
.
put
(
"companyName"
,
userAccount
.
getCompanyName
());
contentValues
.
put
(
"appKey"
,
userAccount
.
getAppKey
());
...
...
@@ -115,12 +122,14 @@ public class LoginUserManager extends SobotCommonDao<LoginUserEntity> {
contentValues
.
put
(
"callV1Flag"
,
userAccount
.
getCallV1Flag
());
contentValues
.
put
(
"transferAuditFlag"
,
userAccount
.
getTransferAuditFlag
());
int
kbVersion
=
1
;
if
(
"6"
.
contains
(
userAccount
.
getKbVersion
(
)))
{
if
(
"6"
.
contains
(
SobotStringUtils
.
checkStringIsNull
(
userAccount
.
getKbVersion
()
)))
{
kbVersion
=
6
;
}
contentValues
.
put
(
"kbVersion"
,
kbVersion
);
contentValues
.
put
(
"companyId"
,
userAccount
.
getCompanyId
());
contentValues
.
put
(
"local_language"
,
userAccount
.
getLanguage
());
contentValues
.
put
(
LoginUserEntity
.
ACCESS_TOKEN
,
userAccount
.
getAccess_token
());
contentValues
.
put
(
LoginUserEntity
.
LOGIN_TIME
,
userAccount
.
getLogin_time
());
return
contentValues
;
}
...
...
sobot_common/src/main/java/com/sobot/common/login/db/ServiceInfoManager.java
View file @
057b0bfd
...
...
@@ -9,6 +9,7 @@ import com.sobot.common.login.model.SobotServiceInfoModel;
import
com.sobot.common.utils.SobotGlobalContext
;
import
com.sobot.gson.SobotGsonUtil
;
import
com.sobot.gson.reflect.TypeToken
;
import
com.sobot.utils.SobotStringUtils
;
import
java.util.List
;
...
...
@@ -58,18 +59,21 @@ public class ServiceInfoManager extends SobotCommonDao<SobotServiceInfoModel> {
model
.
setNewBossSwitch
(
cursor
.
getInt
(
cursor
.
getColumnIndex
(
"newBossSwitch"
)));
model
.
setRegion
(
cursor
.
getInt
(
cursor
.
getColumnIndex
(
"region"
)));
String
functionStr
=
cursor
.
getString
(
cursor
.
getColumnIndex
(
"functionStr"
));
List
<
ServiceFunctionVoModel
>
list
=
SobotGsonUtil
.
jsonToBeans
(
functionStr
,
new
TypeToken
<
List
<
ServiceFunctionVoModel
>>()
{
}.
getType
());
model
.
setFunctionStr
(
list
);
if
(!
SobotStringUtils
.
isEmpty
(
functionStr
))
{
List
<
ServiceFunctionVoModel
>
list
=
SobotGsonUtil
.
jsonToBeans
(
functionStr
,
new
TypeToken
<
List
<
ServiceFunctionVoModel
>>()
{
}.
getType
());
model
.
setFunctionStr
(
list
);
}
model
.
setCompanyId
(
cursor
.
getString
(
cursor
.
getColumnIndex
(
"companyId"
)));
model
.
setCallV6Flag
(
cursor
.
getInt
(
cursor
.
getColumnIndex
(
"callV6Flag"
)));
model
.
setLanguage
(
cursor
.
getString
(
cursor
.
getColumnIndex
(
"language"
)));
model
.
setPhoneNo
(
cursor
.
getString
(
cursor
.
getColumnIndex
(
"phoneNo"
)));
String
globalPermissions
=
cursor
.
getString
(
cursor
.
getColumnIndex
(
"globalPermissions"
));
List
<
String
>
globalPermissionslist
=
SobotGsonUtil
.
jsonToBeans
(
globalPermissions
,
new
TypeToken
<
List
<
String
>>()
{
}.
getType
());
model
.
setGlobalPermissions
(
globalPermissionslist
);
if
(!
SobotStringUtils
.
isEmpty
(
globalPermissions
))
{
List
<
String
>
globalPermissionslist
=
SobotGsonUtil
.
jsonToBeans
(
globalPermissions
,
new
TypeToken
<
List
<
String
>>()
{
}.
getType
());
model
.
setGlobalPermissions
(
globalPermissionslist
);
}
return
model
;
}
...
...
@@ -83,12 +87,16 @@ public class ServiceInfoManager extends SobotCommonDao<SobotServiceInfoModel> {
contentValues
.
put
(
"serviceLanguage"
,
infoModel
.
getServiceLanguage
());
contentValues
.
put
(
"newBossSwitch"
,
infoModel
.
getNewBossSwitch
());
contentValues
.
put
(
"region"
,
infoModel
.
getRegion
());
contentValues
.
put
(
"functionStr"
,
SobotGsonUtil
.
beanToJson
(
infoModel
.
getFunctionStr
()));
if
(!
SobotStringUtils
.
isEmpty
(
infoModel
.
getFunctionStr
()))
{
contentValues
.
put
(
"functionStr"
,
SobotGsonUtil
.
beanToJson
(
infoModel
.
getFunctionStr
()));
}
contentValues
.
put
(
"companyId"
,
infoModel
.
getCompanyId
());
contentValues
.
put
(
"callV6Flag"
,
infoModel
.
getCallV6Flag
());
contentValues
.
put
(
"callV6Flag"
,
infoModel
.
getCallV6Flag
());
contentValues
.
put
(
"language"
,
infoModel
.
getLanguage
());
contentValues
.
put
(
"phoneNo"
,
infoModel
.
getPhoneNo
());
contentValues
.
put
(
"globalPermissions"
,
SobotGsonUtil
.
beanToJson
(
infoModel
.
getGlobalPermissions
()));
if
(!
SobotStringUtils
.
isEmpty
(
infoModel
.
getGlobalPermissions
()))
{
contentValues
.
put
(
"globalPermissions"
,
SobotGsonUtil
.
beanToJson
(
infoModel
.
getGlobalPermissions
()));
}
return
contentValues
;
}
...
...
sobot_common/src/main/java/com/sobot/common/login/db/SobotCommonDBHelper.java
View file @
057b0bfd
...
...
@@ -4,6 +4,8 @@ import android.content.Context;
import
android.database.sqlite.SQLiteDatabase
;
import
android.database.sqlite.SQLiteOpenHelper
;
import
com.sobot.common.login.model.LoginUserEntity
;
import
java.util.concurrent.locks.Lock
;
import
java.util.concurrent.locks.ReentrantLock
;
...
...
@@ -13,7 +15,8 @@ import java.util.concurrent.locks.ReentrantLock;
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 = 1;
private
static
final
int
DB_CACHE_VERSION
=
2
;
static
final
String
TABLE_LOGIN_USER
=
"login_user"
;
static
final
String
TABLE_SOBOT_HOST
=
"sobot_host"
;
static
final
String
TABLE_SERVICE_INFO
=
"sobot_service"
;
...
...
@@ -69,7 +72,7 @@ class SobotCommonDBHelper extends SQLiteOpenHelper {
"sid varchar(40), "
+
"pu varchar(40), "
+
"puid varchar(40), "
+
"token varchar(
3
00), "
+
"token varchar(
5
00), "
+
"cusRoleName varchar(200), "
+
"aid varchar(40), "
+
"centerNumber varchar(40), "
+
...
...
@@ -124,9 +127,17 @@ class SobotCommonDBHelper extends SQLiteOpenHelper {
*/
private
void
upgradeDB
(
SQLiteDatabase
db
,
int
oldVersion
,
int
newVersion
)
{
switch
(
oldVersion
)
{
case
1
:
String
sql
=
"ALTER TABLE "
+
TABLE_LOGIN_USER
+
" ADD COLUMN "
+
LoginUserEntity
.
ACCESS_TOKEN
+
" VARCHAR(700)"
;
db
.
execSQL
(
sql
);
// 执行修改表,添加字段的逻辑。
String
sql1
=
"ALTER TABLE "
+
TABLE_LOGIN_USER
+
" ADD COLUMN "
+
LoginUserEntity
.
LOGIN_TIME
+
" INTEGER"
;
db
.
execSQL
(
sql1
);
// 执行修改表,添加字段的逻辑。
break
;
default
:
break
;
}
}
}
sobot_common/src/main/java/com/sobot/common/login/model/LoginUserEntity.java
View file @
057b0bfd
...
...
@@ -48,6 +48,14 @@ public class LoginUserEntity implements Serializable {
private
String
language
;
//国际化指定语言 3.1.3新增 为空时,默认中文
private
String
access_token
;
//呼叫v6
public
static
final
String
ACCESS_TOKEN
=
"access_token"
;
//呼叫v6 accessToken
private
long
login_time
;
//登录时间戳
public
static
final
String
LOGIN_TIME
=
"login_time"
;
public
String
getCompanyName
()
{
return
companyName
;
}
...
...
@@ -312,4 +320,19 @@ public class LoginUserEntity implements Serializable {
this
.
language
=
language
;
}
public
String
getAccess_token
()
{
return
access_token
;
}
public
void
setAccess_token
(
String
access_token
)
{
this
.
access_token
=
access_token
;
}
public
long
getLogin_time
()
{
return
login_time
;
}
public
void
setLogin_time
(
long
login_time
)
{
this
.
login_time
=
login_time
;
}
}
sobot_common/src/main/java/com/sobot/common/login/permission/SobotPermissionManager.java
View file @
057b0bfd
...
...
@@ -2,8 +2,7 @@ package com.sobot.common.login.permission;
import
android.text.TextUtils
;
import
com.sobot.common.login.db.LoginUserInfoUtils
;
import
com.sobot.common.login.db.ServiceInfoManager
;
import
com.sobot.common.login.SobotLoginTools
;
import
com.sobot.common.login.model.LoginUserEntity
;
import
com.sobot.common.login.model.ServiceFunctionVoModel
;
import
com.sobot.common.login.model.SobotServiceInfoModel
;
...
...
@@ -27,8 +26,8 @@ public class SobotPermissionManager {
private
static
SobotPermissionApi
getInstance
()
{
if
(
instance
==
null
)
{
if
(
LoginUserInfoUtils
.
get
User
()
!=
null
)
{
switch
(
LoginUserInfoUtils
.
get
User
().
getCusRoleId
())
{
if
(
SobotLoginTools
.
getInstance
().
getLogin
User
()
!=
null
)
{
switch
(
SobotLoginTools
.
getInstance
().
getLogin
User
().
getCusRoleId
())
{
case
ONLINE_CUSTOMER_SERVICE:
//在线客服
instance
=
new
PermissionOnLineCustomerService
();
break
;
...
...
@@ -63,7 +62,7 @@ public class SobotPermissionManager {
}
public
static
boolean
checkPermission
(
int
type
)
{
SobotServiceInfoModel
serviceInfoModel
=
S
erviceInfoManager
.
getInstance
().
get
Info
();
SobotServiceInfoModel
serviceInfoModel
=
S
obotLoginTools
.
getInstance
().
getService
Info
();
if
(
serviceInfoModel
!=
null
)
{
if
(
serviceInfoModel
.
getNewBossSwitch
()
>
0
)
{
return
isHasPermission
(
type
+
""
);
...
...
@@ -265,7 +264,7 @@ public class SobotPermissionManager {
}
public
static
boolean
isHasPermission
(
String
type
)
{
SobotServiceInfoModel
serviceInfoModel
=
S
erviceInfoManager
.
getInstance
().
get
Info
();
SobotServiceInfoModel
serviceInfoModel
=
S
obotLoginTools
.
getInstance
().
getService
Info
();
if
(
serviceInfoModel
!=
null
)
{
if
(
serviceInfoModel
.
getNewBossSwitch
()
>
0
)
{
if
(!
TextUtils
.
isEmpty
(
type
)
&&
serviceInfoModel
!=
null
&&
serviceInfoModel
.
getFunctionStr
()
!=
null
)
{
...
...
@@ -277,7 +276,7 @@ public class SobotPermissionManager {
}
}
}
else
{
LoginUserEntity
customerServiceInfoModel
=
LoginUserInfoUtils
.
get
User
();
LoginUserEntity
customerServiceInfoModel
=
SobotLoginTools
.
getInstance
().
getLogin
User
();
if
(!
TextUtils
.
isEmpty
(
type
)
&&
customerServiceInfoModel
!=
null
&&
customerServiceInfoModel
.
getTicketFunction
()
!=
null
&&
customerServiceInfoModel
.
getTicketFunction
().
containsKey
(
type
))
{
return
customerServiceInfoModel
.
getTicketFunction
().
get
(
type
);
}
...
...
@@ -287,7 +286,7 @@ public class SobotPermissionManager {
}
public
static
boolean
isHasNewPermission
(
String
type
)
{
SobotServiceInfoModel
serviceInfoModel
=
S
erviceInfoManager
.
getInstance
().
get
Info
();
SobotServiceInfoModel
serviceInfoModel
=
S
obotLoginTools
.
getInstance
().
getService
Info
();
if
(
serviceInfoModel
!=
null
)
{
if
(
serviceInfoModel
.
getNewBossSwitch
()
>
0
)
{
if
(!
TextUtils
.
isEmpty
(
type
)
&&
serviceInfoModel
!=
null
&&
serviceInfoModel
.
getFunctionStr
()
!=
null
)
{
...
...
sobot_pictureframe/build.gradle
View file @
057b0bfd
...
...
@@ -11,7 +11,7 @@ android {
//这里就是打jar包
task
makeJar
(
type:
Copy
)
{
//删除旧的jar包
delete
'build/libs/
picture_1.1
.jar'
delete
'build/libs/
sobot_picture_1.1.4
.jar'
//原地址
from
(
'build/intermediates/packaged-classes/release/'
)
//导出jar包的地址
...
...
@@ -19,7 +19,7 @@ android {
//包含的jar包
include
(
'classes.jar'
)
//重命名jar包为mysdk
rename
(
'classes.jar'
,
'
picture_1.1
.jar'
)
rename
(
'classes.jar'
,
'
sobot_picture_1.1.4
.jar'
)
}
makeJar
.
dependsOn
(
build
)
...
...
sobot_utils/build.gradle
View file @
057b0bfd
...
...
@@ -8,6 +8,23 @@ android {
defaultConfig
{
minSdkVersion
14
}
//这里就是打jar包
task
makeJar
(
type:
Copy
)
{
//删除旧的jar包
delete
'build/libs/sobot_utils_1.1.2.jar'
//原地址
from
(
'build/intermediates/packaged-classes/release/'
)
//导出jar包的地址
into
(
'build/libs/'
)
//包含的jar包
include
(
'classes.jar'
)
//重命名jar包为mysdk
rename
(
'classes.jar'
,
'sobot_utils_1.1.2.jar'
)
}
makeJar
.
dependsOn
(
build
)
lintOptions
{
abortOnError
false
}
}
dependencies
{
...
...
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