|
@@ -290,7 +290,7 @@ public class CompanyServiceImpl implements ICompanyService
|
|
|
salesManagerRole.setDataScope("1"); // 全部数据权限
|
|
salesManagerRole.setDataScope("1"); // 全部数据权限
|
|
|
salesManagerRole.setStatus("0");
|
|
salesManagerRole.setStatus("0");
|
|
|
try {
|
|
try {
|
|
|
- String json = configService.selectConfigByKey("companymenu.config");
|
|
|
|
|
|
|
+ String json = configService.selectConfigByKey("salesmanagermenuconfig");
|
|
|
if (StringUtils.isNotEmpty(json) && !json.equals("")) {
|
|
if (StringUtils.isNotEmpty(json) && !json.equals("")) {
|
|
|
CompanyMenuConfig config = JSONUtil.toBean(json, CompanyMenuConfig.class);
|
|
CompanyMenuConfig config = JSONUtil.toBean(json, CompanyMenuConfig.class);
|
|
|
salesManagerRole.setMenuIds(config.getMenuIds());
|
|
salesManagerRole.setMenuIds(config.getMenuIds());
|
|
@@ -315,7 +315,7 @@ public class CompanyServiceImpl implements ICompanyService
|
|
|
salesSupervisorRole.setDataScope("2"); // 本部门数据权限
|
|
salesSupervisorRole.setDataScope("2"); // 本部门数据权限
|
|
|
salesSupervisorRole.setStatus("0");
|
|
salesSupervisorRole.setStatus("0");
|
|
|
try {
|
|
try {
|
|
|
- String json = configService.selectConfigByKey("companymenu.config");
|
|
|
|
|
|
|
+ String json = configService.selectConfigByKey("salessupervisormenuconfig");
|
|
|
if (StringUtils.isNotEmpty(json) && !json.equals("")) {
|
|
if (StringUtils.isNotEmpty(json) && !json.equals("")) {
|
|
|
CompanyMenuConfig config = JSONUtil.toBean(json, CompanyMenuConfig.class);
|
|
CompanyMenuConfig config = JSONUtil.toBean(json, CompanyMenuConfig.class);
|
|
|
salesSupervisorRole.setMenuIds(config.getMenuIds());
|
|
salesSupervisorRole.setMenuIds(config.getMenuIds());
|
|
@@ -334,13 +334,13 @@ public class CompanyServiceImpl implements ICompanyService
|
|
|
// 3. 创建数据运营角色(全部数据权限)
|
|
// 3. 创建数据运营角色(全部数据权限)
|
|
|
CompanyRole dataOperationRole = new CompanyRole();
|
|
CompanyRole dataOperationRole = new CompanyRole();
|
|
|
dataOperationRole.setCompanyId(company.getCompanyId());
|
|
dataOperationRole.setCompanyId(company.getCompanyId());
|
|
|
- dataOperationRole.setRoleName("数据运营");
|
|
|
|
|
|
|
+ dataOperationRole.setRoleName("数据运维");
|
|
|
dataOperationRole.setRoleKey(company.getCompanyId()+"_data_operation");
|
|
dataOperationRole.setRoleKey(company.getCompanyId()+"_data_operation");
|
|
|
dataOperationRole.setRoleSort(3);
|
|
dataOperationRole.setRoleSort(3);
|
|
|
dataOperationRole.setDataScope("1"); // 全部数据权限
|
|
dataOperationRole.setDataScope("1"); // 全部数据权限
|
|
|
dataOperationRole.setStatus("0");
|
|
dataOperationRole.setStatus("0");
|
|
|
try {
|
|
try {
|
|
|
- String json = configService.selectConfigByKey("companymenu.config");
|
|
|
|
|
|
|
+ String json = configService.selectConfigByKey("dataoperationmenuconfig");
|
|
|
if (StringUtils.isNotEmpty(json) && !json.equals("")) {
|
|
if (StringUtils.isNotEmpty(json) && !json.equals("")) {
|
|
|
CompanyMenuConfig config = JSONUtil.toBean(json, CompanyMenuConfig.class);
|
|
CompanyMenuConfig config = JSONUtil.toBean(json, CompanyMenuConfig.class);
|
|
|
dataOperationRole.setMenuIds(config.getMenuIds());
|
|
dataOperationRole.setMenuIds(config.getMenuIds());
|
|
@@ -353,7 +353,7 @@ public class CompanyServiceImpl implements ICompanyService
|
|
|
roleService.insertDefaultRole(dataOperationRole);
|
|
roleService.insertDefaultRole(dataOperationRole);
|
|
|
}
|
|
}
|
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
|
- logger.error("获取菜单配置失败-数据运营", e);
|
|
|
|
|
|
|
+ logger.error("获取菜单配置失败-数据运维", e);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// 4. 创建销售角色(个人数据权限)
|
|
// 4. 创建销售角色(个人数据权限)
|
|
@@ -365,7 +365,7 @@ public class CompanyServiceImpl implements ICompanyService
|
|
|
salesRole.setDataScope("5"); // 个人数据权限
|
|
salesRole.setDataScope("5"); // 个人数据权限
|
|
|
salesRole.setStatus("0");
|
|
salesRole.setStatus("0");
|
|
|
try {
|
|
try {
|
|
|
- String json = configService.selectConfigByKey("companymenu.config");
|
|
|
|
|
|
|
+ String json = configService.selectConfigByKey("companymenuconfig");
|
|
|
if (StringUtils.isNotEmpty(json) && !json.equals("")) {
|
|
if (StringUtils.isNotEmpty(json) && !json.equals("")) {
|
|
|
CompanyMenuConfig config = JSONUtil.toBean(json, CompanyMenuConfig.class);
|
|
CompanyMenuConfig config = JSONUtil.toBean(json, CompanyMenuConfig.class);
|
|
|
salesRole.setMenuIds(config.getMenuIds());
|
|
salesRole.setMenuIds(config.getMenuIds());
|