mirror of
https://github.com/didi/KnowStreaming.git
synced 2026-01-03 11:28:12 +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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user