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
3d335788
Commit
3d335788
authored
Apr 29, 2024
by
zhengnw@sobot.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
common 1.7.4
parent
aa0c1769
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
12 deletions
+16
-12
build.gradle
sobot_common/build.gradle
+2
-2
sobot-common-publish-mavencentral.gradle
sobot_common/sobot-common-publish-mavencentral.gradle
+1
-1
SobotPermissionManager.java
...sobot/common/login/permission/SobotPermissionManager.java
+13
-9
No files found.
sobot_common/build.gradle
View file @
3d335788
...
...
@@ -11,7 +11,7 @@ android {
//这里就是打jar包
task
makeJar
(
type:
Copy
)
{
//删除旧的jar包
delete
'build/libs/sobot_common_x_1.7.
2
.jar'
delete
'build/libs/sobot_common_x_1.7.
3
.jar'
//原地址
from
(
'build/intermediates/packaged-classes/release/'
)
//导出jar包的地址
...
...
@@ -19,7 +19,7 @@ android {
//包含的jar包
include
(
'classes.jar'
)
//重命名jar包为mysdk
rename
(
'classes.jar'
,
'sobot_common_x_1.7.
2
.jar'
)
rename
(
'classes.jar'
,
'sobot_common_x_1.7.
3
.jar'
)
}
makeJar
.
dependsOn
(
build
)
}
...
...
sobot_common/sobot-common-publish-mavencentral.gradle
View file @
3d335788
...
...
@@ -12,7 +12,7 @@ task androidSourcesJar(type: Jar) {
ext
{
PUBLISH_GROUP_ID
=
"com.sobot.library"
//项目包名
PUBLISH_ARTIFACT_ID
=
'sobotcommon_x'
//项目名
PUBLISH_VERSION
=
'1.7.
2
'
//版本号
PUBLISH_VERSION
=
'1.7.
4
'
//版本号
}
...
...
sobot_common/src/main/java/com/sobot/common/login/permission/SobotPermissionManager.java
View file @
3d335788
...
...
@@ -98,21 +98,17 @@ public class SobotPermissionManager {
public
static
final
String
USER_PERMISSION_TYPE_WORK_STATUS
=
"1231"
;
// 工单状态 可见/不可见
/**
* 查看App客户中心
*/
public
static
String
ADMIN_APP_TICKET_CUSTOMER_FUNCTION_CODE
=
"1611"
;
/**
* 拉黑权限编码
*/
public
static
String
BLACK_FUNCTION_CODE
=
"220201"
;
public
static
final
String
BLACK_FUNCTION_CODE
=
"220201"
;
/**
* 转接权限编码
*/
public
static
String
TRANSFER_FUNCTION_CODE
=
"220202"
;
public
static
final
String
TRANSFER_FUNCTION_CODE
=
"220202"
;
/**
* 客服自定义欢迎语权限编码
*/
public
static
String
DIY_ADMIN_CONFIG_FUNCTION_CODE
=
"220204"
;
public
static
final
String
DIY_ADMIN_CONFIG_FUNCTION_CODE
=
"220204"
;
//会话
public
static
final
String
MODULE_CHAT
=
"module_chat"
;
...
...
@@ -283,6 +279,12 @@ public class SobotPermissionManager {
return
MODULE_ORDER_STATUS
;
case
USER_PERMISSION_TYPE_WORK_HISTORY:
return
MODULE_ORDER_OPERATE
;
case
BLACK_FUNCTION_CODE:
return
BLACK_FUNCTION_CODE
;
case
TRANSFER_FUNCTION_CODE:
return
TRANSFER_FUNCTION_CODE
;
case
DIY_ADMIN_CONFIG_FUNCTION_CODE:
return
DIY_ADMIN_CONFIG_FUNCTION_CODE
;
//对话权限
case
SobotPermissionApi
.
USER_PERMISSION_TYPE_TALK
+
""
:
return
MODULE_CHAT
;
...
...
@@ -341,10 +343,11 @@ public class SobotPermissionManager {
if
(
serviceInfoModel
.
getNewBossSwitch
()
>
0
)
{
//新console
List
<
ServiceFunctionVoModel
>
functionVoModelList
=
FunctionManager
.
getInstance
().
getFunctionVos
();
if
(!
TextUtils
.
isEmpty
(
type
)
&&
functionVoModelList
!=
null
)
{
if
(!
TextUtils
.
isEmpty
(
type
)
&&
functionVoModelList
!=
null
)
{
for
(
int
i
=
0
;
i
<
functionVoModelList
.
size
();
i
++)
{
ServiceFunctionVoModel
cusFunctionVoModel
=
functionVoModelList
.
get
(
i
);
if
(
getCodeByType
(
type
).
equals
(
cusFunctionVoModel
.
getCode
()))
{
//转接拉黑等需要判断id,只要code 或者id 一个满足了就是有权限
if
(
getCodeByType
(
type
).
equals
(
cusFunctionVoModel
.
getCode
())
||
(
getCodeByType
(
type
).
equals
(
cusFunctionVoModel
.
getId
())
&&
cusFunctionVoModel
.
getCheckedCode
()
==
1
))
{
return
true
;
}
}
...
...
@@ -354,6 +357,7 @@ public class SobotPermissionManager {
if
(!
TextUtils
.
isEmpty
(
type
)
&&
functionVoModelList
!=
null
)
{
for
(
int
i
=
0
;
i
<
functionVoModelList
.
size
();
i
++)
{
ServiceFunctionVoModel
cusFunctionVoModel
=
functionVoModelList
.
get
(
i
);
//老console 只判断id 死否一样
if
(
type
.
equals
(
cusFunctionVoModel
.
getId
()))
{
//1开启了 0 没有开启
return
cusFunctionVoModel
.
getCheckedCode
()
==
1
?
true
:
false
;
...
...
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