feat():更新
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package com.fizz.business.form;
|
||||
|
||||
import cn.hutool.core.date.DatePattern;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
@@ -17,11 +18,11 @@ public class LogDataForm implements Serializable {
|
||||
* 开始时间
|
||||
*/
|
||||
@ApiModelProperty(value = "开始时间")
|
||||
@DateTimeFormat(pattern = DatePattern.NORM_DATETIME_PATTERN)
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime startTime;
|
||||
|
||||
@ApiModelProperty(value = "结束时间")
|
||||
@DateTimeFormat(pattern = DatePattern.NORM_DATETIME_PATTERN)
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime endTime;
|
||||
|
||||
@ApiModelProperty(value = "报警类型")
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package com.fizz.business.mq.RabbitMQ;
|
||||
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.fizz.business.constants.enums.WsTypeEnum;
|
||||
import com.fizz.business.utils.WebSocketUtil;
|
||||
import lombok.extern.log4j.Log4j2;
|
||||
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
|
||||
import org.springframework.amqp.rabbit.annotation.RabbitListener;
|
||||
@@ -15,5 +17,6 @@ public class RabbitQueueListener {
|
||||
log.info("消费端ProcData: " + message);
|
||||
|
||||
//socket
|
||||
WebSocketUtil.sendMessage(WsTypeEnum.track_measure,message);
|
||||
}
|
||||
}
|
||||
@@ -41,8 +41,8 @@ public class LogDataServiceImpl extends ServiceImpl<LogDataMapper, LogData> impl
|
||||
lambdaQuery.ge(LogData::getTimestamp, start);
|
||||
}
|
||||
if(ObjectUtil.isNotEmpty(logDataForm.getEndTime())){
|
||||
LocalDateTime end = LocalDateTime.of(logDataForm.getStartTime().toLocalDate(), LocalTime.MAX);
|
||||
lambdaQuery.ge(LogData::getTimestamp, end);
|
||||
LocalDateTime end = LocalDateTime.of(logDataForm.getEndTime().toLocalDate(), LocalTime.MAX);
|
||||
lambdaQuery.le(LogData::getTimestamp, end);
|
||||
}
|
||||
|
||||
if (StringUtils.isNotBlank(logDataForm.getLogtype())) {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.fizz.business.service.impl;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.fizz.business.constants.CommonConstants;
|
||||
@@ -266,8 +267,10 @@ public class RollDataServiceImpl extends ServiceImpl<RollDataMapper, RollData> i
|
||||
.setContentType(MessageProperties.CONTENT_TYPE_TEXT_PLAIN)
|
||||
.setMessageId("ROLL_CHANGE")
|
||||
.build();
|
||||
rabbitTemplate.send(CommonConstants.RabbitMQ.SEND_MODEL,new Message("ROLL_CHANGE".getBytes(StandardCharsets.UTF_8),props));
|
||||
|
||||
JSONObject msg = new JSONObject();
|
||||
msg.put("data","ROLL_CHANGE");
|
||||
rabbitTemplate.send(CommonConstants.RabbitMQ.SEND_MODEL,new Message(JSONObject.toJSONString(msg).getBytes(StandardCharsets.UTF_8),props));
|
||||
|
||||
return getOnlineRollList();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user