mirror of
https://github.com/didi/KnowStreaming.git
synced 2025-12-24 11:52:08 +08:00
将tomcat版本升级为8.5.72 & "我的审批"列表增加"通过时间"列,并支持按该列排序 & JMX连接关闭问题修复
This commit is contained in:
@@ -27,8 +27,11 @@ public class OrderVO {
|
||||
@ApiModelProperty(value = "工单状态, 0:待审批, 1:通过, 2:拒绝, 3:取消")
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty(value = "申请/审核时间")
|
||||
private Date gmtTime;
|
||||
@ApiModelProperty(value = "申请时间")
|
||||
private Date gmtCreate;
|
||||
|
||||
@ApiModelProperty(value = "审核时间")
|
||||
private Date gmtHandle;
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
@@ -70,12 +73,20 @@ public class OrderVO {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public Date getGmtTime() {
|
||||
return gmtTime;
|
||||
public Date getGmtCreate() {
|
||||
return gmtCreate;
|
||||
}
|
||||
|
||||
public void setGmtTime(Date gmtTime) {
|
||||
this.gmtTime = gmtTime;
|
||||
public void setGmtCreate(Date gmtCreate) {
|
||||
this.gmtCreate = gmtCreate;
|
||||
}
|
||||
|
||||
public Date getGmtHandle() {
|
||||
return gmtHandle;
|
||||
}
|
||||
|
||||
public void setGmtHandle(Date gmtHandle) {
|
||||
this.gmtHandle = gmtHandle;
|
||||
}
|
||||
|
||||
public String getApplicant() {
|
||||
@@ -95,7 +106,7 @@ public class OrderVO {
|
||||
", applicant='" + applicant + '\'' +
|
||||
", description='" + description + '\'' +
|
||||
", status=" + status +
|
||||
", gmtTime=" + gmtTime +
|
||||
", gmtTime=" + gmtCreate +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.xiaojukeji.kafka.manager.common.utils;
|
||||
|
||||
public class BackoffUtils {
|
||||
private BackoffUtils() {
|
||||
}
|
||||
|
||||
public static void backoff(long timeUnitMs) {
|
||||
if (timeUnitMs <= 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
Thread.sleep(timeUnitMs);
|
||||
} catch (InterruptedException e) {
|
||||
Thread.currentThread().interrupt();
|
||||
} catch (Exception e) {
|
||||
// ignore
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.xiaojukeji.kafka.manager.common.utils.jmx;
|
||||
|
||||
import com.xiaojukeji.kafka.manager.common.utils.BackoffUtils;
|
||||
import com.xiaojukeji.kafka.manager.common.utils.ValidateUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
@@ -146,18 +147,16 @@ public class JmxConnectorWrap {
|
||||
long now = System.currentTimeMillis();
|
||||
while (true) {
|
||||
try {
|
||||
if (System.currentTimeMillis() - now > 60000) {
|
||||
break;
|
||||
}
|
||||
int num = atomicInteger.get();
|
||||
if (num <= 0) {
|
||||
Thread.sleep(2);
|
||||
continue;
|
||||
BackoffUtils.backoff(2);
|
||||
}
|
||||
if (atomicInteger.compareAndSet(num, num - 1)) {
|
||||
|
||||
if (atomicInteger.compareAndSet(num, num - 1) || System.currentTimeMillis() - now > 6000) {
|
||||
break;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
// ignore
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<springframework.boot.version>2.1.1.RELEASE</springframework.boot.version>
|
||||
<spring-version>5.1.3.RELEASE</spring-version>
|
||||
<failOnMissingWebXml>false</failOnMissingWebXml>
|
||||
<tomcat.version>8.5.66</tomcat.version>
|
||||
<tomcat.version>8.5.72</tomcat.version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
|
||||
@@ -41,7 +41,8 @@ public class OrderConverter {
|
||||
}
|
||||
OrderVO orderVO = new OrderVO();
|
||||
CopyUtils.copyProperties(orderVO, orderDO);
|
||||
orderVO.setGmtTime(orderDO.getGmtCreate());
|
||||
orderVO.setGmtCreate(orderDO.getGmtCreate());
|
||||
orderVO.setGmtHandle(orderDO.getGmtHandle());
|
||||
return orderVO;
|
||||
}
|
||||
|
||||
|
||||
2
pom.xml
2
pom.xml
@@ -26,7 +26,7 @@
|
||||
<java_target_version>1.8</java_target_version>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<file_encoding>UTF-8</file_encoding>
|
||||
<tomcat.version>8.5.66</tomcat.version>
|
||||
<tomcat.version>8.5.72</tomcat.version>
|
||||
<maven-assembly-plugin.version>3.0.0</maven-assembly-plugin.version>
|
||||
|
||||
</properties>
|
||||
|
||||
Reference in New Issue
Block a user