Merge branch 'test-training2' of https://git.code.tencent.com/lian-cbtc/rtss-server into test-training2-zhouyin
This commit is contained in:
commit
f6dd8e7a42
@ -776,15 +776,24 @@ public class GroupSimulationServiceImpl implements GroupSimulationService {
|
||||
// .assertTrue(simulation.isJointSimulation());
|
||||
// 是否已经获取权限
|
||||
SimulationUser existSimulationUser = simulation.querySimulationUserById(user.getId().toString());
|
||||
BusinessExceptionAssertEnum.SIMULATION_PERMISSION_ALREADY_GET
|
||||
.assertNull(existSimulationUser);
|
||||
// 用户联机的时候用户直接关闭浏览器,二次联机的时候无法进入的问题 begin
|
||||
// BusinessExceptionAssertEnum.SIMULATION_PERMISSION_ALREADY_GET.assertNull(existSimulationUser);
|
||||
// 检查是否还有权限可以使用
|
||||
|
||||
// 获取权限,成为仿真用户
|
||||
SimulationUser simulationUser = new SimulationUser(simulation, user);
|
||||
simulation.addSimulationUser(simulationUser);
|
||||
SimulationUserEnterEvent userEnterEvent = new SimulationUserEnterEvent(this, simulation, simulationUser);
|
||||
this.applicationContext.publishEvent(userEnterEvent);
|
||||
// SimulationUser simulationUser = new SimulationUser(simulation, user);
|
||||
// simulation.addSimulationUser(simulationUser);
|
||||
// SimulationUserEnterEvent userEnterEvent = new SimulationUserEnterEvent(this, simulation, simulationUser);
|
||||
// this.applicationContext.publishEvent(userEnterEvent);
|
||||
SimulationUserEnterEvent userEnterEvent;
|
||||
if(Objects.isNull(existSimulationUser)){
|
||||
SimulationUser simulationUser = new SimulationUser(simulation, user);
|
||||
simulation.addSimulationUser(simulationUser);
|
||||
userEnterEvent = new SimulationUserEnterEvent(this, simulation, simulationUser);
|
||||
}else{
|
||||
userEnterEvent = new SimulationUserEnterEvent(this, simulation, existSimulationUser);
|
||||
}
|
||||
this.applicationContext.publishEvent(userEnterEvent);
|
||||
// 用户联机的时候用户直接关闭浏览器,二次联机的时候无法进入的问题 end
|
||||
return SimulationVO.buildBasicInfo(simulation);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user