短信发送及其它
This commit is contained in:
@@ -6,6 +6,7 @@ import java.io.FileInputStream;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.lang.reflect.Field;
|
||||
import java.security.MessageDigest;
|
||||
import java.text.DateFormat;
|
||||
import java.text.ParseException;
|
||||
@@ -44,6 +45,27 @@ public class IfishUtil {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 对象转Map
|
||||
* @param obj
|
||||
* @return
|
||||
*/
|
||||
public static Map<String,Object> objectToMap(Object obj){
|
||||
Map<String,Object> map = new HashMap<String,Object>(1);
|
||||
Class<?> clazz = obj.getClass();
|
||||
Field[] fields = clazz.getDeclaredFields();
|
||||
try {
|
||||
for (Field field : fields) {
|
||||
field.setAccessible(true);
|
||||
map.put(field.getName(),field.get(obj));
|
||||
}
|
||||
} catch (IllegalAccessException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* Json转Object(JavaBean)
|
||||
*
|
||||
@@ -217,8 +239,6 @@ public class IfishUtil {
|
||||
|
||||
/**
|
||||
* 返回分页数据
|
||||
*
|
||||
* @param str
|
||||
* @return
|
||||
*/
|
||||
public static Object returnPageData(Pagination<?> page, String sEcho) {
|
||||
@@ -300,10 +320,7 @@ public class IfishUtil {
|
||||
}
|
||||
|
||||
/**
|
||||
* 生成微信分享页面
|
||||
*
|
||||
* @param title
|
||||
* @param base64
|
||||
* 生成微信分享页
|
||||
* @return
|
||||
*/
|
||||
public static String getHtmlFile(String htmlName, String ueditorTitle, String ueditorContent) {
|
||||
|
||||
Reference in New Issue
Block a user