|
|
|
@@ -19,6 +19,7 @@ import com.xueyi.system.emcs.service.IDmExceptionLogService; |
|
|
|
import com.xueyi.system.emcs.service.LogMqttMessageHandler; |
|
|
|
import com.xueyi.system.emcs.service.impl.DmExceptionLogServiceImpl; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.beans.factory.annotation.Value; |
|
|
|
import org.springframework.validation.annotation.Validated; |
|
|
|
import org.springframework.web.bind.annotation.DeleteMapping; |
|
|
|
import org.springframework.web.bind.annotation.GetMapping; |
|
|
|
@@ -54,6 +55,9 @@ public class DmExceptionLogController extends BaseController<DmExceptionLogQuery |
|
|
|
private final static String HEART_MQTT_PREFIX = "digital-man"; |
|
|
|
|
|
|
|
private final static String[] CHART_TYPES = new String[]{"network", "cpu", "memory"}; |
|
|
|
|
|
|
|
@Value("${spring.profiles.active}") |
|
|
|
private String activeProfile; |
|
|
|
@Autowired |
|
|
|
private MqttTemplate mqttTemplate; |
|
|
|
|
|
|
|
@@ -299,7 +303,7 @@ public class DmExceptionLogController extends BaseController<DmExceptionLogQuery |
|
|
|
JSONObject jsonObject = new JSONObject(); |
|
|
|
jsonObject.put("devId", devId); |
|
|
|
|
|
|
|
mqttTemplate.sendToMqtt("/prod/digital_man"+"/"+devId+"/log_upload", jsonObject.toJSONString()); |
|
|
|
mqttTemplate.sendToMqtt("/" + activeProfile + "/digital_man"+"/"+devId+"/log_upload", jsonObject.toJSONString()); |
|
|
|
return success("操作成功"); |
|
|
|
} |
|
|
|
|
|
|
|
|