【创建仿真时,项目为空默认处理;调度台设备为空处理;】

This commit is contained in:
weizhihong 2022-09-23 17:14:39 +08:00
parent 6178310259
commit c1f81a6fdf
2 changed files with 4 additions and 3 deletions

View File

@ -114,7 +114,7 @@ public class Project {
@JsonIgnore
public static boolean isDefault(String code) {
return DEFAULT_PROJECT_LABEL.contains(code);
return StringUtils.isEmpty(code) || DEFAULT_PROJECT_LABEL.contains(code);
}
/**

View File

@ -13,6 +13,7 @@ import club.joylink.rtss.websocket.StompMessageService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Set;
import java.util.stream.Collectors;
@ -33,7 +34,7 @@ public class DisCmdSendService {
*/
public void autoSendUnread(Simulation simulation, String userId) {
SimulationMember member = simulation.querySimulationMemberByUserId(userId);
if (null == member) return;
if (null == member || member.getDevice() == null) return;
DisCmdDb db = commonService.getCmdDb(simulation);
try {
db.lock();