Commit 5dbe09f0 by s_guodong

update运行时

parent f2150d88
......@@ -1968,7 +1968,7 @@ public class Sysmod extends AbstractModule{
this.getDztlog().setOwnref( ownref);//业务申请号
this.getDztlog().setLsh( "");
this.getDztlog().setSta( "0");//状态
//this.getDztlog().setOprdet( Platform.getServerName());
this.getDztlog().setOprdet( MdaUtils.getServerName());
if (MdaUtils.isEmpty(this.getDztlog().getOwnref()))
{
......
package com.brilliance.mda.runtime.mda;
import java.net.InetAddress;
/**
* @Description
* @Author s_guodong
* @Date 2023/6/5
*/
public class CacheOption
{
public long cacheTimeout;
public boolean paging;
public CacheOption(long cacheTimeout) {
this(cacheTimeout, false);
}
public CacheOption(boolean paging) {
this(0L, paging);
}
public CacheOption(long cacheTimeout, boolean paging) {
this.cacheTimeout = cacheTimeout;
this.paging = paging;
}
}
......@@ -22,10 +22,13 @@ import org.apache.poi.ss.usermodel.*;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.util.StringUtils;
import java.io.*;
import java.math.BigDecimal;
import java.net.InetAddress;
import java.net.URLEncoder;
import java.net.UnknownHostException;
import java.nio.charset.Charset;
import java.sql.Timestamp;
import java.text.DecimalFormat;
......@@ -1542,4 +1545,19 @@ public class MdaUtils {
return true;
}
public static String getServerName() {
InetAddress addr = null;
try {
addr = InetAddress.getLocalHost();
} catch (UnknownHostException e) {
}
String hostAddr = addr.getHostAddress(); // 获取IP地址
String hostName = addr.getHostName(); // 获取本地机器名
if (StringUtils.isEmpty(hostName)) {
return hostAddr;
}
return hostName;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment