public static Object parseDate(Object object){
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
Class clazz = object.getClass();
Field[] fields = clazz.getDeclaredFields();
for (int i=0;i<fields.length;i++){
Field field = fields[i];
// 允许授权访问
field.setAccessible(true);
try {
// 获取属性名
fileName = field.getName();
// 获取值
Object value = field.get(object);
// 设置值
field.set(object,format);
} catch (Exception e) {
e.printStackTrace();
}
}
return object;
}