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:取消")
|
@ApiModelProperty(value = "工单状态, 0:待审批, 1:通过, 2:拒绝, 3:取消")
|
||||||
private Integer status;
|
private Integer status;
|
||||||
|
|
||||||
@ApiModelProperty(value = "申请/审核时间")
|
@ApiModelProperty(value = "申请时间")
|
||||||
private Date gmtTime;
|
private Date gmtCreate;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "审核时间")
|
||||||
|
private Date gmtHandle;
|
||||||
|
|
||||||
public Long getId() {
|
public Long getId() {
|
||||||
return id;
|
return id;
|
||||||
@@ -70,12 +73,20 @@ public class OrderVO {
|
|||||||
this.status = status;
|
this.status = status;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Date getGmtTime() {
|
public Date getGmtCreate() {
|
||||||
return gmtTime;
|
return gmtCreate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setGmtTime(Date gmtTime) {
|
public void setGmtCreate(Date gmtCreate) {
|
||||||
this.gmtTime = gmtTime;
|
this.gmtCreate = gmtCreate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getGmtHandle() {
|
||||||
|
return gmtHandle;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setGmtHandle(Date gmtHandle) {
|
||||||
|
this.gmtHandle = gmtHandle;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getApplicant() {
|
public String getApplicant() {
|
||||||
@@ -95,7 +106,7 @@ public class OrderVO {
|
|||||||
", applicant='" + applicant + '\'' +
|
", applicant='" + applicant + '\'' +
|
||||||
", description='" + description + '\'' +
|
", description='" + description + '\'' +
|
||||||
", status=" + status +
|
", 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;
|
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 com.xiaojukeji.kafka.manager.common.utils.ValidateUtils;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
@@ -146,18 +147,16 @@ public class JmxConnectorWrap {
|
|||||||
long now = System.currentTimeMillis();
|
long now = System.currentTimeMillis();
|
||||||
while (true) {
|
while (true) {
|
||||||
try {
|
try {
|
||||||
if (System.currentTimeMillis() - now > 60000) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
int num = atomicInteger.get();
|
int num = atomicInteger.get();
|
||||||
if (num <= 0) {
|
if (num <= 0) {
|
||||||
Thread.sleep(2);
|
BackoffUtils.backoff(2);
|
||||||
continue;
|
|
||||||
}
|
}
|
||||||
if (atomicInteger.compareAndSet(num, num - 1)) {
|
|
||||||
|
if (atomicInteger.compareAndSet(num, num - 1) || System.currentTimeMillis() - now > 6000) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
// ignore
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
<springframework.boot.version>2.1.1.RELEASE</springframework.boot.version>
|
<springframework.boot.version>2.1.1.RELEASE</springframework.boot.version>
|
||||||
<spring-version>5.1.3.RELEASE</spring-version>
|
<spring-version>5.1.3.RELEASE</spring-version>
|
||||||
<failOnMissingWebXml>false</failOnMissingWebXml>
|
<failOnMissingWebXml>false</failOnMissingWebXml>
|
||||||
<tomcat.version>8.5.66</tomcat.version>
|
<tomcat.version>8.5.72</tomcat.version>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
|||||||
@@ -41,7 +41,8 @@ public class OrderConverter {
|
|||||||
}
|
}
|
||||||
OrderVO orderVO = new OrderVO();
|
OrderVO orderVO = new OrderVO();
|
||||||
CopyUtils.copyProperties(orderVO, orderDO);
|
CopyUtils.copyProperties(orderVO, orderDO);
|
||||||
orderVO.setGmtTime(orderDO.getGmtCreate());
|
orderVO.setGmtCreate(orderDO.getGmtCreate());
|
||||||
|
orderVO.setGmtHandle(orderDO.getGmtHandle());
|
||||||
return orderVO;
|
return orderVO;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
2
pom.xml
2
pom.xml
@@ -26,7 +26,7 @@
|
|||||||
<java_target_version>1.8</java_target_version>
|
<java_target_version>1.8</java_target_version>
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
<file_encoding>UTF-8</file_encoding>
|
<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>
|
<maven-assembly-plugin.version>3.0.0</maven-assembly-plugin.version>
|
||||||
|
|
||||||
</properties>
|
</properties>
|
||||||
|
|||||||
Reference in New Issue
Block a user