| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- import java.sql.*;
- public class QueryWf9Fallback {
- public static void main(String[] args) throws Exception {
- String url = "jdbc:mysql://cq-cdb-8fjmemkb.sql.tencentcdb.com:27220/fs_tenant_cs1"
- + "?useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8";
- try (Connection c = DriverManager.getConnection(url, "root", "Ylrz_1q2w3e4r5t6y");
- Statement st = c.createStatement()) {
- System.out.println("=== workflow 9 meta ===");
- try (ResultSet rs = st.executeQuery(
- "SELECT id, template_code, template_name, status, LEFT(canvas_data,200) cd "
- + "FROM company_workflow_lobster WHERE id=9")) {
- while (rs.next()) {
- System.out.printf("id=%s code=%s name=%s status=%s%n cd=%s%n",
- rs.getString("id"), rs.getString("template_code"),
- rs.getString("template_name"), rs.getString("status"), rs.getString("cd"));
- }
- }
- System.out.println("\n=== wf9 nodes ===");
- try (ResultSet rs = st.executeQuery(
- "SELECT node_code, node_name, node_type, LEFT(message_template,100) mt "
- + "FROM company_workflow_lobster_node WHERE workflow_id=9 AND del_flag=0 ORDER BY sort_no")) {
- while (rs.next()) {
- System.out.printf("%s %s t=%s | %s%n",
- rs.getString("node_code"), rs.getString("node_name"),
- rs.getString("node_type"), rs.getString("mt"));
- }
- }
- System.out.println("\n=== fallback with confirm text ===");
- try (ResultSet rs = st.executeQuery(
- "SELECT prompt_key, prompt_content FROM lobster_system_prompt "
- + "WHERE prompt_key LIKE '%fallback%' "
- + "AND prompt_content LIKE '%确认%' LIMIT 20")) {
- while (rs.next()) {
- System.out.println(rs.getString("prompt_key") + " => " + rs.getString("prompt_content"));
- }
- }
- System.out.println("\n=== all prompts with shao deng ===");
- try (ResultSet rs = st.executeQuery(
- "SELECT prompt_key, prompt_content FROM lobster_system_prompt "
- + "WHERE prompt_content LIKE '%稍等%' LIMIT 15")) {
- while (rs.next()) {
- System.out.println(rs.getString("prompt_key") + " => " + rs.getString("prompt_content"));
- }
- }
- System.out.println("\n=== nodes with customerName template ===");
- try (ResultSet rs = st.executeQuery(
- "SELECT workflow_id, node_code, message_template FROM company_workflow_lobster_node "
- + "WHERE message_template LIKE '%customerName%' LIMIT 10")) {
- while (rs.next()) {
- System.out.printf("wf=%s %s => %s%n",
- rs.getString("workflow_id"), rs.getString("node_code"), rs.getString("message_template"));
- }
- }
- }
- }
- }
|