Commit 3d335788 by zhengnw@sobot.com

common 1.7.4

parent aa0c1769
......@@ -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)
}
......
......@@ -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' //版本号
}
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment