|
@@ -52,12 +52,12 @@ public class AppmanageServiceImpl implements AppmanageService {
|
|
|
private ISysUserRoleService sysUserRoleService;
|
|
|
|
|
|
// 给角色授权用
|
|
|
- @Autowired
|
|
|
- private ISysRolePermissionService sysRolePermissionService;
|
|
|
-
|
|
|
- // 给用户授权用
|
|
|
- @Autowired
|
|
|
- private ISysUserPermissionService sysUserPermissionService;
|
|
|
+// @Autowired
|
|
|
+// private ISysRolePermissionService sysRolePermissionService;
|
|
|
+//
|
|
|
+// // 给用户授权用
|
|
|
+// @Autowired
|
|
|
+// private ISysUserPermissionService sysUserPermissionService;
|
|
|
|
|
|
// 添加菜单用
|
|
|
@Autowired
|
|
@@ -682,24 +682,24 @@ public class AppmanageServiceImpl implements AppmanageService {
|
|
|
}
|
|
|
|
|
|
// 创建该应用的一级菜单
|
|
|
- SysPermission hassysPermission = customMapper.queryUrlByUrl(baseInfoInFlow.getMenuInfo());
|
|
|
- if (hassysPermission == null){
|
|
|
- SysPermission sysPermission = new SysPermission();
|
|
|
- sysPermission.setName(baseInfoInFlow.getName());
|
|
|
- sysPermission.setAppId(appid);
|
|
|
- sysPermission.setUrl(baseInfoInFlow.getMenuInfo());
|
|
|
- // 设置组件(即 菜单路径去掉第一个 "/")
|
|
|
- String component = sysPermission.getUrl().replaceFirst("^/", "");
|
|
|
- sysPermission.setComponent(component);
|
|
|
- sysPermission.setMenuType(0);
|
|
|
- sysPermission.setRoute(true);
|
|
|
- sysPermissionService.addPermission(sysPermission);
|
|
|
- AfterCheckSaveUserPermission(baseInfoInFlow, sysPermission.getId());
|
|
|
-// sysRolePermissionService.saveRolePermission(roleid, sysPermission.getId());
|
|
|
- }else {
|
|
|
- AfterCheckSaveUserPermission(baseInfoInFlow, hassysPermission.getId());
|
|
|
-// sysRolePermissionService.saveRolePermission(roleid, hassysPermission.getId());
|
|
|
- }
|
|
|
+// SysPermission hassysPermission = customMapper.queryUrlByUrl(baseInfoInFlow.getMenuInfo());
|
|
|
+// if (hassysPermission == null){
|
|
|
+// SysPermission sysPermission = new SysPermission();
|
|
|
+// sysPermission.setName(baseInfoInFlow.getName());
|
|
|
+// sysPermission.setAppId(appid);
|
|
|
+// sysPermission.setUrl(baseInfoInFlow.getMenuInfo());
|
|
|
+// // 设置组件(即 菜单路径去掉第一个 "/")
|
|
|
+// String component = sysPermission.getUrl().replaceFirst("^/", "");
|
|
|
+// sysPermission.setComponent(component);
|
|
|
+// sysPermission.setMenuType(0);
|
|
|
+// sysPermission.setRoute(true);
|
|
|
+// sysPermissionService.addPermission(sysPermission);
|
|
|
+// AfterCheckSaveUserPermission(baseInfoInFlow, sysPermission.getId());
|
|
|
+//// sysRolePermissionService.saveRolePermission(roleid, sysPermission.getId());
|
|
|
+// }else {
|
|
|
+// AfterCheckSaveUserPermission(baseInfoInFlow, hassysPermission.getId());
|
|
|
+//// sysRolePermissionService.saveRolePermission(roleid, hassysPermission.getId());
|
|
|
+// }
|
|
|
}else { // 简易注册需执行的操作
|
|
|
appid = baseInfoInFlow.getId();
|
|
|
}
|
|
@@ -730,21 +730,21 @@ public class AppmanageServiceImpl implements AppmanageService {
|
|
|
sysBaseApi.sendTemplateAnnouncement(message);
|
|
|
}
|
|
|
|
|
|
- // 授予应用相关用户(管理员 开发负责人 运维负责人等)访问应用一级菜单权限
|
|
|
- private void AfterCheckSaveUserPermission(AppBaseInfo appBaseInfo, String permissionid){
|
|
|
- sysUserPermissionService.save(getSysUserPermission(appBaseInfo.getAdmin(), permissionid));
|
|
|
- if (!Objects.equals(appBaseInfo.getBusinessUser(), "")){} sysUserPermissionService.save(getSysUserPermission(appBaseInfo.getBusinessUser(), permissionid));
|
|
|
- if (!Objects.equals(appBaseInfo.getDevelopUser(), "")) sysUserPermissionService.save(getSysUserPermission(appBaseInfo.getDevelopUser(), permissionid));
|
|
|
- if (!Objects.equals(appBaseInfo.getRequirementUser(), "")) sysUserPermissionService.save(getSysUserPermission(appBaseInfo.getBusinessUser(), permissionid));
|
|
|
- }
|
|
|
-
|
|
|
- private SysUserPermission getSysUserPermission(String username, String permissionId) {
|
|
|
- String userId = customMapper.queryUserIdByUsername(username);
|
|
|
- SysUserPermission sysUserPermission = new SysUserPermission();
|
|
|
- sysUserPermission.setUserId(userId);
|
|
|
- sysUserPermission.setPermissionId(permissionId);
|
|
|
- return sysUserPermission;
|
|
|
- }
|
|
|
+// // 授予应用相关用户(管理员 开发负责人 运维负责人等)访问应用一级菜单权限
|
|
|
+// private void AfterCheckSaveUserPermission(AppBaseInfo appBaseInfo, String permissionid){
|
|
|
+// sysUserPermissionService.save(getSysUserPermission(appBaseInfo.getAdmin(), permissionid));
|
|
|
+// if (!Objects.equals(appBaseInfo.getBusinessUser(), "")){} sysUserPermissionService.save(getSysUserPermission(appBaseInfo.getBusinessUser(), permissionid));
|
|
|
+// if (!Objects.equals(appBaseInfo.getDevelopUser(), "")) sysUserPermissionService.save(getSysUserPermission(appBaseInfo.getDevelopUser(), permissionid));
|
|
|
+// if (!Objects.equals(appBaseInfo.getRequirementUser(), "")) sysUserPermissionService.save(getSysUserPermission(appBaseInfo.getBusinessUser(), permissionid));
|
|
|
+// }
|
|
|
+
|
|
|
+// private SysUserPermission getSysUserPermission(String username, String permissionId) {
|
|
|
+// String userId = customMapper.queryUserIdByUsername(username);
|
|
|
+// SysUserPermission sysUserPermission = new SysUserPermission();
|
|
|
+// sysUserPermission.setUserId(userId);
|
|
|
+// sysUserPermission.setPermissionId(permissionId);
|
|
|
+// return sysUserPermission;
|
|
|
+// }
|
|
|
|
|
|
// 应用注册 撤销后续处理(删除插入的数据)
|
|
|
@Override
|
|
@@ -765,4 +765,12 @@ public class AppmanageServiceImpl implements AppmanageService {
|
|
|
Integer i = customMapper.checkAppNameIsExist(appName);
|
|
|
return i!= null;
|
|
|
}
|
|
|
+
|
|
|
+ public String AppNameIsExistByEdit(String appid){
|
|
|
+ return customMapper.queryAppNameByAppid(appid);
|
|
|
+ }
|
|
|
+
|
|
|
+// public String AppMenuIsExistByEdit(String appid){
|
|
|
+// return customMapper.queryMenuInfoByAppid(appid);
|
|
|
+// }
|
|
|
}
|