权限功能调整
This commit is contained in:
parent
8d74d09d80
commit
1101841879
@ -15,6 +15,7 @@ import club.joylink.rtss.vo.client.mapSystem.RtsMapSystemVO;
|
||||
import club.joylink.rtss.vo.permission.*;
|
||||
import com.github.pagehelper.Page;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.google.common.collect.Lists;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.stereotype.Service;
|
||||
@ -182,10 +183,33 @@ public class SystemAbilityService {
|
||||
this.systemAbilityDAO.insertSelective(null);
|
||||
}else{
|
||||
Map<String,SystemAbility> abilityMap = abilities.stream().collect(Collectors.toMap(k->k.getType() + k.getAbilityId() + k.getMapId(), Function.identity()));
|
||||
Map<String,RtsMapSystemVO> mapSystemMap = voList.stream().collect(Collectors.toMap(k->k.getName() + k.getId() + k.getMapId(), Function.identity()));
|
||||
Map<String,RtsMapSystemVO> mapSystemMap = voList.stream().collect(Collectors.toMap(k->k.getSimType().name() + k.getId() + k.getMapId(), Function.identity()));
|
||||
List<SystemAbility> deleteList = Lists.newArrayList();
|
||||
List<RtsMapSystemVO> saveList = Lists.newArrayList();
|
||||
List<RtsMapSystemVO> updateList = Lists.newArrayList();
|
||||
abilityMap.forEach((k,v)->{
|
||||
if(!mapSystemMap.containsKey(k)){
|
||||
deleteList.add(v);
|
||||
}
|
||||
});
|
||||
mapSystemMap.forEach((k,v)->{
|
||||
|
||||
if(abilityMap.containsKey(k)){
|
||||
updateList.add(v);
|
||||
}else{
|
||||
saveList.add(v);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
private void batchInsert(List<RtsMapSystemVO> list){
|
||||
|
||||
}
|
||||
private void batchUpdate(List<RtsMapSystemVO> list){
|
||||
|
||||
}
|
||||
private void batchDelete(List<SystemAbility> list){
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -16,10 +16,7 @@ public class BasicSystemAbilityVo {
|
||||
*/
|
||||
@NotNull
|
||||
private String name;
|
||||
/**
|
||||
* 权限功能描述
|
||||
*/
|
||||
private String des;
|
||||
|
||||
|
||||
public SystemAbility toSystemAbility(){
|
||||
SystemAbility sa = new SystemAbility();
|
||||
|
Loading…
Reference in New Issue
Block a user