{"id":12125,"date":"2024-03-12T15:30:06","date_gmt":"2024-03-12T07:30:06","guid":{"rendered":"https:\/\/nj.transwarp.cn:8180\/?p=12125"},"modified":"2024-05-28T09:22:55","modified_gmt":"2024-05-28T01:22:55","slug":"tds%e8%8e%b7%e5%8f%96%e4%bb%bb%e5%8a%a1%e7%9a%84%e7%9b%ae%e5%bd%95%e6%a0%91","status":"publish","type":"post","link":"https:\/\/kbwp.transwarp.cn\/?p=12125","title":{"rendered":"tds\u83b7\u53d6\u4efb\u52a1\u7684\u76ee\u5f55\u6811"},"content":{"rendered":"<h3>\u6982\u8981\u63cf\u8ff0<\/h3>\n<hr \/>\n<p>\u672c\u6587\u4e3b\u8981\u4ecb\u7ecd\u5982\u4f55\u901a\u8fc7api\u63a5\u53e3 \/ \u5143\u6570\u636esql\uff0c\u83b7\u53d6\u52a0\u8f7d\/\u8c03\u5ea6\u4efb\u52a1\u7684\u76ee\u5f55\u6811\u3002<\/p>\n<h3>\u8be6\u7ec6\u8bf4\u660e<\/h3>\n<hr \/>\n<h3>\u89e3\u51b3\u65b9\u6848<\/h3>\n<hr \/>\n<h4>API\u65b9\u5f0f\uff1a<\/h4>\n<h5>1. getTestToken<\/h5>\n<ul>\n<li>\u4f7f\u7528\u767b\u5f55foundation-gateway\u9875\u9762\u7684\u7528\u6237\u540d\u5bc6\u7801\u4f5c\u4e3a<code>userName<\/code>\u548c<code>password<\/code><\/li>\n<\/ul>\n<pre><code class=\"language-shell\">curl -X POST \"https:\/\/kv4:28190\/studio\/api\/auth\/v1\/token\/getTestToken\" -H \"accept: application\/json\" -H \"Content-Type: application\/json\" -d \"{\\\"clientId\\\":\\\"app\\\",\\\"clientSecret\\\":\\\"secret\\\",\\\"password\\\":\\\"admin\\\",\\\"userName\\\":\\\"admin\\\"}\"<\/code><\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/nj.transwarp.cn:8180\/wp-content\/uploads\/2024\/03\/image-1710228356653.png\" alt=\"file\" \/><\/p>\n<h5>2. \u67e5\u8be2\u52a0\u8f7d\u4efb\u52a1\u7684uuid<\/h5>\n<pre><code class=\"language-sql\">select unique_id,t.* from tdt_solution t where name = 'testlkw01';<\/code><\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/nj.transwarp.cn:8180\/wp-content\/uploads\/2024\/03\/image-1710228447052.png\" alt=\"file\" \/><\/p>\n<h5>3. \u4f7f\u7528\u524d\u9762\u7684token\u548cuuid\u5e26\u5165\u5230\u4e0b\u9762\u7684\u63a5\u53e3\u4e2d<\/h5>\n<ul>\n<li>\u4f7f\u7528step1\u83b7\u53d6\u7684token\u4ee3\u5165\u5230\u4e0b\u9762\u7684 <code>Authorization<\/code> \u90e8\u5206 \uff08Bearer\u52a0\u7a7a\u683c\u7684\u540e\u9762\uff09<\/li>\n<li>\u4f7f\u7528step2\u83b7\u53d6\u7684<code>unique_id<\/code>\u4ee3\u5165\u5230\u4e0b\u9762\u7684 <code>-d<\/code> \u90e8\u5206<\/li>\n<\/ul>\n<pre><code class=\"language-shell\">curl -X POST \"https:\/\/kv4:28190\/studio\/api\/navigator\/v1\/common\/getPathByUuid?noWorkspacePath=false\" -H \"accept: application\/json\" -H \"Authorization: Bearer 8177ee8b-88bb-40c4-8a72-d7a45871aebb\" -H \"Content-Type: application\/json\" -d \"[\\\"efc8c17eb1dc4a9fa2fbd5eeaf4a48a8\\\"]\"<\/code><\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/nj.transwarp.cn:8180\/wp-content\/uploads\/2024\/03\/image-1710228502868.png\" alt=\"file\" \/><\/p>\n<p>\u5373\u53ef\u5f97\u5230\u5b8c\u6574\u7684path\u3002<\/p>\n<h4>SQL\u65b9\u5f0f\uff1a<\/h4>\n<p>\u4ee5\u5982\u4e0b\u4efb\u52a1\u6d41\u76ee\u5f55\u6811\u4e3a\u4f8b\uff1a<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/nj.transwarp.cn:8180\/wp-content\/uploads\/2024\/03\/image-1716859373057.png\" alt=\"file\" \/><\/p>\n<pre><code class=\"language-sql\">WITH RECURSIVE cte AS (\n    SELECT uuid, name, parent_uuid,name AS full_path FROM workflow_workflow1.navigator_navigation  WHERE name='\u4efb\u52a1\u6d41a' and category='WORKFLOW' \n    UNION ALL\n    SELECT t.uuid, t.name, t.parent_uuid ,CONCAT(t.name,'\/',cte.full_path ) AS full_path FROM  workflow_workflow1.navigator_navigation t\n    JOIN cte\n    ON t.uuid = cte.parent_uuid\n)\nSELECT *  FROM cte \nwhere parent_uuid='-';<\/code><\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/nj.transwarp.cn:8180\/wp-content\/uploads\/2024\/03\/image-1716859411115.png\" alt=\"file\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6982\u8981\u63cf\u8ff0 \u672c\u6587\u4e3b\u8981\u4ecb\u7ecd\u5982\u4f55\u901a\u8fc7api\u63a5\u53e3 \/ \u5143\u6570\u636esql\uff0c\u83b7\u53d6\u52a0\u8f7d\/\u8c03\u5ea6\u4efb\u52a1\u7684\u76ee\u5f55\u6811\u3002 \u8be6\u7ec6\u8bf4\u660e \u89e3\u51b3\u65b9\u6848  ..<\/p>\n<div class=\"clear-fix\"><\/div>\n<p><a href=\"https:\/\/kbwp.transwarp.cn\/?p=12125\" title=\"read more...\">Read more<\/a><\/p>\n","protected":false},"author":12,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-12125","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"acf":[],"_links":{"self":[{"href":"https:\/\/kbwp.transwarp.cn\/index.php?rest_route=\/wp\/v2\/posts\/12125","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kbwp.transwarp.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kbwp.transwarp.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kbwp.transwarp.cn\/index.php?rest_route=\/wp\/v2\/users\/12"}],"replies":[{"embeddable":true,"href":"https:\/\/kbwp.transwarp.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=12125"}],"version-history":[{"count":3,"href":"https:\/\/kbwp.transwarp.cn\/index.php?rest_route=\/wp\/v2\/posts\/12125\/revisions"}],"predecessor-version":[{"id":13132,"href":"https:\/\/kbwp.transwarp.cn\/index.php?rest_route=\/wp\/v2\/posts\/12125\/revisions\/13132"}],"wp:attachment":[{"href":"https:\/\/kbwp.transwarp.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=12125"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kbwp.transwarp.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=12125"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kbwp.transwarp.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=12125"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}