Browse Source

CHART-12815 天数不增加的问题

feature/big-screen
白岳 5 years ago
parent
commit
b93b6f2ca6
  1. 2
      designer-base/src/main/java/com/fr/design/mainframe/chart/info/ChartInfo.java
  2. 9
      designer-base/src/main/java/com/fr/design/mainframe/chart/info/ChartInfoCollector.java

2
designer-base/src/main/java/com/fr/design/mainframe/chart/info/ChartInfo.java

@ -57,8 +57,6 @@ public class ChartInfo extends AbstractPointInfo {
private boolean testTemplate;
private int idleDayCount; // 到现在为止,埋点闲置的天数
private ChartInfo() {
}

9
designer-base/src/main/java/com/fr/design/mainframe/chart/info/ChartInfoCollector.java

@ -13,10 +13,9 @@ import com.fr.stable.StableUtils;
import com.fr.stable.StringUtils;
import com.fr.stable.xml.XMLPrintWriter;
import com.fr.stable.xml.XMLableReader;
import com.fr.third.joda.time.DateTime;
import java.io.File;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.HashMap;
import java.util.Map;
@ -36,7 +35,7 @@ public class ChartInfoCollector extends AbstractPointCollector<ChartInfo> {
private Map<String, ChartInfo> chartInfoCacheMap;
private String lastEditDay = StringUtils.EMPTY;
private String lastEditDay;
private ChartInfoCollector() {
init();
@ -186,7 +185,7 @@ public class ChartInfoCollector extends AbstractPointCollector<ChartInfo> {
@Override
protected void addIdleDayCount() {
// 判断今天是否第一次打开设计器,为了防止同一天内,多次 addIdleDayCount
String today = new SimpleDateFormat("yyyy-MM-dd").format(Calendar.getInstance().getTime());
String today = DateTime.now().toString("yyyy-MM-dd");
if (ComparatorUtils.equals(today, lastEditDay)) {
return;
}
@ -201,7 +200,7 @@ public class ChartInfoCollector extends AbstractPointCollector<ChartInfo> {
* 获取缓存文件存放路径
*/
@Override
protected File getInfoFile() {
protected File getInfoFile() {
File file = new File(StableUtils.pathJoin(ProductConstants.getEnvHome(), XML_FILE_NAME));
try {
if (!file.exists()) {

Loading…
Cancel
Save