Commit b69eb932 by zhiwj

修改YYYY为yyyy

parent fff72a63
......@@ -11,7 +11,7 @@ public interface Constants {
Integer STORE_BATCH_IMPORT_TASK_TYPE = 6;
Integer CLERK_BATCH_IMPORT_TASK_TYPE = 8;
String dateformat = "YYYY-MM-dd HH:mm:ss";
String dateformat = "yyyy-MM-dd HH:mm:ss";
// enterprise:store:${enterpriseId}:#{storeId}
String STORE_KEY = "enterprise:store:";
// 小程序默认图片
......
......@@ -7,10 +7,10 @@ package com.gic.store.constant;
* @date 2019/7/2 4:34 PM
*/
public enum StoreFieldDateEnum {
YMD(1, "年月日", "YYYY-MM-dd"),
YM(2, "年月", "YYYY-MM"),
YMD(1, "年月日", "yyyy-MM-dd"),
YM(2, "年月", "yyyy-MM"),
MD(3, "月日", "MM-dd"),
YMDHMS(4, "年月日时分秒", "YYYY-MM-dd HH:mm:ss"),
YMDHMS(4, "年月日时分秒", "yyyy-MM-dd HH:mm:ss"),
Hms(5, "时分秒", "HH:mm:ss");
private int code;
......
......@@ -768,22 +768,22 @@ public class StoreController extends DownloadUtils {
SimpleDateFormat simpleDateFormat = map.get(dateType);
if(simpleDateFormat == null){
if(StoreFieldDateEnum.YMDHMS.getCode() == dateType){
simpleDateFormat = new SimpleDateFormat("YYYY-MM-dd HH:mm:ss");
simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
}
if(StoreFieldDateEnum.YMD.getCode() == dateType){
simpleDateFormat = new SimpleDateFormat("YYYY-MM-dd");
simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
}
if(StoreFieldDateEnum.YM.getCode() == dateType){
simpleDateFormat = new SimpleDateFormat("YYYY-MM");
simpleDateFormat = new SimpleDateFormat("yyyy-MM");
}
if(StoreFieldDateEnum.MD.getCode() == dateType){
simpleDateFormat = new SimpleDateFormat("MM-dd");
}
if(StoreFieldDateEnum.Hms.getCode() == dateType){
simpleDateFormat = new SimpleDateFormat("YYYY-MM-dd HH:mm:ss");
simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
}
if(simpleDateFormat == null){
simpleDateFormat = new SimpleDateFormat("YYYY-MM-dd");
simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
}
map.put(dateType, simpleDateFormat);
}
......@@ -794,22 +794,22 @@ public class StoreController extends DownloadUtils {
SimpleDateFormat simpleDateFormat = map1.get(dateType);
if(simpleDateFormat == null){
if(StoreFieldDateEnum.YMDHMS.getCode() == dateType){
simpleDateFormat = new SimpleDateFormat("YYYYMMddHHmmss");
simpleDateFormat = new SimpleDateFormat("yyyyMMddHHmmss");
}
if(StoreFieldDateEnum.YMD.getCode() == dateType){
simpleDateFormat = new SimpleDateFormat("YYYYMMdd");
simpleDateFormat = new SimpleDateFormat("yyyyMMdd");
}
if(StoreFieldDateEnum.YM.getCode() == dateType){
simpleDateFormat = new SimpleDateFormat("YYYYMM");
simpleDateFormat = new SimpleDateFormat("yyyyMM");
}
if(StoreFieldDateEnum.MD.getCode() == dateType){
simpleDateFormat = new SimpleDateFormat("MMdd");
}
if(StoreFieldDateEnum.Hms.getCode() == dateType){
simpleDateFormat = new SimpleDateFormat("YYYYMMddHHmmss");
simpleDateFormat = new SimpleDateFormat("yyyyMMddHHmmss");
}
if(simpleDateFormat == null){
simpleDateFormat = new SimpleDateFormat("YYYYMMdd");
simpleDateFormat = new SimpleDateFormat("yyyyMMdd");
}
map1.put(dateType, simpleDateFormat);
}
......
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