|
|
|
@ -11,7 +11,6 @@ import com.jfinal.kit.PropKit;
|
|
|
|
|
import com.jfinal.kit.StrKit;
|
|
|
|
|
import com.jfinal.plugin.activerecord.Page;
|
|
|
|
|
import com.jfinal.plugin.activerecord.Record;
|
|
|
|
|
import com.jfinal.plugin.hikaricp.HikariCpPlugin;
|
|
|
|
|
import org.apache.commons.codec.binary.Base64;
|
|
|
|
|
import org.apache.commons.codec.digest.DigestUtils;
|
|
|
|
|
import org.slf4j.Logger;
|
|
|
|
@ -20,11 +19,8 @@ import org.slf4j.LoggerFactory;
|
|
|
|
|
import java.io.*;
|
|
|
|
|
import java.net.URISyntaxException;
|
|
|
|
|
import java.nio.charset.StandardCharsets;
|
|
|
|
|
import java.security.SecureRandom;
|
|
|
|
|
import java.text.ParseException;
|
|
|
|
|
import java.text.SimpleDateFormat;
|
|
|
|
|
import java.time.LocalDateTime;
|
|
|
|
|
import java.time.format.DateTimeFormatter;
|
|
|
|
|
import java.util.*;
|
|
|
|
|
import java.util.regex.Matcher;
|
|
|
|
|
import java.util.regex.Pattern;
|
|
|
|
@ -33,22 +29,6 @@ import java.util.regex.Pattern;
|
|
|
|
|
public class CommonUtil {
|
|
|
|
|
private static final Logger log = LoggerFactory.getLogger(CommonUtil.class);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 功能:将jsonObject转换为Record
|
|
|
|
|
*
|
|
|
|
|
* @param jsonObject
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
public static Record convertJsonObjectToRecord(JSONObject jsonObject) {
|
|
|
|
|
Record record = new Record();
|
|
|
|
|
for (Map.Entry<String, Object> entry : jsonObject.entrySet()) {
|
|
|
|
|
String key = entry.getKey(); // 获取键
|
|
|
|
|
Object value = entry.getValue(); // 获取值
|
|
|
|
|
record.set(key, value);
|
|
|
|
|
}
|
|
|
|
|
return record;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 功能:获取操作系统类型
|
|
|
|
|
* 作者:黄海
|
|
|
|
|