|
@@ -11,9 +11,10 @@ import java.util.HashMap;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
|
|
|
|
-public class SetLevel {
|
|
|
+import cn.com.qmth.export.bean.Knowledge;
|
|
|
+import cn.com.qmth.export.bean.Param;
|
|
|
|
|
|
- private static String dbName = "guangkai241128";
|
|
|
+public class SetLevel {
|
|
|
|
|
|
public static void main(String[] args) {
|
|
|
System.out.println("开始处理");
|
|
@@ -22,12 +23,9 @@ public class SetLevel {
|
|
|
try {
|
|
|
Class.forName("com.mysql.cj.jdbc.Driver");
|
|
|
|
|
|
- String url = "jdbc:mysql://localhost:3306/" + dbName + "?serverTimezone=GMT%2B8";
|
|
|
-
|
|
|
- String user = "root";
|
|
|
+ String url = "jdbc:mysql://localhost:3306/" + Param.dbName + "?serverTimezone=GMT%2B8";
|
|
|
|
|
|
- String password = "123456";
|
|
|
- connect = DriverManager.getConnection(url, user, password);
|
|
|
+ connect = DriverManager.getConnection(url, Param.dbUser, Param.dbPass);
|
|
|
List<Knowledge> ks = getKnowledge(connect);
|
|
|
setLevel(ks);
|
|
|
if (ks.size() <= 1000) {
|