pal 小组缓存更新方法提交
This commit is contained in:
parent
3a2e463942
commit
19b5d9bd07
@ -482,6 +482,7 @@ public class CoeCooperationAPIManager {
|
||||
}
|
||||
}
|
||||
if (addToRolePerm) {
|
||||
//Todo: 根据权限转化新建文件权限
|
||||
CoeCooperationMemberModel memberModel = new CoeCooperationMemberDao().getModelByTeamUser(teamId, userId);
|
||||
String roleId = memberModel.getRoleId();
|
||||
CoeCooperationRoleModel roleModel = new CoeCooperationRoleDao().getInstance(roleId);
|
||||
@ -615,9 +616,9 @@ public class CoeCooperationAPIManager {
|
||||
havingBatchPerm = userOperatePermission.contains(CoeCooperationConst.ACTION_BATCH);
|
||||
}
|
||||
|
||||
ro.put("isOlderVersion", !isOlderVersion);// 新增、修改权限
|
||||
ro.put("havingCreatePerm", havingCreatePerm);// 新增、修改权限
|
||||
ro.put("havingBatchPerm", havingBatchPerm);// 删除权限
|
||||
ro.put("isOlderVersion", !isOlderVersion);//
|
||||
ro.put("havingCreatePerm", havingCreatePerm);// 新增流程权限
|
||||
ro.put("havingBatchPerm", havingBatchPerm);// 批量操作
|
||||
Set<String> dataVisitablePermission = CooperationCache.getUserDataVisitablePermission(teamId, userId,true);
|
||||
validUserPermDataCount = dataVisitablePermission != null ? dataVisitablePermission.size() : 0;
|
||||
ro.put("validUserPermDataCount", validUserPermDataCount);
|
||||
@ -761,18 +762,24 @@ public class CoeCooperationAPIManager {
|
||||
|
||||
List<CoeCooperationTeamModel> allTeam = new CoeCooperationTeamDao().getAllTeam();
|
||||
for (CoeCooperationTeamModel teamModel : allTeam) {
|
||||
TeamInfo teamInfo = new TeamInfo();
|
||||
teamInfo.setTeamId(teamModel.getId());
|
||||
List<UserInfo> userInfos = this.getUserInfoByTeamId(teamModel.getId());
|
||||
teamInfo.setUsers(userInfos);
|
||||
|
||||
List<String> permVerIds = new CoeCooperationTeamPermDao().getCooperationTeamPermVerIds(teamModel.getId());
|
||||
teamInfo.getVersionIds().addAll(permVerIds);
|
||||
|
||||
TeamInfo teamInfo = this.getTeamInfo(teamModel.getId());
|
||||
list.add(teamInfo);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
public TeamInfo getTeamInfo(String teamId){
|
||||
TeamInfo teamInfo = new TeamInfo();
|
||||
if (StringUtils.isEmpty(teamId)){
|
||||
return teamInfo;
|
||||
}
|
||||
teamInfo.setTeamId(teamId);
|
||||
List<UserInfo> userInfos = this.getUserInfoByTeamId(teamId);
|
||||
teamInfo.setUsers(userInfos);
|
||||
|
||||
List<String> permVerIds = new CoeCooperationTeamPermDao().getCooperationTeamPermVerIds(teamId);
|
||||
teamInfo.getVersionIds().addAll(permVerIds);
|
||||
return teamInfo;
|
||||
}
|
||||
|
||||
public List<UserInfo> getUserInfoByTeamId(String teamId){
|
||||
List<UserInfo> list = new ArrayList<>();
|
||||
|
||||
@ -6,6 +6,8 @@ import com.actionsoft.apps.coe.pal.cooperation.CoeCooperationAPIManager;
|
||||
import com.actionsoft.apps.coe.pal.cooperation.cache.model.TeamInfo;
|
||||
import com.actionsoft.apps.coe.pal.cooperation.cache.model.UserInfo;
|
||||
import com.actionsoft.apps.coe.pal.cooperation.constant.CoeCooperationConst;
|
||||
import com.actionsoft.apps.coe.pal.cooperation.dao.CoeCooperationMemberDao;
|
||||
import com.actionsoft.apps.coe.pal.cooperation.model.CoeCooperationMemberModel;
|
||||
import com.actionsoft.apps.coe.pal.pal.repository.cache.PALRepositoryCache;
|
||||
import com.actionsoft.apps.coe.pal.pal.repository.model.PALRepositoryModel;
|
||||
import com.actionsoft.apps.resource.plugin.profile.CachePluginProfile;
|
||||
@ -197,6 +199,12 @@ public class CooperationCache extends Cache<String, TeamInfo> {
|
||||
}
|
||||
|
||||
|
||||
public static void updateTeamInfo(String teamId){
|
||||
TeamInfo teamInfo = CoeCooperationAPIManager.getInstance().getTeamInfo(teamId);
|
||||
getCache().put(teamId,teamInfo);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user