短信发送及其它

This commit is contained in:
yiyan
2018-07-12 00:38:50 +08:00
parent 97078700f1
commit 0378fe9e70
34 changed files with 5557 additions and 214 deletions
+23 -6
View File
@@ -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转ObjectJavaBean
*
@@ -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) {