打包工具自定义日期格式
parent
81f02278de
commit
13069894aa
|
@ -1,18 +1,14 @@
|
||||||
package weaver.xuanran.wang.cssc.cms.service.impl;
|
package weaver.xuanran.wang.cssc.cms.service.impl;
|
||||||
|
|
||||||
import aiyh.utils.Util;
|
import aiyh.utils.Util;
|
||||||
import aiyh.utils.excention.CustomerException;
|
|
||||||
import com.alibaba.fastjson.JSON;
|
import com.alibaba.fastjson.JSON;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
|
||||||
import org.apache.commons.collections.CollectionUtils;
|
import org.apache.commons.collections.CollectionUtils;
|
||||||
import org.apache.commons.collections.MapUtils;
|
import org.apache.commons.collections.MapUtils;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.apache.log4j.Logger;
|
import org.apache.log4j.Logger;
|
||||||
import sun.security.krb5.internal.PAData;
|
|
||||||
import weaver.conn.RecordSet;
|
import weaver.conn.RecordSet;
|
||||||
import weaver.conn.RecordSetTrans;
|
import weaver.conn.RecordSetTrans;
|
||||||
import weaver.cssc.workflow.voucher.util.InterfaceLoggerDao;
|
import weaver.cssc.workflow.voucher.util.InterfaceLoggerDao;
|
||||||
import weaver.cssc.workflow.voucher.util.VoucherConstants;
|
|
||||||
import weaver.general.TimeUtil;
|
import weaver.general.TimeUtil;
|
||||||
import weaver.soa.workflow.request.RequestInfo;
|
import weaver.soa.workflow.request.RequestInfo;
|
||||||
import weaver.xiao.commons.config.entity.RequestMappingConfig;
|
import weaver.xiao.commons.config.entity.RequestMappingConfig;
|
||||||
|
|
|
@ -80,7 +80,7 @@ public class BuilderPackageEcology extends Application {
|
||||||
buttonBox.setPadding(new Insets(10));
|
buttonBox.setPadding(new Insets(10));
|
||||||
buttonBox.setAlignment(Pos.CENTER_RIGHT);
|
buttonBox.setAlignment(Pos.CENTER_RIGHT);
|
||||||
Map<String, String> param = new HashMap<>(8);
|
Map<String, String> param = new HashMap<>(8);
|
||||||
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMdd");
|
SimpleDateFormat simpleDateFormat = new SimpleDateFormat(FileTreeBuilder.cusDateFormat);
|
||||||
Date date = new Date();
|
Date date = new Date();
|
||||||
param.put("date", simpleDateFormat.format(date));
|
param.put("date", simpleDateFormat.format(date));
|
||||||
Button button = new Button("生成升级包");
|
Button button = new Button("生成升级包");
|
||||||
|
|
|
@ -2,6 +2,8 @@ package builderpackage;
|
||||||
|
|
||||||
import aiyh.utils.excention.CustomerException;
|
import aiyh.utils.excention.CustomerException;
|
||||||
import aiyh.utils.tool.cn.hutool.core.util.StrUtil;
|
import aiyh.utils.tool.cn.hutool.core.util.StrUtil;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
import weaver.common.util.string.StringUtil;
|
||||||
|
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
|
@ -20,6 +22,8 @@ public class FileTreeBuilder {
|
||||||
|
|
||||||
public static String defaultDir;
|
public static String defaultDir;
|
||||||
|
|
||||||
|
public static String cusDateFormat;
|
||||||
|
|
||||||
public static FileInfo buildFileTree() {
|
public static FileInfo buildFileTree() {
|
||||||
String directoryPath = "target";
|
String directoryPath = "target";
|
||||||
String classRootPath = "";
|
String classRootPath = "";
|
||||||
|
@ -50,6 +54,10 @@ public class FileTreeBuilder {
|
||||||
classPath = classRootPath;
|
classPath = classRootPath;
|
||||||
zipDefaultName = properties.getProperty("zipDefaultName");
|
zipDefaultName = properties.getProperty("zipDefaultName");
|
||||||
defaultDir = properties.getProperty("defaultDir");
|
defaultDir = properties.getProperty("defaultDir");
|
||||||
|
cusDateFormat = properties.getProperty("cusDateFormat");
|
||||||
|
if(StrUtil.isBlank(cusDateFormat)){
|
||||||
|
cusDateFormat = "yyyyMMdd";
|
||||||
|
}
|
||||||
List<String> blacklistPrefixes = Arrays.asList(
|
List<String> blacklistPrefixes = Arrays.asList(
|
||||||
directoryPath + "generated-sources",
|
directoryPath + "generated-sources",
|
||||||
directoryPath + "generated-test-sources",
|
directoryPath + "generated-test-sources",
|
||||||
|
|
Loading…
Reference in New Issue