| 12345678910111213141516171819202122 |
- import java.sql.*;
- public class QueryMasterAiModels {
- public static void main(String[] a) throws Exception {
- Class.forName("com.mysql.cj.jdbc.Driver");
- String[] dbs = {"ylrz_saas", "fs_tenant_cs1"};
- for (String db : dbs) {
- String jdbc = "jdbc:mysql://cq-cdb-8fjmemkb.sql.tencentcdb.com:27220/" + db
- + "?useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8";
- System.out.println("\n=== " + db + " ===");
- try (Connection c = DriverManager.getConnection(jdbc, "root", "Ylrz_1q2w3e4r5t6y");
- Statement st = c.createStatement();
- ResultSet rs = st.executeQuery(
- "SELECT provider_code, model_name, model_identifier, api_endpoint FROM admin_ai_model WHERE status=1")) {
- while (rs.next()) {
- System.out.printf("%s | display=%s | id=%s%n",
- rs.getString(1), rs.getString(2), rs.getString(3));
- }
- }
- }
- }
- }
|