|
@@ -62,6 +62,12 @@ public class SimulationMapServiceImpl implements SimulationMapService {
|
|
|
@Override
|
|
|
@SneakyThrows
|
|
|
public ResponseBodyVO<PageInfo<SimulationMapVO>> selectMultiSimulationMap(SimulationMapParam param){
|
|
|
+ String currentUserId = AuthUtil.getCurrentUserId();
|
|
|
+ if (StringUtils.isBlank(currentUserId)){
|
|
|
+ return new ResponseBodyVO<>(ResponseBodyVO.Response.CLIENT_FAILURE, "当前角色为空");
|
|
|
+ }
|
|
|
+ param.setProjectUserId(currentUserId);
|
|
|
+
|
|
|
if (Objects.isNull(param.getPageNum())){
|
|
|
param.setPageNum(1);
|
|
|
}
|
|
@@ -83,6 +89,11 @@ public class SimulationMapServiceImpl implements SimulationMapService {
|
|
|
@Override
|
|
|
@SneakyThrows
|
|
|
public ResponseBodyVO<List<SimulationMapVO>> selectAllSimulationMapList(SimulationMapParam param){
|
|
|
+ String currentUserId = AuthUtil.getCurrentUserId();
|
|
|
+ if (StringUtils.isBlank(currentUserId)){
|
|
|
+ return new ResponseBodyVO<>(ResponseBodyVO.Response.CLIENT_FAILURE, "当前角色为空");
|
|
|
+ }
|
|
|
+ param.setProjectUserId(currentUserId);
|
|
|
List<SimulationMapVO> simulationMapVOS = mapMapper.selectSimulationMapList(param);
|
|
|
return new ResponseBodyVO<>(ResponseBodyVO.Response.SUCCESS, simulationMapVOS);
|
|
|
}
|
|
@@ -186,6 +197,12 @@ public class SimulationMapServiceImpl implements SimulationMapService {
|
|
|
if (!StringUtils.equals(DictConstants.ROLE_CODE_ADMIN, currentUserRoleCode) && !StringUtils.equals(DictConstants.ROLE_CODE_SYSADMIN, currentUserRoleCode)){
|
|
|
return new ResponseBodyVO<>(ResponseBodyVO.Response.CLIENT_FAILURE, "当前用户无该权限");
|
|
|
}
|
|
|
+ String currentUserId = AuthUtil.getCurrentUserId();
|
|
|
+ if (StringUtils.isBlank(currentUserId)){
|
|
|
+ return new ResponseBodyVO<>(ResponseBodyVO.Response.CLIENT_FAILURE, "当前角色为空");
|
|
|
+ }
|
|
|
+ param.setProjectUserId(currentUserId);
|
|
|
+
|
|
|
String mapName = param.getMapName();
|
|
|
String mapJson = new String(fileJson.getBytes(), StandardCharsets.UTF_8);
|
|
|
if (StringUtils.isBlank(mapJson) || param.getPathNum() == null || StringUtils.isBlank(mapName)){
|
|
@@ -223,6 +240,7 @@ public class SimulationMapServiceImpl implements SimulationMapService {
|
|
|
|
|
|
SimulationMapPO simulationMapPO = new SimulationMapPO();
|
|
|
simulationMapPO.setMapPath(mapUrl).setMapOsgbPath(osMinioUrl).setMapName(param.getMapName()).setMapDescription(param.getMapDescription())
|
|
|
+ .setProjectUserId(param.getProjectUserId())
|
|
|
.setMapJson(object.toJSONString()).setPathNum(param.getPathNum()).setMapCode("").setId(StringUtil.getRandomUUID());
|
|
|
int i = mapMapper.addSimulationMap(simulationMapPO);
|
|
|
if (i <= 0){
|