wangchaoxu 1 year ago
commit c616dc2157

@ -1,8 +1,11 @@
package com.ms.api.common;
import lombok.Data;
import java.util.Date;
import java.util.Map;
import java.util.Set;
import cn.hutool.core.date.DateUtil;
import lombok.Data;
/**
*
@ -38,6 +41,11 @@ public class Ret {
}
public static Ret success(Map data) {
for (Object key : data.keySet()) {
if (data.get(key) instanceof Date){
data.put(key,DateUtil.formatDateTime((Date) data.get(key)));
}
}
return new Ret("success", data);
}
@ -52,10 +60,10 @@ public class Ret {
@Override
public String toString() {
return "Ret{" +
"result='" + result + '\'' +
", reason='" + reason + '\'' +
", code='" + code + '\'' +
", data=" + data +
'}';
"result='" + result + '\'' +
", reason='" + reason + '\'' +
", code='" + code + '\'' +
", data=" + data +
'}';
}
}

Loading…
Cancel
Save