Merge remote-tracking branch 'origin/fix-bug-202303' into fix-bug-202303

This commit is contained in:
梁琦涛
2023-03-10 15:04:02 +08:00
2 changed files with 4 additions and 4 deletions
@@ -29,8 +29,8 @@ public class JobAlarmer implements ApplicationContextAware, InitializingBean {
@Override
public void afterPropertiesSet() throws Exception {
Map<String, JobAlarm> serviceBeanMap = applicationContext.getBeansOfType(JobAlarm.class);
if (serviceBeanMap != null && serviceBeanMap.size() > 0) {
jobAlarmList = new ArrayList<JobAlarm>(serviceBeanMap.values());
if (!serviceBeanMap.isEmpty()) {
jobAlarmList = new ArrayList<>(serviceBeanMap.values());
}
}
@@ -44,7 +44,7 @@ public class JobAlarmer implements ApplicationContextAware, InitializingBean {
public boolean alarm(XxlJobInfo info, XxlJobLog jobLog) {
boolean result = false;
if (jobAlarmList!=null && jobAlarmList.size()>0) {
if (jobAlarmList!=null && !jobAlarmList.isEmpty()) {
result = true; // success means all-success
for (JobAlarm alarm: jobAlarmList) {
boolean resultItem = false;
@@ -198,7 +198,7 @@ export default {
initWebSocket: function () {
// WebSocket与普通的请求所用协议有所不同,ws等同于http,wss等同于https
const userId = store.getters.userInfo.id
const url = window._CONFIG.domianWebSocketURL.replace('https://', 'wss://').replace('http://', 'ws://') + '/websocket/' + userId
const url = window._CONFIG.domianWebSocketURL.replace('https://', 'wss://').replace('http://', 'ws://') + '/jero-boot/websocket/' + userId
// console.log(url);
this.websock = new WebSocket(url)
this.websock.onopen = this.websocketOnopen