|
|
@ -1,13 +1,12 @@
|
|
|
|
package com.ms.api.common;
|
|
|
|
package com.ms.api.common;
|
|
|
|
|
|
|
|
|
|
|
|
import java.util.Date;
|
|
|
|
|
|
|
|
import java.util.Map;
|
|
|
|
|
|
|
|
import java.util.Set;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import cn.hutool.core.date.DateUtil;
|
|
|
|
|
|
|
|
import cn.hutool.core.util.ObjectUtil;
|
|
|
|
import cn.hutool.core.util.ObjectUtil;
|
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
|
|
|
|
|
import com.alibaba.fastjson.serializer.SerializerFeature;
|
|
|
|
import lombok.Data;
|
|
|
|
import lombok.Data;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import java.util.Map;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 方法处理结果
|
|
|
|
* 方法处理结果
|
|
|
|
*/
|
|
|
|
*/
|
|
|
@ -48,12 +47,14 @@ public class Ret {
|
|
|
|
if (ObjectUtil.isEmpty(data)){
|
|
|
|
if (ObjectUtil.isEmpty(data)){
|
|
|
|
return new Ret("success", data);
|
|
|
|
return new Ret("success", data);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
for (Object key : data.keySet()) {
|
|
|
|
// for (Object key : data.keySet()) {
|
|
|
|
if (data.get(key) instanceof Date){
|
|
|
|
// if (data.get(key) instanceof Date){
|
|
|
|
data.put(key,DateUtil.formatDateTime((Date) data.get(key)));
|
|
|
|
// data.put(key,DateUtil.formatDateTime((Date) data.get(key)));
|
|
|
|
}
|
|
|
|
// }
|
|
|
|
}
|
|
|
|
// }
|
|
|
|
return new Ret("success", data);
|
|
|
|
// return new Ret("success", data);
|
|
|
|
|
|
|
|
String jsonStr = JSONObject.toJSONString(data, SerializerFeature.WriteDateUseDateFormat);
|
|
|
|
|
|
|
|
return new Ret("success", JSONObject.parseObject(jsonStr));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public static Ret fail() {
|
|
|
|
public static Ret fail() {
|
|
|
|