查询数据库
<p>[TOC]</p>
<h5>简要描述</h5>
<ul>
<li>查询数据库</li>
</ul>
<h5>请求URL</h5>
<ul>
<li><a href="http://localhost:30001/QueryDB">http://localhost:30001/QueryDB</a></li>
</ul>
<h5>请求方式</h5>
<ul>
<li>POST </li>
</ul>
<h5>参数</h5>
<table>
<thead>
<tr>
<th style="text-align: left;">参数名</th>
<th style="text-align: left;">类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">dbname</td>
<td style="text-align: left;">string</td>
<td>数据库文件名(注意区分大小写)</td>
</tr>
<tr>
<td style="text-align: left;">sql</td>
<td style="text-align: left;">string</td>
<td>查询语句</td>
</tr>
</tbody>
</table>
<h5>发送示例</h5>
<pre><code>{
&quot;dbname&quot;:&quot;MSG0.db&quot;,
&quot;sql&quot;:&quot;select * from MSG limit 2&quot;
}</code></pre>
<h5>返回示例</h5>
<pre><code>{
&quot;data&quot;: [
{
&quot;localId&quot;: &quot;1&quot;,
&quot;TalkerId&quot;: &quot;1&quot;,
&quot;MsgSvrID&quot;: &quot;8411306876558530937&quot;,
&quot;Type&quot;: &quot;1&quot;,
&quot;SubType&quot;: &quot;0&quot;,
&quot;IsSender&quot;: &quot;1&quot;,
&quot;CreateTime&quot;: &quot;1657456857&quot;,
&quot;Sequence&quot;: &quot;1657456857000&quot;,
&quot;StatusEx&quot;: &quot;0&quot;,
&quot;FlagEx&quot;: &quot;0&quot;,
&quot;Status&quot;: &quot;2&quot;,
&quot;MsgServerSeq&quot;: &quot;0&quot;,
&quot;MsgSequence&quot;: &quot;0&quot;,
&quot;StrTalker&quot;: &quot;filehelper&quot;,
&quot;StrContent&quot;: &quot;haha666&quot;,
&quot;Reserved0&quot;: &quot;0&quot;,
&quot;BytesExtra&quot;:&quot;$\b f422de16a450607ca514e688b0a89235&quot;
},
{
&quot;localId&quot;: &quot;2&quot;,
&quot;TalkerId&quot;: &quot;2&quot;,
&quot;MsgSvrID&quot;: &quot;8248358209354624495&quot;,
&quot;Type&quot;: &quot;34&quot;,
&quot;SubType&quot;: &quot;0&quot;,
&quot;IsSender&quot;: &quot;0&quot;,
&quot;CreateTime&quot;: &quot;1657456865&quot;,
&quot;Sequence&quot;: &quot;1657456865000&quot;,
&quot;StatusEx&quot;: &quot;0&quot;,
&quot;FlagEx&quot;: &quot;0&quot;,
&quot;Status&quot;: &quot;2&quot;,
&quot;MsgServerSeq&quot;: &quot;1&quot;,
&quot;MsgSequence&quot;: &quot;763728862&quot;,
&quot;StrTalker&quot;: &quot;wxid_7jcwnh1hfaka22&quot;,
&quot;StrContent&quot;: &quot;&lt;msg&gt;&lt;voicemsg endflag=\&quot;1\&quot; cancelflag=\&quot;0\&quot; forwardflag=\&quot;0\&quot; voiceformat=\&quot;4\&quot; voicelength=\&quot;6397\&quot; length=\&quot;10750\&quot; bufid=\&quot;796522310088982944\&quot; aeskey=\&quot;727562667567737266796f6a74646854\&quot; voiceurl=\&quot;3052020100044b30490201000204c53fdf6f02033d14b902046b692fb7020462cac8e1042462633166626465332d376665622d343865652d383132322d64326366613034353734333802040128000f0201000400373940b2\&quot; voicemd5=\&quot;db859a0c59c125d9abca13643aa64d88\&quot; clientmsgid=\&quot;416239303931363362353434353664005720400710222ba8da479e1123\&quot; fromusername=\&quot;wxid_123456\&quot; /&gt;&lt;/msg&gt;&quot;,
&quot;Reserved0&quot;: &quot;0&quot;,
&quot;BytesExtra&quot;:&quot;\n\b&quot;
},
]
}</code></pre>
<h5>返回参数说明</h5>
<table>
<thead>
<tr>
<th style="text-align: left;">参数名</th>
<th style="text-align: left;">类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">data</td>
<td style="text-align: left;">string</td>
<td>查询到的数据</td>
</tr>
</tbody>
</table>
<h5>备注</h5>
<ul>
<li>更多返回错误代码请看首页的错误代码描述</li>
</ul>