|
@@ -3,14 +3,14 @@ const tools = require('../../../tools');
|
|
|
const helper = require('../../helper');
|
|
|
const mysql = require('mysql2/promise');
|
|
|
const config = require("../../../etc/config.json");
|
|
|
-const taskdbConfig = config.isDebug?config.debug_task_mysql:config.release_task_mysql
|
|
|
+const dbConfig = config.isDebug?config.debug_mysql:config.release_mysql
|
|
|
const CMD = {}
|
|
|
CMD.search_id = async function (bookId) {
|
|
|
// const url = 'https://new-media-fx.qimao.com/api/content/book/list';
|
|
|
let connection = null
|
|
|
try{
|
|
|
connection = await mysql.createConnection({
|
|
|
- ...taskdbConfig,
|
|
|
+ ...dbConfig,
|
|
|
multipleStatements: true
|
|
|
});
|
|
|
let sql = `SELECT * FROM book_info WHERE id = ${bookId} LIMIT 1`
|